Do a sweep of symbol internalization. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 23 Aug 2019 19:59:23 +0000 (19:59 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 23 Aug 2019 19:59:23 +0000 (19:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369803 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGNonTrivialStruct.cpp
lib/Frontend/InterfaceStubFunctionsConsumer.cpp
lib/Parse/ParseDecl.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp

index caf62d2ac93a1db73b12f0301dc8c5b67ddfb076..05615aa1288160d444341351d5b12867d20b2323 100644 (file)
@@ -823,7 +823,7 @@ static void callSpecialFunction(G &&Gen, StringRef FuncName, QualType QT,
   Gen.callFunc(FuncName, QT, Addrs, CGF);
 }
 
-template <size_t N> std::array<Address, N> createNullAddressArray();
+template <size_t N> static std::array<Address, N> createNullAddressArray();
 
 template <> std::array<Address, 1> createNullAddressArray() {
   return std::array<Address, 1>({{Address(nullptr, CharUnits::Zero())}});
index cdf4e6b33b9af5c4a38ec1988897aed02391847b..73584eb98df3dac2d7cf9a35d7d36765bb720220 100644 (file)
@@ -15,6 +15,7 @@
 
 using namespace clang;
 
+namespace {
 class InterfaceStubFunctionsConsumer : public ASTConsumer {
   CompilerInstance &Instance;
   StringRef InFile;
@@ -293,6 +294,7 @@ public:
     writeIfsV1(Instance.getTarget().getTriple(), Symbols, context, Format, *OS);
   }
 };
+} // namespace
 
 std::unique_ptr<ASTConsumer>
 GenerateInterfaceIfsExpV1Action::CreateASTConsumer(CompilerInstance &CI,
index 71d1c3b8f4a30fca6c7f3657ab57a699511d1ef2..3de52ce8754f2500431cee3cf8b7781be5898acf 100644 (file)
@@ -86,8 +86,8 @@ static bool isAttributeLateParsed(const IdentifierInfo &II) {
 }
 
 /// Check if the a start and end source location expand to the same macro.
-bool FindLocsWithCommonFileID(Preprocessor &PP, SourceLocation StartLoc,
-                              SourceLocation EndLoc) {
+static bool FindLocsWithCommonFileID(Preprocessor &PP, SourceLocation StartLoc,
+                                     SourceLocation EndLoc) {
   if (!StartLoc.isMacroID() || !EndLoc.isMacroID())
     return false;
 
index 2c49beef4a028cd69e193988e8b75c4e01a7457d..3ce998fdb449777e0264084fde2cc8e0b26ea463 100644 (file)
@@ -1060,10 +1060,11 @@ static const Stmt *getTerminatorCondition(const CFGBlock *B) {
   return S;
 }
 
-llvm::StringLiteral StrEnteringLoop = "Entering loop body";
-llvm::StringLiteral StrLoopBodyZero = "Loop body executed 0 times";
-llvm::StringLiteral StrLoopRangeEmpty = "Loop body skipped when range is empty";
-llvm::StringLiteral StrLoopCollectionEmpty =
+constexpr llvm::StringLiteral StrEnteringLoop = "Entering loop body";
+constexpr llvm::StringLiteral StrLoopBodyZero = "Loop body executed 0 times";
+constexpr llvm::StringLiteral StrLoopRangeEmpty =
+    "Loop body skipped when range is empty";
+constexpr llvm::StringLiteral StrLoopCollectionEmpty =
     "Loop body skipped when collection is empty";
 
 static std::unique_ptr<FilesToLineNumsMap>