]> granicus.if.org Git - clang/commitdiff
Make helper functions static. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 28 Mar 2019 17:18:42 +0000 (17:18 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 28 Mar 2019 17:18:42 +0000 (17:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357187 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp
lib/Sema/SemaOpenMP.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

index 84185124d234581edffb00ab04e794dc1fc8fd7b..540cc6f6bc57fc71e0fc91c673083a962a0f8531 100644 (file)
@@ -914,9 +914,10 @@ static PassBuilder::OptimizationLevel mapToLevel(const CodeGenOptions &Opts) {
   }
 }
 
-void addSanitizersAtO0(ModulePassManager &MPM, const Triple &TargetTriple,
-                       const LangOptions &LangOpts,
-                       const CodeGenOptions &CodeGenOpts) {
+static void addSanitizersAtO0(ModulePassManager &MPM,
+                              const Triple &TargetTriple,
+                              const LangOptions &LangOpts,
+                              const CodeGenOptions &CodeGenOpts) {
   if (LangOpts.Sanitize.has(SanitizerKind::Address)) {
     MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
     bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address);
index 150b21a8c92dde881b0b736b425aadc58d678bdb..b4c8a644a3973e67f099531b214121c7788ebe11 100644 (file)
@@ -13352,10 +13352,11 @@ static bool checkMapConflicts(
 
 // Look up the user-defined mapper given the mapper name and mapped type, and
 // build a reference to it.
-ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
-                                     CXXScopeSpec &MapperIdScopeSpec,
-                                     const DeclarationNameInfo &MapperId,
-                                     QualType Type, Expr *UnresolvedMapper) {
+static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
+                                            CXXScopeSpec &MapperIdScopeSpec,
+                                            const DeclarationNameInfo &MapperId,
+                                            QualType Type,
+                                            Expr *UnresolvedMapper) {
   if (MapperIdScopeSpec.isInvalid())
     return ExprError();
   // Find all user-defined mappers with the given MapperId.
index 8f22e3d32047dfa315270097c0ba68c6e9fa8227..c86ae43ccd39d41404473b58cac4b48231b62779 100644 (file)
@@ -161,8 +161,8 @@ const Expr *bugreporter::getDerefExpr(const Stmt *S) {
 /// are the immediate snapshots of the tracked region's bindings within the
 /// node's respective states but not really checking that these snapshots
 /// actually contain the same set of bindings.
-bool hasVisibleUpdate(const ExplodedNode *LeftNode, SVal LeftVal,
-                      const ExplodedNode *RightNode, SVal RightVal) {
+static bool hasVisibleUpdate(const ExplodedNode *LeftNode, SVal LeftVal,
+                             const ExplodedNode *RightNode, SVal RightVal) {
   if (LeftVal == RightVal)
     return true;