Skip to content

Commit 563ea29

Browse files
[clang-tools-extra] Remove redundant declarations (NFC) (#166894)
In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration.
1 parent bddab83 commit 563ea29

File tree

5 files changed

+0
-10
lines changed

5 files changed

+0
-10
lines changed

clang-tools-extra/clang-doc/BitcodeWriter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ static const std::vector<std::pair<BlockId, std::vector<RecordId>>>
303303

304304
// AbbreviationMap
305305

306-
constexpr unsigned char BitCodeConstants::Signature[];
307-
308306
void ClangDocBitcodeWriter::AbbreviationMap::add(RecordId RID,
309307
unsigned AbbrevID) {
310308
assert(RecordIdNameMap[RID] && "Unknown RecordId.");

clang-tools-extra/clangd/ClangdLSPServer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ class ClangdLSPServer::MessageHandler : public Transport::MessageHandler {
456456

457457
ClangdLSPServer &Server;
458458
};
459-
constexpr int ClangdLSPServer::MessageHandler::MaxReplayCallbacks;
460459

461460
// call(), notify(), and reply() wrap the Transport, adding logging and locking.
462461
void ClangdLSPServer::callMethod(StringRef Method, llvm::json::Value Params,

clang-tools-extra/clangd/FileDistance.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ static llvm::SmallString<128> canonicalize(llvm::StringRef Path) {
5454
return Result;
5555
}
5656

57-
constexpr const unsigned FileDistance::Unreachable;
5857
const llvm::hash_code FileDistance::RootHash =
5958
llvm::hash_value(llvm::StringRef("/"));
6059

clang-tools-extra/clangd/FuzzyMatch.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@
6262
namespace clang {
6363
namespace clangd {
6464

65-
constexpr int FuzzyMatcher::MaxPat;
66-
constexpr int FuzzyMatcher::MaxWord;
67-
6865
static char lower(char C) { return C >= 'A' && C <= 'Z' ? C + ('a' - 'A') : C; }
6966
// A "negative infinity" score that won't overflow.
7067
// We use this to mark unreachable states and forbidden solutions.

clang-tools-extra/clangd/index/SymbolLocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
namespace clang {
1212
namespace clangd {
1313

14-
constexpr uint32_t SymbolLocation::Position::MaxLine;
15-
constexpr uint32_t SymbolLocation::Position::MaxColumn;
16-
1714
void SymbolLocation::Position::setLine(uint32_t L) {
1815
if (L > MaxLine)
1916
L = MaxLine;

0 commit comments

Comments
 (0)