summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2019-03-28 17:18:42 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2019-03-28 17:18:42 +0000
commitba2ea93ad189d8a1e87e0e02b20790272b7ed375 (patch)
tree0efbc31b5383736aa1d8f4c46217b34c61dd1f13 /clang/lib
parent4180a7cd831537567c9c9eb8528365e3958aed6b (diff)
downloadbcm5719-llvm-ba2ea93ad189d8a1e87e0e02b20790272b7ed375.tar.gz
bcm5719-llvm-ba2ea93ad189d8a1e87e0e02b20790272b7ed375.zip
Make helper functions static. NFC.
llvm-svn: 357187
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp7
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp9
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp4
3 files changed, 11 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 84185124d23..540cc6f6bc5 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/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<ASanGlobalsMetadataAnalysis, Module>());
bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address);
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 150b21a8c92..b4c8a644a39 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/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/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 8f22e3d3204..c86ae43ccd3 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud