From: Benjamin Kramer Date: Thu, 28 Mar 2019 17:18:42 +0000 (+0000) Subject: Make helper functions static. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f3d45f893f4c92b4e8e29aa21321ebe90a862b3;p=clang Make helper functions static. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357187 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 84185124d2..540cc6f6bc 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -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()); bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address); diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp index 150b21a8c9..b4c8a644a3 100644 --- a/lib/Sema/SemaOpenMP.cpp +++ b/lib/Sema/SemaOpenMP.cpp @@ -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. diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 8f22e3d320..c86ae43ccd 100644 --- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -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;