summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2018-10-13 22:18:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2018-10-13 22:18:22 +0000
commitc55e9975566ca2491d377a33f1ac497ef12571a3 (patch)
tree1474ecce883dbfa88a45d8d0bc6bfa75bd8fa3c5 /clang/lib
parent7899ccbcca9dd69ad21231a047c1e6130528937e (diff)
downloadbcm5719-llvm-c55e9975566ca2491d377a33f1ac497ef12571a3.tar.gz
bcm5719-llvm-c55e9975566ca2491d377a33f1ac497ef12571a3.zip
Move some helpers from the global namespace into anonymous ones.
llvm-svn: 344468
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp4
3 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
index 1f9bdeb059c..3aa21b84f68 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
@@ -196,6 +196,7 @@ bool CallAndMessageChecker::uninitRefOrPointer(
return false;
}
+namespace {
class FindUninitializedField {
public:
SmallVector<const FieldDecl *, 10> FieldChain;
@@ -234,6 +235,7 @@ public:
return false;
}
};
+} // namespace
bool CallAndMessageChecker::PreVisitProcessArg(CheckerContext &C,
SVal V,
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
index 7c53b2d21a5..0752dba49c8 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
@@ -337,6 +337,7 @@ void ExprInspectionChecker::analyzerDenote(const CallExpr *CE,
C.addTransition(C.getState()->set<DenotedSymbols>(Sym, E));
}
+namespace {
class SymbolExpressor
: public SymExprVisitor<SymbolExpressor, Optional<std::string>> {
ProgramStateRef State;
@@ -369,6 +370,7 @@ public:
return None;
}
};
+} // namespace
void ExprInspectionChecker::analyzerExpress(const CallExpr *CE,
CheckerContext &C) const {
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 151865f874e..c5edfad7413 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -98,11 +98,12 @@ STATISTIC(NumMaxBlockCountReachedInInlined,
STATISTIC(NumTimesRetriedWithoutInlining,
"The # of times we re-evaluated a call without inlining");
-
//===----------------------------------------------------------------------===//
// Internal program state traits.
//===----------------------------------------------------------------------===//
+namespace {
+
// When modeling a C++ constructor, for a variety of reasons we need to track
// the location of the object for the duration of its ConstructionContext.
// ObjectsUnderConstruction maps statements within the construction context
@@ -164,6 +165,7 @@ public:
return Impl < RHS.Impl;
}
};
+} // namespace
typedef llvm::ImmutableMap<ConstructedObjectKey, SVal>
ObjectsUnderConstructionMap;
OpenPOWER on IntegriCloud