summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp10
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h4
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp4
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp14
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp4
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp8
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp10
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/BlockCounter.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/CheckerManager.cpp14
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h4
-rw-r--r--clang/lib/StaticAnalyzer/Core/ProgramState.cpp3
-rw-r--r--clang/lib/StaticAnalyzer/Core/RegionStore.cpp10
-rw-r--r--clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h4
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/ModelInjector.h4
38 files changed, 70 insertions, 73 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
index 6c83bdbf24f..e462e2b2f15 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
@@ -63,7 +63,7 @@ public:
void dump() const;
void dumpToStream(raw_ostream &os) const;
};
-} // namespace
+}
static SVal computeExtentBegin(SValBuilder &svalBuilder,
const MemRegion *region) {
diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index 780d80a4b72..3fd55760bc5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -132,7 +132,7 @@ namespace {
void checkPostStmt(const ObjCArrayLiteral *AL,
CheckerContext &C) const;
};
-} // namespace
+}
void NilArgChecker::warnIfNilExpr(const Expr *E,
const char *Msg,
@@ -631,7 +631,7 @@ class ClassReleaseChecker : public Checker<check::PreObjCMessage> {
public:
void checkPreObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-} // namespace
+}
void ClassReleaseChecker::checkPreObjCMessage(const ObjCMethodCall &msg,
CheckerContext &C) const {
@@ -692,7 +692,7 @@ class VariadicMethodTypeChecker : public Checker<check::PreObjCMessage> {
public:
void checkPreObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-} // namespace
+}
/// isVariadicMessage - Returns whether the given message is a variadic message,
/// where all arguments must be Objective-C types.
@@ -855,7 +855,7 @@ public:
const CallEvent *Call,
PointerEscapeKind Kind) const;
};
-} // namespace
+}
static bool isKnownNonNilCollectionType(QualType T) {
const ObjCObjectPointerType *PT = T->getAs<ObjCObjectPointerType>();
@@ -1208,7 +1208,7 @@ public:
void checkPostObjCMessage(const ObjCMethodCall &M, CheckerContext &C) const;
};
-} // namespace
+}
ProgramStateRef
ObjCNonNilReturnValueChecker::assumeExprIsNonNull(const Expr *NonNullExpr,
diff --git a/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
index f698d1beb45..abfb971d4cc 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
@@ -184,7 +184,7 @@ public:
walker.Visit(D->getBody());
}
};
-} // namespace
+}
void ento::registerCStringSyntaxChecker(CheckerManager &mgr) {
mgr.registerChecker<CStringSyntaxChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
index 5b5fe1ca054..339af8f0332 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
@@ -241,7 +241,7 @@ public:
BR);
}
};
-} // namespace
+}
void ento::registerObjCDeallocChecker(CheckerManager &mgr) {
mgr.registerChecker<ObjCDeallocChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
index 81cd028668c..0beb917833d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -756,7 +756,7 @@ public:
walker.Visit(D->getBody());
}
};
-} // namespace
+}
#define REGISTER_CHECKER(name) \
void ento::register##name(CheckerManager &mgr) { \
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
index 60826642393..a61e658f69c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
@@ -34,7 +34,7 @@ public:
void VisitStmt(Stmt *S) { VisitChildren(S); }
void VisitChildren(Stmt *S);
};
-} // namespace
+}
void WalkAST::VisitChildren(Stmt *S) {
for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I)
diff --git a/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h b/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
index 81cb6a60327..05b4a61c5af 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ b/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
@@ -30,8 +30,8 @@ class CheckerRegistry;
#undef CHECKER
#undef GET_CHECKERS
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
index 1494dccaa05..f4be5b3e82f 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
@@ -77,7 +77,7 @@ public:
return reachable[block->getBlockID()];
}
};
-} // namespace
+}
void ReachableCode::computeReachableBlocks() {
if (!cfg.getNumBlockIDs())
@@ -445,7 +445,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerDeadStoresChecker(CheckerManager &mgr) {
mgr.registerChecker<DeadStoresChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp b/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
index ee486b246ed..51e7a3d3ce3 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
@@ -40,7 +40,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerDominatorsTreeDumper(CheckerManager &mgr) {
mgr.registerChecker<DominatorsTreeDumper>();
@@ -60,7 +60,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerLiveVariablesDumper(CheckerManager &mgr) {
mgr.registerChecker<LiveVariablesDumper>();
@@ -80,7 +80,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerCFGViewer(CheckerManager &mgr) {
mgr.registerChecker<CFGViewer>();
@@ -106,7 +106,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerCFGDumper(CheckerManager &mgr) {
mgr.registerChecker<CFGDumper>();
@@ -126,7 +126,7 @@ public:
CG.viewGraph();
}
};
-} // namespace
+}
void ento::registerCallGraphViewer(CheckerManager &mgr) {
mgr.registerChecker<CallGraphViewer>();
@@ -146,7 +146,7 @@ public:
CG.dump();
}
};
-} // namespace
+}
void ento::registerCallGraphDumper(CheckerManager &mgr) {
mgr.registerChecker<CallGraphDumper>();
@@ -185,7 +185,7 @@ public:
llvm::errs() << "[stats]\n" << "num-entries = " << Keys.size() << '\n';
}
};
-} // namespace
+}
void ento::registerConfigDumper(CheckerManager &mgr) {
mgr.registerChecker<ConfigDumper>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp b/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
index 7696fabe5b8..0bcebf6e774 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
@@ -205,7 +205,7 @@ void DirectIvarAssignment::MethodCrawler::VisitBinaryOperator(
}
}
}
-} // namespace
+}
// Register the checker that checks for direct accesses in all functions,
// except for the initialization and copy routines.
diff --git a/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp b/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
index 6317e37d88f..43a28121877 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
@@ -41,7 +41,7 @@ public:
void checkPostStmt(const ImplicitCastExpr *CastE, CheckerContext &C) const;
void checkPostStmt(const CXXNewExpr *NewE, CheckerContext &C) const;
};
-} // namespace
+}
static void recordFixedType(const MemRegion *Region, const CXXMethodDecl *MD,
CheckerContext &C) {
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
index ef7ba1670c4..f36ec2c687f 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
@@ -31,7 +31,7 @@ class ExprInspectionChecker : public Checker< eval::Call > {
public:
bool evalCall(const CallExpr *CE, CheckerContext &C) const;
};
-} // namespace
+}
bool ExprInspectionChecker::evalCall(const CallExpr *CE,
CheckerContext &C) const {
diff --git a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
index e71fb14e8df..02c12095b5a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
@@ -722,7 +722,7 @@ void IvarInvalidationCheckerImpl::MethodCrawler::VisitObjCMessageExpr(
VisitStmt(ME);
}
-} // namespace
+}
// Register the checkers.
namespace {
@@ -738,7 +738,7 @@ public:
Walker.visit(D);
}
};
-} // namespace
+}
#define REGISTER_CHECKER(name) \
void ento::register##name(CheckerManager &mgr) { \
diff --git a/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
index 68ffb26f068..0b7375a4b61 100644
--- a/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
@@ -312,7 +312,7 @@ public:
CheckStringRefAssignedTemporary(D, BR, this);
}
};
-} // namespace
+}
void ento::registerLLVMConventionsChecker(CheckerManager &mgr) {
mgr.registerChecker<LLVMConventionsChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
index 1ff43c5e251..52e29368cea 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
@@ -151,7 +151,7 @@ private:
BugReport &BR) override;
};
};
-} // namespace
+}
/// ProgramState traits to store the currently allocated (and not yet freed)
/// symbols. This is a map from the allocated content symbol to the
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
index 817122e50ad..e91347999dc 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
@@ -187,7 +187,7 @@ private:
toScanFor(v), Context(ctx)
{ }
};
-} // namespace
+}
// OutputPossibleOverflows - We've found a possible overflow earlier,
// now check whether Body might contain a comparison which might be
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
index cf255772d30..296aec66805 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
@@ -246,7 +246,7 @@ public:
}
};
-} // namespace
+}
void ento::registerMallocSizeofChecker(CheckerManager &mgr) {
mgr.registerChecker<MallocSizeofChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
index 9d0638dee5c..2be7f1d4ab8 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
@@ -47,7 +47,7 @@ public:
void checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-} // namespace
+}
void NSErrorMethodChecker::checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr,
@@ -94,7 +94,7 @@ public:
void checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-} // namespace
+}
void CFErrorFunctionChecker::checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr,
@@ -146,7 +146,7 @@ public:
"Coding conventions (Apple)") {}
};
-} // namespace
+}
namespace {
class NSOrCFErrorDerefChecker
@@ -164,7 +164,7 @@ public:
CheckerContext &C) const;
void checkEvent(ImplicitNullDerefEvent event) const;
};
-} // namespace
+}
typedef llvm::ImmutableMap<SymbolRef, unsigned> ErrorOutFlag;
REGISTER_TRAIT_WITH_PROGRAMSTATE(NSErrorOut, ErrorOutFlag)
diff --git a/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
index 6773b58161a..ba82d1d1d41 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
@@ -36,7 +36,7 @@ public:
void checkPostObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-} // namespace
+}
void NoReturnFunctionChecker::checkPostCall(const CallEvent &CE,
CheckerContext &C) const {
diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
index 159fb8f7b91..e3fc611a7e0 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
@@ -168,7 +168,7 @@ public:
walker.Visit(D->getBody());
}
};
-} // namespace
+}
void ento::registerObjCContainersASTChecker(CheckerManager &mgr) {
mgr.registerChecker<ObjCContainersASTChecker>();
diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
index a398832e7ff..a2cf8e10d09 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
@@ -81,7 +81,7 @@ private:
mutable bool IsInitialized;
};
-} // namespace
+}
/// \brief Determine whether the given class has a superclass that we want
/// to check. The name of the found superclass is stored in SuperclassName.
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 4b6c330ae87..71ae09c035a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -61,7 +61,7 @@ template <> struct FoldingSetTrait<RetEffect> {
ID.AddInteger((unsigned) X.getObjKind());
}
};
-} // namespace llvm
+} // end llvm namespace
//===----------------------------------------------------------------------===//
// Reference-counting logic (typestate + counts).
@@ -484,7 +484,7 @@ public:
IdentifierInfo *getIdentifier() const { return II; }
Selector getSelector() const { return S; }
};
-} // namespace
+}
namespace llvm {
template <> struct DenseMapInfo<ObjCSummaryKey> {
@@ -510,7 +510,7 @@ template <> struct DenseMapInfo<ObjCSummaryKey> {
}
};
-} // namespace llvm
+} // end llvm namespace
namespace {
class ObjCSummaryCache {
@@ -4032,6 +4032,4 @@ CallEffects CallEffects::getEffect(const FunctionDecl *FD) {
#undef createCallEffect
-} // namespace objc_retain
-} // namespace ento
-} // namespace clang
+}}}
diff --git a/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
index fb135bd8002..6622313c991 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
@@ -34,7 +34,7 @@ class ReturnUndefChecker : public Checker< check::PreStmt<ReturnStmt> > {
public:
void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const;
};
-} // namespace
+}
void ReturnUndefChecker::checkPreStmt(const ReturnStmt *RS,
CheckerContext &C) const {
diff --git a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
index c21f71e6549..327a9e0ac43 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
@@ -40,7 +40,7 @@ private:
static SourceRange genName(raw_ostream &os, const MemRegion *R,
ASTContext &Ctx);
};
-} // namespace
+}
SourceRange StackAddrEscapeChecker::genName(raw_ostream &os, const MemRegion *R,
ASTContext &Ctx) {
diff --git a/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
index 22f4304b05b..d33c977826a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
@@ -34,7 +34,7 @@ class TaintTesterChecker : public Checker< check::PostStmt<Expr> > {
public:
void checkPostStmt(const Expr *E, CheckerContext &C) const;
};
-} // namespace
+}
inline void TaintTesterChecker::initBugType() const {
if (!BT)
diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
index 9be10ba863e..fc49a46eae5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
@@ -56,7 +56,7 @@ public:
void checkBranchCondition(const Stmt *Condition, CheckerContext &Ctx) const;
};
-} // namespace
+}
void UndefBranchChecker::checkBranchCondition(const Stmt *Condition,
CheckerContext &Ctx) const {
diff --git a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
index 5f7f9ed020d..d78de3c6f3a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -48,7 +48,7 @@ private:
static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM);
static inline bool isEmptyCFGBlock(const CFGBlock *CB);
};
-} // namespace
+}
void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G,
BugReporter &B,
diff --git a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
index 5bffc41174c..7e1fc1eb54a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
@@ -239,7 +239,7 @@ public:
}
}
};
-} // namespace
+}
void ento::registerVirtualCallChecker(CheckerManager &mgr) {
mgr.registerChecker<VirtualCallChecker>();
diff --git a/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp b/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
index 7e3c0909537..0e90566839c 100644
--- a/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
@@ -50,7 +50,7 @@ template<> struct FoldingSetTrait<SValPair> {
X.second.Profile(ID);
}
};
-} // namespace llvm
+}
typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<SValData> >
PersistentSValsTy;
diff --git a/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp b/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
index 64478875601..c1ac03d5ab9 100644
--- a/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
@@ -43,7 +43,7 @@ public:
}
};
-} // namespace
+}
typedef llvm::ImmutableMap<CountKey, unsigned> CountMap;
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index fce72dd9e9c..97e97ef8c4d 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2847,7 +2847,7 @@ public:
bool popNextReportGraph(ReportGraph &GraphWrapper);
};
-} // namespace
+}
TrimmedGraph::TrimmedGraph(const ExplodedGraph *OriginalGraph,
ArrayRef<const ExplodedNode *> Nodes) {
diff --git a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
index 7a4d24608c8..2684cc78be7 100644
--- a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
@@ -160,7 +160,7 @@ namespace {
checkFn(S, C);
}
};
-} // namespace
+}
/// \brief Run checkers for visiting Stmts.
void CheckerManager::runCheckersForStmt(bool isPreVisit,
@@ -199,7 +199,7 @@ namespace {
checkFn(*Msg.cloneWithState<ObjCMethodCall>(Pred->getState()), C);
}
};
-} // namespace
+}
/// \brief Run checkers for visiting obj-c messages.
void CheckerManager::runCheckersForObjCMessage(bool isPreVisit,
@@ -242,7 +242,7 @@ namespace {
checkFn(*Call.cloneWithState(Pred->getState()), C);
}
};
-} // namespace
+}
/// \brief Run checkers for visiting an abstract call event.
void CheckerManager::runCheckersForCallEvent(bool isPreVisit,
@@ -290,7 +290,7 @@ namespace {
checkFn(Loc, IsLoad, BoundEx, C);
}
};
-} // namespace
+}
/// \brief Run checkers for load/store of a location.
@@ -331,7 +331,7 @@ namespace {
checkFn(Loc, Val, S, C);
}
};
-} // namespace
+}
/// \brief Run checkers for binding of a value to a location.
void CheckerManager::runCheckersForBind(ExplodedNodeSet &Dst,
@@ -395,7 +395,7 @@ namespace {
checkFn(Condition, C);
}
};
-} // namespace
+}
/// \brief Run checkers for branch condition.
void CheckerManager::runCheckersForBranchCondition(const Stmt *Condition,
@@ -444,7 +444,7 @@ namespace {
checkFn(SR, C);
}
};
-} // namespace
+}
/// \brief Run checkers for dead symbols.
void CheckerManager::runCheckersForDeadSymbols(ExplodedNodeSet &Dst,
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 4c255c1e262..ef515fb5937 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -2648,7 +2648,7 @@ struct DOTGraphTraits<ExplodedNode*> :
return Out.str();
}
};
-} // namespace llvm
+} // end llvm namespace
#endif
void ExprEngine::ViewGraph(bool trim) {
diff --git a/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h b/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h
index c1baddd1302..e7cc23ca823 100644
--- a/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h
+++ b/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h
@@ -39,7 +39,7 @@ public:
}
};
-} // namespace ento
-} // namespace clang
+} // end ento namespace
+} // end clang namespace
#endif
diff --git a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
index 5f3e18feee6..60b32c722eb 100644
--- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
@@ -40,8 +40,7 @@ void ProgramStateRelease(const ProgramState *state) {
Mgr.freeStates.push_back(s);
}
}
-} // namespace ento
-} // namespace clang
+}}
ProgramState::ProgramState(ProgramStateManager *mgr, const Environment& env,
StoreRef st, GenericDataMap gdm)
diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
index dd0f6125e52..6d41fc2146f 100644
--- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -131,7 +131,7 @@ namespace llvm {
template <> struct isPodLike<BindingKey> {
static const bool value = true;
};
-} // namespace llvm
+} // end llvm namespace
LLVM_DUMP_METHOD void BindingKey::dump() const { llvm::errs() << *this; }
@@ -309,7 +309,7 @@ public:
bool supportsFields() const { return SupportsFields; }
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Main RegionStore logic.
@@ -737,7 +737,7 @@ public:
static_cast<DERIVED*>(this)->VisitCluster(BaseR, C);
}
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Binding invalidation.
@@ -963,7 +963,7 @@ public:
void VisitCluster(const MemRegion *baseR, const ClusterBindings *C);
void VisitBinding(SVal V);
};
-} // namespace
+}
void invalidateRegionsWorker::VisitBinding(SVal V) {
// A symbol? Mark it touched by the invalidation.
@@ -2196,7 +2196,7 @@ public:
bool UpdatePostponed();
void VisitBinding(SVal V);
};
-} // namespace
+}
void removeDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR,
const ClusterBindings &C) {
diff --git a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
index 9911a8f2bca..135cd4ef864 100644
--- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
+++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
@@ -93,8 +93,8 @@ protected:
bool Assumption);
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h b/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
index 196925030f9..e23bf8abf38 100644
--- a/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
+++ b/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
@@ -68,7 +68,7 @@ private:
// BodyFarm.
llvm::StringMap<Stmt *> Bodies;
};
-} // namespace ento
-} // namespace clang
+}
+}
#endif
OpenPOWER on IntegriCloud