Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").
llvm-svn: 240353
diff --git a/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp b/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
index 7eb8e93..9f8f6e3 100644
--- a/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
+++ b/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
@@ -117,7 +117,7 @@
};
-} // namespace
+}
static FrontendPluginRegistry::Add<PrintFunctionNamesAction>
X("print-fns", "print function names");
diff --git a/clang/include/clang/ARCMigrate/ARCMTActions.h b/clang/include/clang/ARCMigrate/ARCMTActions.h
index cfcf4e9..c830aa3 100644
--- a/clang/include/clang/ARCMigrate/ARCMTActions.h
+++ b/clang/include/clang/ARCMigrate/ARCMTActions.h
@@ -70,7 +70,7 @@
bool BeginInvocation(CompilerInstance &CI) override;
};
-} // namespace arcmt
-} // namespace clang
+}
+}
#endif
diff --git a/clang/include/clang/AST/ASTImporter.h b/clang/include/clang/AST/ASTImporter.h
index f215b1c..ee48955 100644
--- a/clang/include/clang/AST/ASTImporter.h
+++ b/clang/include/clang/AST/ASTImporter.h
@@ -290,6 +290,6 @@
bool IsStructurallyEquivalent(QualType From, QualType To,
bool Complain = true);
};
-} // namespace clang
+}
#endif // LLVM_CLANG_AST_ASTIMPORTER_H
diff --git a/clang/include/clang/AST/ASTLambda.h b/clang/include/clang/AST/ASTLambda.h
index 82294b1..69df2d8 100644
--- a/clang/include/clang/AST/ASTLambda.h
+++ b/clang/include/clang/AST/ASTLambda.h
@@ -75,6 +75,6 @@
return DC->getParent();
}
-} // namespace clang
+} // clang
#endif
diff --git a/clang/include/clang/AST/ASTVector.h b/clang/include/clang/AST/ASTVector.h
index cddb766..6ec0545 100644
--- a/clang/include/clang/AST/ASTVector.h
+++ b/clang/include/clang/AST/ASTVector.h
@@ -400,5 +400,5 @@
Capacity.setPointer(Begin+NewCapacity);
}
-} // namespace clang
+} // end: clang namespace
#endif
diff --git a/clang/include/clang/AST/BaseSubobject.h b/clang/include/clang/AST/BaseSubobject.h
index 585d786..da538e3 100644
--- a/clang/include/clang/AST/BaseSubobject.h
+++ b/clang/include/clang/AST/BaseSubobject.h
@@ -82,6 +82,6 @@
static const bool value = true;
};
-} // namespace llvm
+}
#endif
diff --git a/clang/include/clang/AST/CanonicalType.h b/clang/include/clang/AST/CanonicalType.h
index 4a25a06..b25800b 100644
--- a/clang/include/clang/AST/CanonicalType.h
+++ b/clang/include/clang/AST/CanonicalType.h
@@ -659,7 +659,7 @@
return CanProxy<Type>(*this);
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/DeclAccessPair.h b/clang/include/clang/AST/DeclAccessPair.h
index 3527a16..3c5056c 100644
--- a/clang/include/clang/AST/DeclAccessPair.h
+++ b/clang/include/clang/AST/DeclAccessPair.h
@@ -59,7 +59,7 @@
operator NamedDecl*() const { return getDecl(); }
NamedDecl *operator->() const { return getDecl(); }
};
-} // namespace clang
+}
// Take a moment to tell SmallVector that DeclAccessPair is POD.
namespace llvm {
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index 316f8d1..6b6ac3f 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -54,7 +54,7 @@
class StoredDeclsMap;
class TranslationUnitDecl;
class UsingDirectiveDecl;
-} // namespace clang
+}
namespace clang {
@@ -1799,7 +1799,7 @@
};
-} // namespace clang
+} // end clang.
namespace llvm {
diff --git a/clang/include/clang/AST/DeclFriend.h b/clang/include/clang/AST/DeclFriend.h
index 8a4105b..12b93b4 100644
--- a/clang/include/clang/AST/DeclFriend.h
+++ b/clang/include/clang/AST/DeclFriend.h
@@ -242,6 +242,6 @@
data().FirstFriend = FD;
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/DeclGroup.h b/clang/include/clang/AST/DeclGroup.h
index 621ba9f..bd3dbd8 100644
--- a/clang/include/clang/AST/DeclGroup.h
+++ b/clang/include/clang/AST/DeclGroup.h
@@ -134,7 +134,7 @@
}
};
-} // namespace clang
+} // end clang namespace
namespace llvm {
// DeclGroupRef is "like a pointer", implement PointerLikeTypeTraits.
@@ -151,5 +151,5 @@
}
enum { NumLowBitsAvailable = 0 };
};
-} // namespace llvm
+}
#endif
diff --git a/clang/include/clang/AST/DependentDiagnostic.h b/clang/include/clang/AST/DependentDiagnostic.h
index df2ca7b..8e038c8 100644
--- a/clang/include/clang/AST/DependentDiagnostic.h
+++ b/clang/include/clang/AST/DependentDiagnostic.h
@@ -184,6 +184,6 @@
return ddiag_range(ddiag_iterator(Map->FirstDiagnostic), ddiag_iterator());
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/EvaluatedExprVisitor.h b/clang/include/clang/AST/EvaluatedExprVisitor.h
index 1a7a130..5cae5d9e 100644
--- a/clang/include/clang/AST/EvaluatedExprVisitor.h
+++ b/clang/include/clang/AST/EvaluatedExprVisitor.h
@@ -124,6 +124,6 @@
EvaluatedExprVisitorBase<make_const_ptr, ImplClass>(Context) { }
};
-} // namespace clang
+}
#endif // LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H
diff --git a/clang/include/clang/AST/ExternalASTSource.h b/clang/include/clang/AST/ExternalASTSource.h
index 2cb25d1..9a760807 100644
--- a/clang/include/clang/AST/ExternalASTSource.h
+++ b/clang/include/clang/AST/ExternalASTSource.h
@@ -467,7 +467,7 @@
NumLowBitsAvailable = PointerLikeTypeTraits<T>::NumLowBitsAvailable - 1
};
};
-} // namespace llvm
+}
namespace clang {
/// \brief Represents a lazily-loaded vector of data.
diff --git a/clang/include/clang/AST/Mangle.h b/clang/include/clang/AST/Mangle.h
index ba6755d..c5a7ea1 100644
--- a/clang/include/clang/AST/Mangle.h
+++ b/clang/include/clang/AST/Mangle.h
@@ -240,6 +240,6 @@
static MicrosoftMangleContext *create(ASTContext &Context,
DiagnosticsEngine &Diags);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/NestedNameSpecifier.h b/clang/include/clang/AST/NestedNameSpecifier.h
index 4f593e4..4da17b0 100644
--- a/clang/include/clang/AST/NestedNameSpecifier.h
+++ b/clang/include/clang/AST/NestedNameSpecifier.h
@@ -510,6 +510,6 @@
return DB;
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/OperationKinds.h b/clang/include/clang/AST/OperationKinds.h
index b01f05e..e3f0126 100644
--- a/clang/include/clang/AST/OperationKinds.h
+++ b/clang/include/clang/AST/OperationKinds.h
@@ -350,6 +350,6 @@
OBC_BridgeRetained
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/ParentMap.h b/clang/include/clang/AST/ParentMap.h
index 721e6ef..8945c41 100644
--- a/clang/include/clang/AST/ParentMap.h
+++ b/clang/include/clang/AST/ParentMap.h
@@ -63,5 +63,5 @@
}
};
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/AST/Redeclarable.h b/clang/include/clang/AST/Redeclarable.h
index e19af1b..92046d5 100644
--- a/clang/include/clang/AST/Redeclarable.h
+++ b/clang/include/clang/AST/Redeclarable.h
@@ -272,6 +272,6 @@
bool isFirstDecl() const { return getFirstDecl() == this; }
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index 5c76f3f..d903b9d 100644
--- a/clang/include/clang/AST/Type.h
+++ b/clang/include/clang/AST/Type.h
@@ -67,7 +67,7 @@
template <>
struct isPodLike<clang::QualType> { static const bool value = true; };
-} // namespace llvm
+}
namespace clang {
class ASTContext;
@@ -1008,7 +1008,7 @@
static DestructionKind isDestructedTypeImpl(QualType type);
};
-} // namespace clang
+} // end clang.
namespace llvm {
/// Implement simplify_type for QualType, so that we can dyn_cast from QualType
diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h
index 932ee3f..e29fa49 100644
--- a/clang/include/clang/AST/TypeLoc.h
+++ b/clang/include/clang/AST/TypeLoc.h
@@ -1952,6 +1952,6 @@
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/AST/TypeOrdering.h b/clang/include/clang/AST/TypeOrdering.h
index 865e135..392e544 100644
--- a/clang/include/clang/AST/TypeOrdering.h
+++ b/clang/include/clang/AST/TypeOrdering.h
@@ -74,6 +74,6 @@
return LHS == RHS;
}
};
-} // namespace llvm
+}
#endif
diff --git a/clang/include/clang/AST/VTTBuilder.h b/clang/include/clang/AST/VTTBuilder.h
index 0ce2bc9..727bf51 100644
--- a/clang/include/clang/AST/VTTBuilder.h
+++ b/clang/include/clang/AST/VTTBuilder.h
@@ -157,6 +157,6 @@
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h b/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h
index 830f1d8..cc14c7b 100644
--- a/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h
+++ b/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h
@@ -44,6 +44,6 @@
void mapReachability(const CFGBlock *Dst);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/Analyses/Consumed.h b/clang/include/clang/Analysis/Analyses/Consumed.h
index 346cdb3..a710923 100644
--- a/clang/include/clang/Analysis/Analyses/Consumed.h
+++ b/clang/include/clang/Analysis/Analyses/Consumed.h
@@ -260,7 +260,6 @@
/// exactly once.
void run(AnalysisDeclContext &AC);
};
-} // namespace consumed
-} // namespace clang
+}} // end namespace clang::consumed
#endif
diff --git a/clang/include/clang/Analysis/Analyses/FormatString.h b/clang/include/clang/Analysis/Analyses/FormatString.h
index f59b45a..2e8058d 100644
--- a/clang/include/clang/Analysis/Analyses/FormatString.h
+++ b/clang/include/clang/Analysis/Analyses/FormatString.h
@@ -393,7 +393,7 @@
static bool namedTypeToLengthModifier(QualType QT, LengthModifier &LM);
};
-} // namespace analyze_format_string
+} // end analyze_format_string namespace
//===----------------------------------------------------------------------===//
/// Pieces specific to fprintf format strings.
@@ -529,7 +529,7 @@
bool hasValidPrecision() const;
bool hasValidFieldWidth() const;
};
-} // namespace analyze_printf
+} // end analyze_printf namespace
//===----------------------------------------------------------------------===//
/// Pieces specific to fscanf format strings.
@@ -595,7 +595,7 @@
static ScanfSpecifier Parse(const char *beg, const char *end);
};
-} // namespace analyze_scanf
+} // end analyze_scanf namespace
//===----------------------------------------------------------------------===//
// Parsing and processing of format strings (both fprintf and fscanf).
@@ -665,6 +665,6 @@
const char *beg, const char *end, const LangOptions &LO,
const TargetInfo &Target);
-} // namespace analyze_format_string
-} // namespace clang
+} // end analyze_format_string namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h b/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h
index d4b8c8b..a1c6504 100644
--- a/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h
+++ b/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h
@@ -109,7 +109,7 @@
static PostOrderCFGView *create(AnalysisDeclContext &analysisContext);
};
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h b/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h
index b4addd2..c4ec2f2 100644
--- a/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h
+++ b/clang/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h
@@ -40,6 +40,6 @@
bool Analyzed;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/Analyses/ReachableCode.h b/clang/include/clang/Analysis/Analyses/ReachableCode.h
index 1dd02e5..4c523bf 100644
--- a/clang/include/clang/Analysis/Analyses/ReachableCode.h
+++ b/clang/include/clang/Analysis/Analyses/ReachableCode.h
@@ -64,7 +64,6 @@
void FindUnreachableCode(AnalysisDeclContext &AC, Preprocessor &PP,
Callback &CB);
-} // namespace reachable_code
-} // namespace clang
+}} // end namespace clang::reachable_code
#endif
diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafety.h b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
index c19e34c..22694a7 100644
--- a/clang/include/clang/Analysis/Analyses/ThreadSafety.h
+++ b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
@@ -222,6 +222,5 @@
/// of access.
LockKind getLockKindFromAccessKind(AccessKind AK);
-} // namespace threadSafety
-} // namespace clang
+}} // end namespace clang::threadSafety
#endif
diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h
index 481568f..bc78021 100644
--- a/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h
+++ b/clang/include/clang/Analysis/Analyses/ThreadSafetyLogical.h
@@ -100,9 +100,9 @@
return lexpr::implies(this, RHS);
}
-} // namespace lexpr
-} // namespace threadSafety
-} // namespace clang
+}
+}
+}
#endif
diff --git a/clang/include/clang/Analysis/Analyses/UninitializedValues.h b/clang/include/clang/Analysis/Analyses/UninitializedValues.h
index 794c108..53ff20c 100644
--- a/clang/include/clang/Analysis/Analyses/UninitializedValues.h
+++ b/clang/include/clang/Analysis/Analyses/UninitializedValues.h
@@ -122,5 +122,5 @@
UninitVariablesHandler &handler,
UninitVariablesAnalysisStats &stats);
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/AnalysisContext.h b/clang/include/clang/Analysis/AnalysisContext.h
index 99a93a8..931190e 100644
--- a/clang/include/clang/Analysis/AnalysisContext.h
+++ b/clang/include/clang/Analysis/AnalysisContext.h
@@ -476,5 +476,5 @@
}
};
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Analysis/CFG.h b/clang/include/clang/Analysis/CFG.h
index bdedb4e..5430c3b 100644
--- a/clang/include/clang/Analysis/CFG.h
+++ b/clang/include/clang/Analysis/CFG.h
@@ -1109,5 +1109,5 @@
return F->nodes_end();
}
};
-} // namespace llvm
+} // end llvm namespace
#endif
diff --git a/clang/include/clang/Analysis/CFGStmtMap.h b/clang/include/clang/Analysis/CFGStmtMap.h
index 4a8ce9e..4dfa91d 100644
--- a/clang/include/clang/Analysis/CFGStmtMap.h
+++ b/clang/include/clang/Analysis/CFGStmtMap.h
@@ -48,5 +48,5 @@
}
};
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Analysis/CallGraph.h b/clang/include/clang/Analysis/CallGraph.h
index b8d923b..eda22a5 100644
--- a/clang/include/clang/Analysis/CallGraph.h
+++ b/clang/include/clang/Analysis/CallGraph.h
@@ -166,7 +166,7 @@
void dump() const;
};
-} // namespace clang
+} // end clang namespace
// Graph traits for iteration, viewing.
namespace llvm {
@@ -248,6 +248,6 @@
}
};
-} // namespace llvm
+} // end llvm namespace
#endif
diff --git a/clang/include/clang/Analysis/CodeInjector.h b/clang/include/clang/Analysis/CodeInjector.h
index 1c590de..413a55b 100644
--- a/clang/include/clang/Analysis/CodeInjector.h
+++ b/clang/include/clang/Analysis/CodeInjector.h
@@ -41,6 +41,6 @@
virtual Stmt *getBody(const FunctionDecl *D) = 0;
virtual Stmt *getBody(const ObjCMethodDecl *D) = 0;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h b/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h
index 6fac09d..8b3fcff 100644
--- a/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h
+++ b/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h
@@ -37,7 +37,6 @@
bool followsCreateRule(const FunctionDecl *FD);
}
-} // namespace ento
-} // namespace clang
+}} // end: "clang:ento"
#endif
diff --git a/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h b/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h
index 4076c72..f9e800a 100644
--- a/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h
+++ b/clang/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h
@@ -41,6 +41,6 @@
/// return.
bool isImplicitNoReturn(const ObjCMessageExpr *ME);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Analysis/Support/BumpVector.h b/clang/include/clang/Analysis/Support/BumpVector.h
index a39bef5..841adf6 100644
--- a/clang/include/clang/Analysis/Support/BumpVector.h
+++ b/clang/include/clang/Analysis/Support/BumpVector.h
@@ -240,5 +240,5 @@
Capacity = Begin+NewCapacity;
}
-} // namespace clang
+} // end: clang namespace
#endif
diff --git a/clang/include/clang/Basic/AddressSpaces.h b/clang/include/clang/Basic/AddressSpaces.h
index a90afdd..8dd7566 100644
--- a/clang/include/clang/Basic/AddressSpaces.h
+++ b/clang/include/clang/Basic/AddressSpaces.h
@@ -44,8 +44,8 @@
/// to target-specific ones.
typedef unsigned Map[Count];
-} // namespace LangAS
+}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index 993e0b9..27428ad 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -189,6 +189,6 @@
const char *Fmt) const;
};
-} // namespace Builtin
+}
} // end namespace clang
#endif
diff --git a/clang/include/clang/Basic/DiagnosticIDs.h b/clang/include/clang/Basic/DiagnosticIDs.h
index 2cff671..a675dfa 100644
--- a/clang/include/clang/Basic/DiagnosticIDs.h
+++ b/clang/include/clang/Basic/DiagnosticIDs.h
@@ -76,7 +76,7 @@
Remark ///< A diagnostic that indicates normal progress through
///< compilation.
};
- } // namespace diag
+ }
class DiagnosticMapping {
unsigned Severity : 3;
diff --git a/clang/include/clang/Basic/LLVM.h b/clang/include/clang/Basic/LLVM.h
index 0a4c96e..0e6ff92 100644
--- a/clang/include/clang/Basic/LLVM.h
+++ b/clang/include/clang/Basic/LLVM.h
@@ -47,7 +47,7 @@
class raw_ostream;
class raw_pwrite_stream;
// TODO: DenseMap, ...
-} // namespace llvm
+}
namespace clang {
diff --git a/clang/include/clang/Basic/OpenMPKinds.h b/clang/include/clang/Basic/OpenMPKinds.h
index 1808d86..e2f1151 100644
--- a/clang/include/clang/Basic/OpenMPKinds.h
+++ b/clang/include/clang/Basic/OpenMPKinds.h
@@ -117,7 +117,7 @@
/// \return true - the clause is a threadprivate clause, otherwise - false.
bool isOpenMPThreadPrivate(OpenMPClauseKind Kind);
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Basic/OperatorPrecedence.h b/clang/include/clang/Basic/OperatorPrecedence.h
index 4ee6d35..640749f 100644
--- a/clang/include/clang/Basic/OperatorPrecedence.h
+++ b/clang/include/clang/Basic/OperatorPrecedence.h
@@ -41,7 +41,7 @@
Multiplicative = 13, // *, /, %
PointerToMember = 14 // .*, ->*
};
-} // namespace prec
+}
/// \brief Return the precedence of the specified binary operator token.
prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator,
diff --git a/clang/include/clang/Basic/PlistSupport.h b/clang/include/clang/Basic/PlistSupport.h
index 9273c56..84dd291 100644
--- a/clang/include/clang/Basic/PlistSupport.h
+++ b/clang/include/clang/Basic/PlistSupport.h
@@ -113,7 +113,7 @@
EmitLocation(o, SM, R.getEnd(), FM, indent + 1);
Indent(o, indent) << "</array>\n";
}
-} // namespace markup
-} // namespace clang
+}
+}
#endif
diff --git a/clang/include/clang/Basic/PrettyStackTrace.h b/clang/include/clang/Basic/PrettyStackTrace.h
index c01be4b..6badae5 100644
--- a/clang/include/clang/Basic/PrettyStackTrace.h
+++ b/clang/include/clang/Basic/PrettyStackTrace.h
@@ -33,6 +33,6 @@
: SM(sm), Loc(L), Message(Msg) {}
void print(raw_ostream &OS) const override;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Basic/Sanitizers.h b/clang/include/clang/Basic/Sanitizers.h
index c249ad8..78c1ddb 100644
--- a/clang/include/clang/Basic/Sanitizers.h
+++ b/clang/include/clang/Basic/Sanitizers.h
@@ -44,7 +44,7 @@
const SanitizerMask ID##Group = 1ULL << SO_##ID##Group;
#include "clang/Basic/Sanitizers.def"
-} // namespace SanitizerKind
+}
struct SanitizerSet {
SanitizerSet();
diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h
index 288a271..3aea5ea 100644
--- a/clang/include/clang/Basic/SourceManager.h
+++ b/clang/include/clang/Basic/SourceManager.h
@@ -423,7 +423,7 @@
return E;
}
};
-} // namespace SrcMgr
+} // end SrcMgr namespace.
/// \brief External source of source location entries.
class ExternalSLocEntrySource {
diff --git a/clang/include/clang/Basic/TemplateKinds.h b/clang/include/clang/Basic/TemplateKinds.h
index 7a4084f..aed287b 100644
--- a/clang/include/clang/Basic/TemplateKinds.h
+++ b/clang/include/clang/Basic/TemplateKinds.h
@@ -38,7 +38,7 @@
TNK_Dependent_template_name
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Basic/TypeTraits.h b/clang/include/clang/Basic/TypeTraits.h
index e3cfd85..ef84d2b 100644
--- a/clang/include/clang/Basic/TypeTraits.h
+++ b/clang/include/clang/Basic/TypeTraits.h
@@ -94,6 +94,6 @@
UETT_AlignOf,
UETT_VecStep
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Basic/Version.h b/clang/include/clang/Basic/Version.h
index 744befe..02da432 100644
--- a/clang/include/clang/Basic/Version.h
+++ b/clang/include/clang/Basic/Version.h
@@ -77,6 +77,6 @@
/// for use in the CPP __VERSION__ macro, which includes the clang version
/// number, the repository version, and the vendor tag.
std::string getClangFullCPPVersion();
-} // namespace clang
+}
#endif // LLVM_CLANG_BASIC_VERSION_H
diff --git a/clang/include/clang/Basic/Visibility.h b/clang/include/clang/Basic/Visibility.h
index ac992f0..6ac52ed 100644
--- a/clang/include/clang/Basic/Visibility.h
+++ b/clang/include/clang/Basic/Visibility.h
@@ -136,6 +136,6 @@
if (withVis) mergeVisibility(other);
}
};
-} // namespace clang
+}
#endif // LLVM_CLANG_BASIC_VISIBILITY_H
diff --git a/clang/include/clang/CodeGen/BackendUtil.h b/clang/include/clang/CodeGen/BackendUtil.h
index 3a3ac1f..8586e77 100644
--- a/clang/include/clang/CodeGen/BackendUtil.h
+++ b/clang/include/clang/CodeGen/BackendUtil.h
@@ -35,6 +35,6 @@
const TargetOptions &TOpts, const LangOptions &LOpts,
StringRef TDesc, llvm::Module *M, BackendAction Action,
raw_pwrite_stream *OS);
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/CodeGen/CodeGenAction.h b/clang/include/clang/CodeGen/CodeGenAction.h
index 08ab634..264780d 100644
--- a/clang/include/clang/CodeGen/CodeGenAction.h
+++ b/clang/include/clang/CodeGen/CodeGenAction.h
@@ -98,6 +98,6 @@
EmitObjAction(llvm::LLVMContext *_VMContext = nullptr);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/CodeGen/ModuleBuilder.h b/clang/include/clang/CodeGen/ModuleBuilder.h
index 4557025..8facc3c8 100644
--- a/clang/include/clang/CodeGen/ModuleBuilder.h
+++ b/clang/include/clang/CodeGen/ModuleBuilder.h
@@ -45,6 +45,6 @@
const CodeGenOptions &CGO,
llvm::LLVMContext& C,
CoverageSourceInfo *CoverageInfo = nullptr);
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Driver/Multilib.h b/clang/include/clang/Driver/Multilib.h
index 0833198..20bb80d 100644
--- a/clang/include/clang/Driver/Multilib.h
+++ b/clang/include/clang/Driver/Multilib.h
@@ -168,8 +168,8 @@
};
raw_ostream &operator<<(raw_ostream &OS, const MultilibSet &MS);
-} // namespace driver
-} // namespace clang
+}
+}
#endif
diff --git a/clang/include/clang/Driver/Options.h b/clang/include/clang/Driver/Options.h
index c26592a..2716fa9 100644
--- a/clang/include/clang/Driver/Options.h
+++ b/clang/include/clang/Driver/Options.h
@@ -42,10 +42,10 @@
LastOption
#undef OPTION
};
-} // namespace options
+}
llvm::opt::OptTable *createDriverOptTable();
-} // namespace driver
-} // namespace clang
+}
+}
#endif
diff --git a/clang/include/clang/Edit/Commit.h b/clang/include/clang/Edit/Commit.h
index f512ef2..5cc5b9c 100644
--- a/clang/include/clang/Edit/Commit.h
+++ b/clang/include/clang/Edit/Commit.h
@@ -142,7 +142,7 @@
}
};
-} // namespace edit
+}
} // end namespace clang
diff --git a/clang/include/clang/Edit/EditedSource.h b/clang/include/clang/Edit/EditedSource.h
index 88905dc..150a5b4 100644
--- a/clang/include/clang/Edit/EditedSource.h
+++ b/clang/include/clang/Edit/EditedSource.h
@@ -82,7 +82,7 @@
FileEditsTy::iterator getActionForOffset(FileOffset Offs);
};
-} // namespace edit
+}
} // end namespace clang
diff --git a/clang/include/clang/Edit/EditsReceiver.h b/clang/include/clang/Edit/EditsReceiver.h
index 267c4b1..600ac28 100644
--- a/clang/include/clang/Edit/EditsReceiver.h
+++ b/clang/include/clang/Edit/EditsReceiver.h
@@ -28,7 +28,7 @@
virtual void remove(CharSourceRange range);
};
-} // namespace edit
+}
} // end namespace clang
diff --git a/clang/include/clang/Edit/FileOffset.h b/clang/include/clang/Edit/FileOffset.h
index c68c0c6..0c1e72b 100644
--- a/clang/include/clang/Edit/FileOffset.h
+++ b/clang/include/clang/Edit/FileOffset.h
@@ -54,7 +54,7 @@
}
};
-} // namespace edit
+}
} // end namespace clang
diff --git a/clang/include/clang/Edit/Rewriters.h b/clang/include/clang/Edit/Rewriters.h
index a41fc2d..5e3425f 100644
--- a/clang/include/clang/Edit/Rewriters.h
+++ b/clang/include/clang/Edit/Rewriters.h
@@ -34,7 +34,7 @@
bool rewriteToObjCSubscriptSyntax(const ObjCMessageExpr *Msg,
const NSAPI &NS, Commit &commit);
-} // namespace edit
+}
} // end namespace clang
diff --git a/clang/include/clang/Frontend/ASTConsumers.h b/clang/include/clang/Frontend/ASTConsumers.h
index 4c17cb6..757fcae 100644
--- a/clang/include/clang/Frontend/ASTConsumers.h
+++ b/clang/include/clang/Frontend/ASTConsumers.h
@@ -53,6 +53,6 @@
// to stderr; this is intended for debugging.
std::unique_ptr<ASTConsumer> CreateDeclContextPrinter();
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h b/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h
index 9c0c181..eb33273 100644
--- a/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h
+++ b/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h
@@ -67,6 +67,6 @@
}
};
-} // namespace clang
+} // end namspace clang
#endif
diff --git a/clang/include/clang/Frontend/CommandLineSourceLoc.h b/clang/include/clang/Frontend/CommandLineSourceLoc.h
index 29756e7..a78c96d2 100644
--- a/clang/include/clang/Frontend/CommandLineSourceLoc.h
+++ b/clang/include/clang/Frontend/CommandLineSourceLoc.h
@@ -51,7 +51,7 @@
}
};
-} // namespace clang
+}
namespace llvm {
namespace cl {
@@ -81,7 +81,7 @@
return false;
}
- } // namespace cl
-} // namespace llvm
+ }
+}
#endif
diff --git a/clang/include/clang/Frontend/DiagnosticRenderer.h b/clang/include/clang/Frontend/DiagnosticRenderer.h
index 142ecd4..84a0f50 100644
--- a/clang/include/clang/Frontend/DiagnosticRenderer.h
+++ b/clang/include/clang/Frontend/DiagnosticRenderer.h
@@ -172,5 +172,5 @@
virtual void emitNote(SourceLocation Loc, StringRef Message,
const SourceManager *SM) = 0;
};
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Frontend/FrontendOptions.h b/clang/include/clang/Frontend/FrontendOptions.h
index c59aff6..c3aa226 100644
--- a/clang/include/clang/Frontend/FrontendOptions.h
+++ b/clang/include/clang/Frontend/FrontendOptions.h
@@ -56,7 +56,7 @@
MigrateSource, ///< Run migrator.
RunPreprocessorOnly ///< Just lex, no output.
};
-} // namespace frontend
+}
enum InputKind {
IK_None,
diff --git a/clang/include/clang/Frontend/LangStandard.h b/clang/include/clang/Frontend/LangStandard.h
index 1e2841c..8021d08 100644
--- a/clang/include/clang/Frontend/LangStandard.h
+++ b/clang/include/clang/Frontend/LangStandard.h
@@ -32,7 +32,7 @@
ImplicitInt = (1 << 11)
};
-} // namespace frontend
+}
/// LangStandard - Information about the properties of a particular language
/// standard.
diff --git a/clang/include/clang/Frontend/LayoutOverrideSource.h b/clang/include/clang/Frontend/LayoutOverrideSource.h
index 167b4f2..16d032b 100644
--- a/clang/include/clang/Frontend/LayoutOverrideSource.h
+++ b/clang/include/clang/Frontend/LayoutOverrideSource.h
@@ -58,6 +58,6 @@
/// \brief Dump the overridden layouts.
void dump();
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Frontend/MigratorOptions.h b/clang/include/clang/Frontend/MigratorOptions.h
index cb24a02..8eb71b13 100644
--- a/clang/include/clang/Frontend/MigratorOptions.h
+++ b/clang/include/clang/Frontend/MigratorOptions.h
@@ -27,5 +27,5 @@
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h b/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
index 969bc6f..4c57e9d 100644
--- a/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
+++ b/clang/include/clang/Frontend/SerializedDiagnosticPrinter.h
@@ -37,7 +37,7 @@
DiagnosticOptions *Diags,
bool MergeChildRecords = false);
-} // namespace serialized_diags
-} // namespace clang
+} // end serialized_diags namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Frontend/SerializedDiagnosticReader.h b/clang/include/clang/Frontend/SerializedDiagnosticReader.h
index 320ac96..92e99d3 100644
--- a/clang/include/clang/Frontend/SerializedDiagnosticReader.h
+++ b/clang/include/clang/Frontend/SerializedDiagnosticReader.h
@@ -120,8 +120,8 @@
};
};
-} // namespace serialized_diags
-} // namespace clang
+} // end serialized_diags namespace
+} // end clang namespace
namespace std {
template <>
diff --git a/clang/include/clang/Frontend/SerializedDiagnostics.h b/clang/include/clang/Frontend/SerializedDiagnostics.h
index e614f45..2032cd3 100644
--- a/clang/include/clang/Frontend/SerializedDiagnostics.h
+++ b/clang/include/clang/Frontend/SerializedDiagnostics.h
@@ -53,7 +53,7 @@
/// \brief The serialized diagnostics version number.
enum { VersionNumber = 2 };
-} // namespace serialized_diags
-} // namespace clang
+} // end serialized_diags namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Frontend/TextDiagnosticBuffer.h b/clang/include/clang/Frontend/TextDiagnosticBuffer.h
index e733768..3bcf824 100644
--- a/clang/include/clang/Frontend/TextDiagnosticBuffer.h
+++ b/clang/include/clang/Frontend/TextDiagnosticBuffer.h
@@ -50,6 +50,6 @@
void FlushDiagnostics(DiagnosticsEngine &Diags) const;
};
-} // namespace clang
+} // end namspace clang
#endif
diff --git a/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h b/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h
index a491221..475f07f 100644
--- a/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h
+++ b/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h
@@ -273,6 +273,6 @@
const Diagnostic &Info) override;
};
-} // namespace clang
+} // end namspace clang
#endif
diff --git a/clang/include/clang/Lex/CodeCompletionHandler.h b/clang/include/clang/Lex/CodeCompletionHandler.h
index 67aedac..91c3b78 100644
--- a/clang/include/clang/Lex/CodeCompletionHandler.h
+++ b/clang/include/clang/Lex/CodeCompletionHandler.h
@@ -66,6 +66,6 @@
virtual void CodeCompleteNaturalLanguage() { }
};
-} // namespace clang
+}
#endif // LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H
diff --git a/clang/include/clang/Lex/ExternalPreprocessorSource.h b/clang/include/clang/Lex/ExternalPreprocessorSource.h
index e23a791..33e7a2d 100644
--- a/clang/include/clang/Lex/ExternalPreprocessorSource.h
+++ b/clang/include/clang/Lex/ExternalPreprocessorSource.h
@@ -38,6 +38,6 @@
virtual Module *getModule(unsigned ModuleID) = 0;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Lex/HeaderSearchOptions.h b/clang/include/clang/Lex/HeaderSearchOptions.h
index 7b5766c..c9c3260 100644
--- a/clang/include/clang/Lex/HeaderSearchOptions.h
+++ b/clang/include/clang/Lex/HeaderSearchOptions.h
@@ -38,7 +38,7 @@
ObjCXXSystem, ///< Like System, but only used for ObjC++.
After ///< Like System, but searched after the system directories.
};
-} // namespace frontend
+}
/// HeaderSearchOptions - Helper class for storing options related to the
/// initialization of the HeaderSearch object.
diff --git a/clang/include/clang/Lex/ModuleLoader.h b/clang/include/clang/Lex/ModuleLoader.h
index cd3dda1..ae79650 100644
--- a/clang/include/clang/Lex/ModuleLoader.h
+++ b/clang/include/clang/Lex/ModuleLoader.h
@@ -124,6 +124,6 @@
bool HadFatalFailure;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Lex/ModuleMap.h b/clang/include/clang/Lex/ModuleMap.h
index c2c81db..0bbcfac 100644
--- a/clang/include/clang/Lex/ModuleMap.h
+++ b/clang/include/clang/Lex/ModuleMap.h
@@ -466,5 +466,5 @@
module_iterator module_end() const { return Modules.end(); }
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Lex/TokenConcatenation.h b/clang/include/clang/Lex/TokenConcatenation.h
index 4f5771f6..a2d98b0 100644
--- a/clang/include/clang/Lex/TokenConcatenation.h
+++ b/clang/include/clang/Lex/TokenConcatenation.h
@@ -67,6 +67,6 @@
/// is literally 'L', 'u', 'U', or 'u8'.
bool IsIdentifierStringPrefix(const Token &Tok) const;
};
- } // namespace clang
+ } // end clang namespace
#endif
diff --git a/clang/include/clang/Rewrite/Core/HTMLRewrite.h b/clang/include/clang/Rewrite/Core/HTMLRewrite.h
index 8379514..dafdf51 100644
--- a/clang/include/clang/Rewrite/Core/HTMLRewrite.h
+++ b/clang/include/clang/Rewrite/Core/HTMLRewrite.h
@@ -75,7 +75,7 @@
/// reasonably close.
void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP);
-} // namespace html
-} // namespace clang
+} // end html namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Rewrite/Frontend/ASTConsumers.h b/clang/include/clang/Rewrite/Frontend/ASTConsumers.h
index 6037791..c9df889 100644
--- a/clang/include/clang/Rewrite/Frontend/ASTConsumers.h
+++ b/clang/include/clang/Rewrite/Frontend/ASTConsumers.h
@@ -43,6 +43,6 @@
bool SyntaxHighlight = true,
bool HighlightMacros = true);
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/Rewrite/Frontend/FixItRewriter.h b/clang/include/clang/Rewrite/Frontend/FixItRewriter.h
index 448ae29..3b1b31e 100644
--- a/clang/include/clang/Rewrite/Frontend/FixItRewriter.h
+++ b/clang/include/clang/Rewrite/Frontend/FixItRewriter.h
@@ -127,6 +127,6 @@
void Diag(SourceLocation Loc, unsigned DiagID);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/AnalysisBasedWarnings.h b/clang/include/clang/Sema/AnalysisBasedWarnings.h
index 5b1fbf3..64dd2d3 100644
--- a/clang/include/clang/Sema/AnalysisBasedWarnings.h
+++ b/clang/include/clang/Sema/AnalysisBasedWarnings.h
@@ -98,7 +98,6 @@
void PrintStats() const;
};
-} // namespace sema
-} // namespace clang
+}} // end namespace clang::sema
#endif
diff --git a/clang/include/clang/Sema/DelayedDiagnostic.h b/clang/include/clang/Sema/DelayedDiagnostic.h
index 6ae4308..155b3aa 100644
--- a/clang/include/clang/Sema/DelayedDiagnostic.h
+++ b/clang/include/clang/Sema/DelayedDiagnostic.h
@@ -291,7 +291,7 @@
bool pool_empty() const { return Diagnostics.empty(); }
};
-} // namespace sema
+}
/// Add a diagnostic to the current delay pool.
inline void Sema::DelayedDiagnostics::add(const sema::DelayedDiagnostic &diag) {
@@ -300,6 +300,6 @@
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h
index 4259ab0..5bfee8b 100644
--- a/clang/include/clang/Sema/Lookup.h
+++ b/clang/include/clang/Sema/Lookup.h
@@ -750,6 +750,6 @@
iterator end() { return iterator(Decls.end()); }
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/ObjCMethodList.h b/clang/include/clang/Sema/ObjCMethodList.h
index ef48b06..b618e38 100644
--- a/clang/include/clang/Sema/ObjCMethodList.h
+++ b/clang/include/clang/Sema/ObjCMethodList.h
@@ -53,6 +53,6 @@
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/Ownership.h b/clang/include/clang/Sema/Ownership.h
index fe91423..8acf9e8 100644
--- a/clang/include/clang/Sema/Ownership.h
+++ b/clang/include/clang/Sema/Ownership.h
@@ -103,7 +103,7 @@
return *this;
}
};
-} // namespace clang
+}
namespace llvm {
template <class T>
@@ -121,7 +121,7 @@
template <class T>
struct isPodLike<clang::OpaquePtr<T> > { static const bool value = true; };
-} // namespace llvm
+}
namespace clang {
// Basic
@@ -282,6 +282,6 @@
assert(!R.isInvalid() && "operation was asserted to never fail!");
return R.get();
}
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/ParsedTemplate.h b/clang/include/clang/Sema/ParsedTemplate.h
index 586f2d7..b36425f 100644
--- a/clang/include/clang/Sema/ParsedTemplate.h
+++ b/clang/include/clang/Sema/ParsedTemplate.h
@@ -209,6 +209,6 @@
/// Retrieves the range of the given template parameter lists.
SourceRange getTemplateParamsRange(TemplateParameterList const *const *Params,
unsigned NumParams);
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/PrettyDeclStackTrace.h b/clang/include/clang/Sema/PrettyDeclStackTrace.h
index 8e227a7..ca22e64 100644
--- a/clang/include/clang/Sema/PrettyDeclStackTrace.h
+++ b/clang/include/clang/Sema/PrettyDeclStackTrace.h
@@ -42,6 +42,6 @@
void print(raw_ostream &OS) const override;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index df5182b..07d65f4 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -198,7 +198,7 @@
class LambdaScopeInfo;
class PossiblyUnreachableDiag;
class TemplateDeductionInfo;
-} // namespace sema
+}
namespace threadSafety {
class BeforeSet;
diff --git a/clang/include/clang/Sema/SemaConsumer.h b/clang/include/clang/Sema/SemaConsumer.h
index f232c85..676646a 100644
--- a/clang/include/clang/Sema/SemaConsumer.h
+++ b/clang/include/clang/Sema/SemaConsumer.h
@@ -43,6 +43,6 @@
return Consumer->SemaConsumer;
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Sema/SemaFixItUtils.h b/clang/include/clang/Sema/SemaFixItUtils.h
index 4d85a63..343ccfb 100644
--- a/clang/include/clang/Sema/SemaFixItUtils.h
+++ b/clang/include/clang/Sema/SemaFixItUtils.h
@@ -87,5 +87,5 @@
}
};
-} // namespace clang
+} // endof namespace clang
#endif
diff --git a/clang/include/clang/Sema/SemaLambda.h b/clang/include/clang/Sema/SemaLambda.h
index 1e9a376..d043e2c 100644
--- a/clang/include/clang/Sema/SemaLambda.h
+++ b/clang/include/clang/Sema/SemaLambda.h
@@ -31,6 +31,6 @@
ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,
VarDecl *VarToCapture, Sema &S);
-} // namespace clang
+} // clang
#endif
diff --git a/clang/include/clang/Sema/Template.h b/clang/include/clang/Sema/Template.h
index 5307bf5..b822b11 100644
--- a/clang/include/clang/Sema/Template.h
+++ b/clang/include/clang/Sema/Template.h
@@ -513,6 +513,6 @@
VarTemplatePartialSpecializationDecl *PartialSpec);
void InstantiateEnumDefinition(EnumDecl *Enum, EnumDecl *Pattern);
};
-} // namespace clang
+}
#endif // LLVM_CLANG_SEMA_TEMPLATE_H
diff --git a/clang/include/clang/Sema/TypoCorrection.h b/clang/include/clang/Sema/TypoCorrection.h
index 814a85a..958aab0 100644
--- a/clang/include/clang/Sema/TypoCorrection.h
+++ b/clang/include/clang/Sema/TypoCorrection.h
@@ -355,6 +355,6 @@
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Serialization/ASTBitCodes.h b/clang/include/clang/Serialization/ASTBitCodes.h
index da217f1..83185a8 100644
--- a/clang/include/clang/Serialization/ASTBitCodes.h
+++ b/clang/include/clang/Serialization/ASTBitCodes.h
@@ -1481,7 +1481,7 @@
};
/// @}
- } // namespace serialization
+ }
} // end namespace clang
#endif
diff --git a/clang/include/clang/Serialization/ASTDeserializationListener.h b/clang/include/clang/Serialization/ASTDeserializationListener.h
index 3921331..4b10c39 100644
--- a/clang/include/clang/Serialization/ASTDeserializationListener.h
+++ b/clang/include/clang/Serialization/ASTDeserializationListener.h
@@ -53,6 +53,6 @@
/// \brief A module definition was read from the AST file.
virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) {}
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Serialization/ContinuousRangeMap.h b/clang/include/clang/Serialization/ContinuousRangeMap.h
index 05777e3..244b01b 100644
--- a/clang/include/clang/Serialization/ContinuousRangeMap.h
+++ b/clang/include/clang/Serialization/ContinuousRangeMap.h
@@ -134,6 +134,6 @@
friend class Builder;
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Serialization/GlobalModuleIndex.h b/clang/include/clang/Serialization/GlobalModuleIndex.h
index e11605a..7e20510 100644
--- a/clang/include/clang/Serialization/GlobalModuleIndex.h
+++ b/clang/include/clang/Serialization/GlobalModuleIndex.h
@@ -202,6 +202,6 @@
StringRef Path);
};
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/Serialization/ModuleManager.h b/clang/include/clang/Serialization/ModuleManager.h
index a5418ba..ea4b57f 100644
--- a/clang/include/clang/Serialization/ModuleManager.h
+++ b/clang/include/clang/Serialization/ModuleManager.h
@@ -330,7 +330,6 @@
void viewGraph();
};
-} // namespace serialization
- } // namespace clang
+} } // end namespace clang::serialization
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h b/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h
index 6602219..5850656 100644
--- a/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h
+++ b/clang/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h
@@ -228,9 +228,7 @@
static CallEffects getEffect(const FunctionDecl *FD);
};
-} // namespace objc_retain
-} // namespace ento
-} // namespace clang
+}}}
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
index 3e8a8c6..f02e48a 100644
--- a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
+++ b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
@@ -538,6 +538,6 @@
typedef IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef;
-} // namespace clang
+}
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index 28ae89d..308ac83 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -311,8 +311,8 @@
virtual void Profile(llvm::FoldingSetNodeID& hash) const;
};
-} // namespace ento
-} // namespace clang
+} // end ento namespace
+} // end clang namespace
namespace llvm {
template<> struct ilist_traits<clang::ento::BugReport>
@@ -331,7 +331,7 @@
private:
mutable ilist_half_node<clang::ento::BugReport> Sentinel;
};
-} // namespace llvm
+}
namespace clang {
namespace ento {
@@ -554,8 +554,8 @@
virtual BugReport::NodeResolver& getNodeResolver() = 0;
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
index 129c329f..83b05ec 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
@@ -357,9 +357,9 @@
bool isDeclRefExprToReference(const Expr *E);
-} // namespace bugreporter
+} // end namespace clang
} // end namespace ento
-} // namespace clang
+} // end namespace bugreporter
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
index a543052..16226e9 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
@@ -75,7 +75,7 @@
StringRef getDescription() const { return desc; }
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index d98dd78..941d524 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
@@ -842,8 +842,8 @@
void FullProfile(llvm::FoldingSetNodeID &ID) const;
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} //end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/Checker.h b/clang/include/clang/StaticAnalyzer/Core/Checker.h
index 4bd7653..099d763 100644
--- a/clang/include/clang/StaticAnalyzer/Core/Checker.h
+++ b/clang/include/clang/StaticAnalyzer/Core/Checker.h
@@ -411,7 +411,7 @@
}
};
-} // namespace check
+} // end check namespace
namespace eval {
@@ -446,7 +446,7 @@
}
};
-} // namespace eval
+} // end eval namespace
class CheckerBase : public ProgramPointTag {
CheckName Name;
@@ -528,8 +528,8 @@
DefaultBool &operator=(bool b) { val = b; return *this; }
};
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
index ed7c384..8a1a82b 100644
--- a/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
@@ -602,8 +602,8 @@
EventsTy Events;
};
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h b/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
index b2a2fbd..ce512fd 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
@@ -34,7 +34,7 @@
const Preprocessor &PP);
#include "clang/StaticAnalyzer/Core/Analyses.def"
-} // namespace ento
-} // namespace clang
+} // end 'ento' namespace
+} // end 'clang' namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h
index 164d7d5..cc8a9b8 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h
@@ -103,7 +103,7 @@
}
};
-} // namespace ento
-} // namespace clang
+} // end ento namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
index f307c10..3e0913e 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
@@ -128,8 +128,8 @@
}
};
-} // namespace ento
+} // enAnaCtxMgrspace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
index 8930258..5b007f1 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
@@ -193,8 +193,8 @@
const SVal* getPersistentSVal(SVal X);
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
index 3a0f4ef..1d779e6 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
@@ -53,8 +53,8 @@
friend class Factory;
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
index d4fbde0..63b8631 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -1027,6 +1027,6 @@
return Val.get();
}
};
-} // namespace llvm
+}
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
index 136e6d7..68274f5 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
@@ -304,8 +304,8 @@
}
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
index 92255de..6a42df2 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
@@ -36,8 +36,8 @@
return false;
}
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
index a92c3be..f876096 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
@@ -152,8 +152,8 @@
CreateRangeConstraintManager(ProgramStateManager &statemgr,
SubEngine *subengine);
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 7084fa0..d5822e2 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -541,7 +541,7 @@
}
};
-} // namespace ento
-} // namespace clang
+} // end ento namespace
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h
index accbe7d..e13c641 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h
@@ -46,7 +46,7 @@
}
};
-} // namespace ento
-} // namespace clang
+} // end ento
+} // end clang
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
index 946ec6f..cc3779d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
@@ -120,8 +120,8 @@
ProgramStateRef state);
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index 22b7d73..cfb1b92 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -433,9 +433,9 @@
inline const_iterator end() const { return Impl.end(); }
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
// GraphTraits
@@ -492,6 +492,6 @@
}
};
-} // namespace llvm
+} // end llvm namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index e980ab7..d8f1c34 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -613,8 +613,8 @@
static void *GDMIndex() { static int index = 0; return &index; }
};
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h
index 9e62119..faa3500 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h
@@ -135,7 +135,6 @@
};
-} // namespace ento
-} // namespace clang
+}} // end clang ento namespaces
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
index c57756e..4f07129 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
@@ -1345,9 +1345,9 @@
bool hasTrait(const MemRegion *MR, InvalidationKinds IK);
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
//===----------------------------------------------------------------------===//
// Pretty-printing regions.
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
index 4960237..ac4e452 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
@@ -813,8 +813,8 @@
bool scan(const SymExpr *sym);
};
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
index 56b5d6d..6b4da7d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
@@ -238,8 +238,8 @@
}
};
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
index d45cee0..a68d341 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
@@ -326,8 +326,8 @@
ASTContext &context,
ProgramStateManager &stateMgr);
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
index baeb09a..642e11a 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -457,7 +457,7 @@
}
};
-} // namespace nonloc
+} // end namespace ento::nonloc
//==------------------------------------------------------------------------==//
// Subclasses of Loc.
@@ -551,11 +551,11 @@
}
};
-} // namespace loc
+} // end ento::loc namespace
-} // namespace ento
+} // end ento namespace
-} // namespace clang
+} // end clang namespace
namespace llvm {
static inline raw_ostream &operator<<(raw_ostream &os,
@@ -569,6 +569,6 @@
static const bool value = true;
};
-} // namespace llvm
+} // end llvm namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index c41ac8e..a03b630 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -281,8 +281,8 @@
std::unique_ptr<StoreManager>
CreateFieldsOnlyRegionStoreManager(ProgramStateManager &StMgr);
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
index ed8af4a..958c8c3 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
@@ -47,6 +47,5 @@
const StoreManager &getStoreManager() const { return mgr; }
};
-} // namespace ento
-} // namespace clang
+}}
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
index d7aee40a..741ba0e 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
@@ -155,8 +155,8 @@
virtual void processEndWorklist(bool hasWorkRemaining) = 0;
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
index a933e65..1ca96a2 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
@@ -660,9 +660,9 @@
virtual ~SymbolVisitor();
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
namespace llvm {
static inline raw_ostream &operator<<(raw_ostream &os,
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
index cef8918..d39b501 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h
@@ -40,7 +40,7 @@
TaintManager() {}
};
-} // namespace ento
-} // namespace clang
+}
+}
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
index 609bbc8..4f1a60e 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
@@ -93,8 +93,8 @@
static WorkList *makeBFSBlockDFSContents();
};
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h b/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
index e37c747..37ea05f 100644
--- a/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
+++ b/clang/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h
@@ -42,8 +42,8 @@
std::unique_ptr<AnalysisASTConsumer>
CreateAnalysisConsumer(CompilerInstance &CI);
-} // namespace ento
+} // end GR namespace
-} // namespace clang
+} // end clang namespace
#endif
diff --git a/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h b/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
index c55c25e..36afb4b 100644
--- a/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
+++ b/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
@@ -53,7 +53,7 @@
void printCheckerHelp(raw_ostream &OS, ArrayRef<std::string> plugins);
-} // namespace ento
+} // end GR namespace
} // end namespace clang
diff --git a/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h b/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h
index 5723c2e..24f8042 100644
--- a/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h
+++ b/clang/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h
@@ -38,7 +38,7 @@
private:
llvm::StringMap<Stmt *> &Bodies;
};
-} // namespace ento
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp
index 81d1a28..8c2e0f4 100644
--- a/clang/lib/ARCMigrate/ObjCMT.cpp
+++ b/clang/lib/ARCMigrate/ObjCMT.cpp
@@ -177,7 +177,7 @@
}
};
-} // namespace
+}
ObjCMigrateAction::ObjCMigrateAction(FrontendAction *WrappedAction,
StringRef migrateDir,
@@ -379,7 +379,7 @@
return true;
}
};
-} // namespace
+}
void ObjCMigrateASTConsumer::migrateDecl(Decl *D) {
if (!D)
@@ -1853,7 +1853,7 @@
}
};
-} // namespace
+}
void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) {
@@ -2084,7 +2084,7 @@
LHS.Text == RHS.Text;
}
};
-} // namespace llvm
+}
namespace {
class RemapFileParser {
@@ -2166,7 +2166,7 @@
Entries.push_back(Entry);
}
};
-} // namespace
+}
static bool reportDiag(const Twine &Err, DiagnosticsEngine &Diag) {
Diag.Report(Diag.getCustomDiagID(DiagnosticsEngine::Error, "%0"))
diff --git a/clang/lib/ARCMigrate/TransAutoreleasePool.cpp b/clang/lib/ARCMigrate/TransAutoreleasePool.cpp
index 8e944110..a8a99fa 100644
--- a/clang/lib/ARCMigrate/TransAutoreleasePool.cpp
+++ b/clang/lib/ARCMigrate/TransAutoreleasePool.cpp
@@ -62,7 +62,7 @@
}
};
-} // namespace
+}
namespace {
diff --git a/clang/lib/ARCMigrate/Transforms.cpp b/clang/lib/ARCMigrate/Transforms.cpp
index dfae3f5..56d3af7 100644
--- a/clang/lib/ARCMigrate/Transforms.cpp
+++ b/clang/lib/ARCMigrate/Transforms.cpp
@@ -355,7 +355,7 @@
}
};
-} // namespace
+}
MigrationContext::~MigrationContext() {
for (traverser_iterator
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index 4da6240..0ebd377 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -550,7 +550,7 @@
void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C);
void visitVerbatimLineComment(const VerbatimLineComment *C);
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Utilities
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index 3c9899a..76e4e11 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -223,7 +223,7 @@
Expr *VisitMemberExpr(MemberExpr *E);
Expr *VisitCallExpr(CallExpr *E);
};
-} // namespace clang
+}
using namespace clang;
//----------------------------------------------------------------------------
@@ -296,7 +296,7 @@
return C2.getDiagnostics().Report(Loc, DiagID);
}
};
-} // namespace
+}
static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
QualType T1, QualType T2);
diff --git a/clang/lib/AST/CXXABI.h b/clang/lib/AST/CXXABI.h
index 2dab43c..dad2264 100644
--- a/clang/lib/AST/CXXABI.h
+++ b/clang/lib/AST/CXXABI.h
@@ -62,6 +62,6 @@
/// Creates an instance of a C++ ABI class.
CXXABI *CreateItaniumCXXABI(ASTContext &Ctx);
CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx);
-} // namespace clang
+}
#endif
diff --git a/clang/lib/AST/CXXInheritance.cpp b/clang/lib/AST/CXXInheritance.cpp
index b1c5a00..800c8f83 100644
--- a/clang/lib/AST/CXXInheritance.cpp
+++ b/clang/lib/AST/CXXInheritance.cpp
@@ -470,7 +470,7 @@
const CXXRecordDecl *InVirtualSubobject,
CXXFinalOverriderMap &Overriders);
};
-} // namespace
+}
void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
bool VirtualBase,
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 973d79f..d9a3389 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1350,7 +1350,7 @@
return LV;
}
};
-} // namespace clang
+}
static LinkageInfo getLVForDecl(const NamedDecl *D,
LVComputationKind computation) {
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index c2c590f..a1600cb 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -1259,7 +1259,7 @@
const SynthesizeIvarChunk &RHS) {
return LHS.Size < RHS.Size;
}
-} // namespace
+}
/// all_declared_ivar_begin - return first ivar declared in this class,
/// its extensions and its implementation. Lazily build the list on first
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 0ea946d..c3ce476 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -96,7 +96,7 @@
void prettyPrintAttributes(Decl *D);
void printDeclType(QualType T, StringRef DeclName, bool Pack = false);
};
-} // namespace
+}
void Decl::print(raw_ostream &Out, unsigned Indentation,
bool PrintInstantiation) const {
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 8f0c57b1..36f4139 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -188,7 +188,7 @@
SourceLocation (Expr::*v)() const) {
return static_cast<const E*>(expr)->getLocStart();
}
-} // namespace
+}
SourceLocation Expr::getExprLoc() const {
switch (getStmtClass()) {
@@ -2907,7 +2907,7 @@
HasSideEffects = true;
}
};
-} // namespace
+}
bool Expr::HasSideEffects(const ASTContext &Ctx,
bool IncludePossibleEffects) const {
@@ -3208,7 +3208,7 @@
NonTrivial = true;
}
};
-} // namespace
+}
bool Expr::hasNonTrivialCall(const ASTContext &Ctx) const {
NonTrivialCallFinder Finder(Ctx);
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index b69bc1c..8e472f1 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -791,7 +791,7 @@
};
typedef ScopeRAII<false> BlockScopeRAII;
typedef ScopeRAII<true> FullExpressionRAII;
-} // namespace
+}
bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E,
CheckSubobjectKind CSK) {
@@ -1091,7 +1091,7 @@
return false;
return LHS.Path == RHS.Path;
}
-} // namespace
+}
static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
@@ -3210,7 +3210,7 @@
/// Still scanning for 'case' or 'default' statement.
ESR_CaseNotFound
};
-} // namespace
+}
static bool EvaluateDecl(EvalInfo &Info, const Decl *D) {
if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
@@ -4314,7 +4314,7 @@
}
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Common base class for lvalue and temporary evaluation.
@@ -4411,7 +4411,7 @@
}
}
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// LValue Evaluation
@@ -5153,7 +5153,7 @@
bool VisitCXXConstructExpr(const CXXConstructExpr *E);
bool VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E);
};
-} // namespace
+}
/// Perform zero-initialization on an object of non-union class type.
/// C++11 [dcl.init]p5:
@@ -6645,7 +6645,7 @@
}
};
-} // namespace
+}
bool DataRecursiveIntBinOpEvaluator::
VisitBinOpLHSOnly(EvalResult &LHSResult, const BinaryOperator *E,
@@ -8640,7 +8640,7 @@
ICEDiag(ICEKind IK, SourceLocation l) : Kind(IK), Loc(l) {}
};
-} // namespace
+}
static ICEDiag NoDiag() { return ICEDiag(IK_ICE, SourceLocation()); }
diff --git a/clang/lib/AST/ItaniumCXXABI.cpp b/clang/lib/AST/ItaniumCXXABI.cpp
index 28cb6d8..7503cbf 100644
--- a/clang/lib/AST/ItaniumCXXABI.cpp
+++ b/clang/lib/AST/ItaniumCXXABI.cpp
@@ -153,7 +153,7 @@
return new ItaniumNumberingContext();
}
};
-} // namespace
+}
CXXABI *clang::CreateItaniumCXXABI(ASTContext &Ctx) {
return new ItaniumCXXABI(Ctx);
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 38c3ccb..e5a31f8 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -408,7 +408,7 @@
void mangleFunctionParam(const ParmVarDecl *parm);
};
-} // namespace
+}
bool ItaniumMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
diff --git a/clang/lib/AST/MicrosoftCXXABI.cpp b/clang/lib/AST/MicrosoftCXXABI.cpp
index 29229ee..aba6796 100644
--- a/clang/lib/AST/MicrosoftCXXABI.cpp
+++ b/clang/lib/AST/MicrosoftCXXABI.cpp
@@ -124,7 +124,7 @@
return new MicrosoftNumberingContext();
}
};
-} // namespace
+}
// getNumBases() seems to only give us the number of direct bases, and not the
// total. This function tells us if we inherit from anybody that uses MI, or if
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 01b1ed3..29a95a5 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -313,7 +313,7 @@
void mangleTemplateArg(const TemplateDecl *TD, const TemplateArgument &TA,
const NamedDecl *Parm);
};
-} // namespace
+}
bool MicrosoftMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
diff --git a/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp
index 0592621..50a0050 100644
--- a/clang/lib/AST/NestedNameSpecifier.cpp
+++ b/clang/lib/AST/NestedNameSpecifier.cpp
@@ -377,7 +377,7 @@
memcpy(&Result, static_cast<char *>(Data) + Offset, sizeof(void*));
return Result;
}
-} // namespace
+}
SourceRange NestedNameSpecifierLoc::getSourceRange() const {
if (!Qualifier)
@@ -470,7 +470,7 @@
reinterpret_cast<char *>(&Ptr) + sizeof(void *),
Buffer, BufferSize, BufferCapacity);
}
-} // namespace
+}
NestedNameSpecifierLocBuilder::
NestedNameSpecifierLocBuilder(const NestedNameSpecifierLocBuilder &Other)
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 31baed8..6f4a89f 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -190,7 +190,7 @@
(void) is_good(implements_getLocStart(&type::getLocStart))
#define ASSERT_IMPLEMENTS_getLocEnd(type) \
(void) is_good(implements_getLocEnd(&type::getLocEnd))
-} // namespace
+}
/// Check whether the various Stmt classes implement their member
/// functions.
@@ -239,7 +239,7 @@
return SourceRange(static_cast<const S*>(stmt)->getLocStart(),
static_cast<const S*>(stmt)->getLocEnd());
}
-} // namespace
+}
SourceRange Stmt::getSourceRange() const {
switch (getStmtClass()) {
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 36eb08c..658e3df 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -104,7 +104,7 @@
void Visit##CLASS(CLASS *Node);
#include "clang/AST/StmtNodes.inc"
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Stmt printing methods.
@@ -799,7 +799,7 @@
OS << ")";
}
}
-} // namespace
+}
//===----------------------------------------------------------------------===//
// OpenMP directives printing methods
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 47e161f..23f8d0c 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -65,7 +65,7 @@
/// \brief Visit a single template argument.
void VisitTemplateArgument(const TemplateArgument &Arg);
};
-} // namespace
+}
void StmtProfiler::VisitStmt(const Stmt *S) {
ID.AddInteger(S->getStmtClass());
@@ -425,7 +425,7 @@
void OMPClauseProfiler::VisitOMPFlushClause(const OMPFlushClause *C) {
VisitOMPClauseList(C);
}
-} // namespace
+}
void
StmtProfiler::VisitOMPExecutableDirective(const OMPExecutableDirective *S) {
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 097d012..3ac1171 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -597,7 +597,7 @@
return Visit(T->getOriginalType());
}
};
-} // namespace
+}
AutoType *Type::getContainedAutoType() const {
return GetContainedAutoVisitor().Visit(this);
@@ -2101,7 +2101,7 @@
L.hasLocalOrUnnamedType() | R.hasLocalOrUnnamedType());
}
};
-} // namespace
+}
static CachedProperties computeCachedProperties(const Type *T);
@@ -2143,7 +2143,7 @@
T->TypeBits.CachedLocalOrUnnamed = Result.hasLocalOrUnnamedType();
}
};
-} // namespace clang
+}
// Instantiate the friend template at a private class. In a
// reasonable implementation, these symbols will be internal.
diff --git a/clang/lib/AST/TypeLoc.cpp b/clang/lib/AST/TypeLoc.cpp
index f3d379a..c069eb0 100644
--- a/clang/lib/AST/TypeLoc.cpp
+++ b/clang/lib/AST/TypeLoc.cpp
@@ -33,7 +33,7 @@
}
#include "clang/AST/TypeLocNodes.def"
};
-} // namespace
+}
SourceRange TypeLoc::getLocalSourceRangeImpl(TypeLoc TL) {
if (TL.isNull()) return SourceRange();
@@ -50,7 +50,7 @@
}
#include "clang/AST/TypeLocNodes.def"
};
-} // namespace
+}
/// \brief Returns the alignment of the type source info data block.
unsigned TypeLoc::getLocalAlignmentForType(QualType Ty) {
@@ -68,7 +68,7 @@
}
#include "clang/AST/TypeLocNodes.def"
};
-} // namespace
+}
/// \brief Returns the size of the type source info data block.
unsigned TypeLoc::getFullDataSizeForType(QualType Ty) {
@@ -96,7 +96,7 @@
}
#include "clang/AST/TypeLocNodes.def"
};
-} // namespace
+}
/// \brief Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the
/// TypeLoc is a PointerLoc and next TypeLoc is for "int".
@@ -216,7 +216,7 @@
}
#include "clang/AST/TypeLocNodes.def"
};
-} // namespace
+}
/// \brief Determines if the given type loc corresponds to a
diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp
index a727a51..ebe09d8 100644
--- a/clang/lib/AST/TypePrinter.cpp
+++ b/clang/lib/AST/TypePrinter.cpp
@@ -108,7 +108,7 @@
void print##CLASS##After(const CLASS##Type *T, raw_ostream &OS);
#include "clang/AST/TypeNodes.def"
};
-} // namespace
+}
static void AppendTypeQualList(raw_ostream &OS, unsigned TypeQuals, bool C99) {
bool appendSpace = false;
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index ef3e5bb..ca5f0aa 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/lib/AST/VTableBuilder.cpp
@@ -2237,7 +2237,7 @@
Out << '\n';
}
-} // namespace
+}
VTableLayout::VTableLayout(uint64_t NumVTableComponents,
const VTableComponent *VTableComponents,
diff --git a/clang/lib/Analysis/BodyFarm.cpp b/clang/lib/Analysis/BodyFarm.cpp
index 77bb3ea..7d1b235 100644
--- a/clang/lib/Analysis/BodyFarm.cpp
+++ b/clang/lib/Analysis/BodyFarm.cpp
@@ -84,7 +84,7 @@
private:
ASTContext &C;
};
-} // namespace
+}
BinaryOperator *ASTMaker::makeAssignment(const Expr *LHS, const Expr *RHS,
QualType Ty) {
diff --git a/clang/lib/Analysis/BodyFarm.h b/clang/lib/Analysis/BodyFarm.h
index e5b554c..9137943 100644
--- a/clang/lib/Analysis/BodyFarm.h
+++ b/clang/lib/Analysis/BodyFarm.h
@@ -46,6 +46,6 @@
BodyMap Bodies;
CodeInjector *Injector;
};
-} // namespace clang
+}
#endif
diff --git a/clang/lib/Analysis/CallGraph.cpp b/clang/lib/Analysis/CallGraph.cpp
index 344146f..91a8492 100644
--- a/clang/lib/Analysis/CallGraph.cpp
+++ b/clang/lib/Analysis/CallGraph.cpp
@@ -225,4 +225,4 @@
}
};
-} // namespace llvm
+}
diff --git a/clang/lib/Analysis/Consumed.cpp b/clang/lib/Analysis/Consumed.cpp
index 5c892b2..fa985ee 100644
--- a/clang/lib/Analysis/Consumed.cpp
+++ b/clang/lib/Analysis/Consumed.cpp
@@ -941,8 +941,7 @@
StateMap->setState(Var, consumed::CS_Unknown);
}
}
-} // namespace consumed
-} // namespace clang
+}} // end clang::consumed::ConsumedStmtVisitor
namespace clang {
namespace consumed {
@@ -1468,5 +1467,4 @@
WarningsHandler.emitDiagnostics();
}
-} // namespace consumed
-} // namespace clang
+}} // end namespace clang::consumed
diff --git a/clang/lib/Analysis/FormatStringParsing.h b/clang/lib/Analysis/FormatStringParsing.h
index d5415217..e165296 100644
--- a/clang/lib/Analysis/FormatStringParsing.h
+++ b/clang/lib/Analysis/FormatStringParsing.h
@@ -68,7 +68,7 @@
const T &getValue() { return FS; }
};
-} // namespace analyze_format_string
-} // namespace clang
+} // end analyze_format_string namespace
+} // end clang namespace
#endif
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index 13af3be..0ab1580 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -44,7 +44,7 @@
void sortWorklist();
};
-} // namespace
+}
void DataflowWorklist::enqueueBlock(const clang::CFGBlock *block) {
if (block && !enqueuedBlocks[block->getBlockID()]) {
@@ -106,7 +106,7 @@
DSetFact(false), // This is a *major* performance win.
killAtAssign(KillAtAssign) {}
};
-} // namespace
+}
static LiveVariablesImpl &getImpl(void *x) {
return *((LiveVariablesImpl *) x);
@@ -135,7 +135,7 @@
}
return A;
}
-} // namespace
+}
void LiveVariables::Observer::anchor() { }
@@ -212,7 +212,7 @@
void VisitUnaryOperator(UnaryOperator *UO);
void Visit(Stmt *S);
};
-} // namespace
+}
static const VariableArrayType *FindVA(QualType Ty) {
const Type *ty = Ty.getTypePtr();
diff --git a/clang/lib/Analysis/ReachableCode.cpp b/clang/lib/Analysis/ReachableCode.cpp
index 795d674..8165b09 100644
--- a/clang/lib/Analysis/ReachableCode.cpp
+++ b/clang/lib/Analysis/ReachableCode.cpp
@@ -370,7 +370,7 @@
const Stmt *S,
clang::reachable_code::Callback &CB);
};
-} // namespace
+}
void DeadCodeScan::enqueue(const CFGBlock *block) {
unsigned blockID = block->getBlockID();
@@ -676,5 +676,4 @@
}
}
-} // namespace reachable_code
-} // namespace clang
+}} // end namespace clang::reachable_code
diff --git a/clang/lib/Analysis/ThreadSafetyLogical.cpp b/clang/lib/Analysis/ThreadSafetyLogical.cpp
index 9d84567..facfa11 100644
--- a/clang/lib/Analysis/ThreadSafetyLogical.cpp
+++ b/clang/lib/Analysis/ThreadSafetyLogical.cpp
@@ -109,4 +109,4 @@
}
}
}
-} // namespace clang
+}
diff --git a/clang/lib/Analysis/UninitializedValues.cpp b/clang/lib/Analysis/UninitializedValues.cpp
index df071c4..f2f7919 100644
--- a/clang/lib/Analysis/UninitializedValues.cpp
+++ b/clang/lib/Analysis/UninitializedValues.cpp
@@ -62,7 +62,7 @@
/// Returns the bit vector index for a given declaration.
Optional<unsigned> getValueIndex(const VarDecl *d) const;
};
-} // namespace
+}
void DeclToIndex::computeMap(const DeclContext &dc) {
unsigned count = 0;
@@ -223,7 +223,7 @@
void enqueueSuccessors(const CFGBlock *block);
const CFGBlock *dequeue();
};
-} // namespace
+}
void DataflowWorklist::enqueueSuccessors(const clang::CFGBlock *block) {
for (CFGBlock::const_succ_iterator I = block->succ_begin(),
@@ -345,7 +345,7 @@
return Init;
}
};
-} // namespace
+}
static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) {
if (VD->getType()->isRecordType()) return nullptr;
@@ -672,7 +672,7 @@
return Use;
}
};
-} // namespace
+}
void TransferFunctions::reportUse(const Expr *ex, const VarDecl *vd) {
Value v = vals[vd];
@@ -862,7 +862,7 @@
hadAnyUse = true;
}
};
-} // namespace
+}
void clang::runUninitializedVariablesAnalysis(
const DeclContext &dc,
diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp
index baee5aa..643503b 100644
--- a/clang/lib/Basic/DiagnosticIDs.cpp
+++ b/clang/lib/Basic/DiagnosticIDs.cpp
@@ -68,7 +68,7 @@
}
};
-} // namespace
+} // namespace anonymous
static const StaticDiagInfoRec StaticDiagInfo[] = {
#define DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, \
@@ -193,7 +193,7 @@
return StringRef(NameStr, NameLen);
}
};
-} // namespace
+}
// Unfortunately, the split between DiagnosticIDs and Diagnostic is not
// particularly clean, but for now we just implement this method here so we can
@@ -292,8 +292,8 @@
}
};
- } // namespace diag
-} // namespace clang
+ } // end diag namespace
+} // end clang namespace
//===----------------------------------------------------------------------===//
@@ -497,7 +497,7 @@
DiagGroupNames[NameOffset]);
}
};
-} // namespace
+}
// Second the table of options, sorted by name for fast binary lookup.
static const WarningOption OptionTable[] = {
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index c7bb2c6..b295008 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -122,7 +122,7 @@
KS_Enabled, // Enabled
KS_Future // Is a keyword in future standard
};
-} // namespace
+}
/// \brief Translates flags as specified in TokenKinds.def into keyword status
/// in the given language standard.
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp
index 7196f2d..8a882e1 100644
--- a/clang/lib/Basic/VirtualFileSystem.cpp
+++ b/clang/lib/Basic/VirtualFileSystem.cpp
@@ -213,7 +213,7 @@
return EC;
}
};
-} // namespace
+}
directory_iterator RealFileSystem::dir_begin(const Twine &Dir,
std::error_code &EC) {
@@ -1024,7 +1024,7 @@
JSONWriter(llvm::raw_ostream &OS) : OS(OS) {}
void write(ArrayRef<YAMLVFSEntry> Entries, Optional<bool> IsCaseSensitive);
};
-} // namespace
+}
bool JSONWriter::containedIn(StringRef Parent, StringRef Path) {
using namespace llvm::sys;
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index b133e93..f5edea7 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -149,7 +149,7 @@
const LangOptions &LangOpts;
};
-} // namespace
+}
static void addObjCARCAPElimPass(const PassManagerBuilder &Builder, PassManagerBase &PM) {
if (Builder.OptLevel > 0)
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp
index 57b92dd..da82249 100644
--- a/clang/lib/CodeGen/CGAtomic.cpp
+++ b/clang/lib/CodeGen/CGAtomic.cpp
@@ -272,7 +272,7 @@
void EmitAtomicUpdateOp(llvm::AtomicOrdering AO, RValue UpdateRal,
bool IsVolatile);
};
-} // namespace
+}
AtomicExpr::AtomicOrderingKind
AtomicInfo::translateAtomicOrdering(const llvm::AtomicOrdering AO) {
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index d3a3131..3fd344c 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -242,7 +242,7 @@
return LeftValue > RightValue;
}
-} // namespace
+}
/// Determines if the given type is safe for constant capture in C++.
static bool isSafeForCXXConstantCapture(QualType type) {
@@ -2249,7 +2249,7 @@
CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF);
}
};
-} // namespace
+}
/// Enter a cleanup to destroy a __block variable. Note that this
/// cleanup should be a no-op if the variable hasn't left the stack
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h
index ef43d1b..c4eed0d 100644
--- a/clang/lib/CodeGen/CGBlocks.h
+++ b/clang/lib/CodeGen/CGBlocks.h
@@ -37,7 +37,7 @@
class PointerType;
class Value;
class LLVMContext;
-} // namespace llvm
+}
namespace clang {
diff --git a/clang/lib/CodeGen/CGCUDANV.cpp b/clang/lib/CodeGen/CGCUDANV.cpp
index 0ffdb43..67d0ab7 100644
--- a/clang/lib/CodeGen/CGCUDANV.cpp
+++ b/clang/lib/CodeGen/CGCUDANV.cpp
@@ -74,7 +74,7 @@
llvm::Function *makeModuleDtorFunction() override;
};
-} // namespace
+}
CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM)
: CGCUDARuntime(CGM), Context(CGM.getLLVMContext()),
diff --git a/clang/lib/CodeGen/CGCUDARuntime.h b/clang/lib/CodeGen/CGCUDARuntime.h
index 05e36e6..dcacf97 100644
--- a/clang/lib/CodeGen/CGCUDARuntime.h
+++ b/clang/lib/CodeGen/CGCUDARuntime.h
@@ -59,7 +59,7 @@
/// Creates an instance of a CUDA runtime class.
CGCUDARuntime *CreateNVCUDARuntime(CodeGenModule &CGM);
-} // namespace CodeGen
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h
index b8f3dee..b6b4ee6 100644
--- a/clang/lib/CodeGen/CGCXXABI.h
+++ b/clang/lib/CodeGen/CGCXXABI.h
@@ -542,7 +542,7 @@
/// Creates a Microsoft-family ABI.
CGCXXABI *CreateMicrosoftCXXABI(CodeGenModule &CGM);
-} // namespace CodeGen
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 4fbcac1..58ef171 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2843,7 +2843,7 @@
}
};
-} // namespace
+}
struct DisableDebugLocationUpdates {
CodeGenFunction &CGF;
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index cfba8db..4d6a4e2 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -384,7 +384,7 @@
// external code might potentially access the vtable.
void VisitCXXThisExpr(const CXXThisExpr *E) { UsesThis = true; }
};
-} // namespace
+}
static bool BaseInitializerUsesThis(ASTContext &C, const Expr *Init) {
DynamicThisUseChecker Checker(C);
@@ -860,7 +860,7 @@
CodeGenFunction &CGF;
SanitizerSet OldSanOpts;
};
-} // namespace
+}
namespace {
class FieldMemcpyizer {
@@ -1228,7 +1228,7 @@
}
};
-} // namespace
+}
/// EmitCtorPrologue - This routine generates necessary code to initialize
/// base classes and non-static data members belonging to this constructor.
@@ -1531,7 +1531,7 @@
flags.isForNormalCleanup() && useEHCleanupForArray);
}
};
-} // namespace
+}
/// \brief Emit all code that comes at the end of class's
/// destructor. This is to call destructors on members and base classes
@@ -1892,7 +1892,7 @@
/*Delegating=*/true, Addr);
}
};
-} // namespace
+}
void
CodeGenFunction::EmitDelegatingCXXConstructorCall(const CXXConstructorDecl *Ctor,
@@ -1945,7 +1945,7 @@
/*Delegating=*/false, Addr);
}
};
-} // namespace
+}
void CodeGenFunction::PushDestructorCleanup(const CXXDestructorDecl *D,
llvm::Value *Addr) {
diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h
index 792cc07..81c6412 100644
--- a/clang/lib/CodeGen/CGCleanup.h
+++ b/clang/lib/CodeGen/CGCleanup.h
@@ -551,7 +551,7 @@
return stable_iterator(EndOfBuffer - ir.Ptr);
}
-} // namespace CodeGen
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 97c0f2a..07dbce4 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -522,7 +522,7 @@
CGF.EmitLifetimeEnd(Size, Addr);
}
};
-} // namespace
+}
/// EmitAutoVarWithLifetime - Does the setup required for an automatic
/// variable with lifetime.
@@ -1586,7 +1586,7 @@
ElementType, Destroyer);
}
};
-} // namespace
+}
/// pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy
/// already-constructed elements of the given array. The cleanup
@@ -1651,7 +1651,7 @@
CGF.EmitARCRelease(Param, Precise);
}
};
-} // namespace
+}
/// Emit an alloca (or GlobalValue depending on target)
/// for the specified parameter and set up LocalDeclMap.
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 935facb..4c85017 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -110,7 +110,7 @@
static const EHPersonality MSVC_C_specific_handler;
static const EHPersonality MSVC_CxxFrameHandler3;
};
-} // namespace
+}
const EHPersonality EHPersonality::GNU_C = { "__gcc_personality_v0", nullptr };
const EHPersonality
@@ -361,7 +361,7 @@
CGF.EmitNounwindRuntimeCall(getFreeExceptionFn(CGF.CGM), exn);
}
};
-} // namespace
+}
// Emits an exception expression into the given location. This
// differs from EmitAnyExprToMem only in that, if a final copy-ctor
@@ -1081,7 +1081,7 @@
CGF.EnsureInsertPoint();
}
};
-} // namespace
+}
/// Enters a finally block for an implementation using zero-cost
/// exceptions. This is mostly general, but hard-codes some
@@ -1332,7 +1332,7 @@
CGF.EmitCall(FnInfo, OutlinedFinally, ReturnValueSlot(), Args);
}
};
-} // namespace
+}
namespace {
/// Find all local variable captures in the statement.
@@ -1367,7 +1367,7 @@
Captures.push_back(ParentThis);
}
};
-} // namespace
+}
void CodeGenFunction::EmitCapturedLocals(CodeGenFunction &ParentCGF,
const Stmt *OutlinedStmt,
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 20c3c6b..1a76afa 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -2242,7 +2242,7 @@
/// Runtime conditionally aborts, always need to support recovery.
AlwaysRecoverable
};
-} // namespace
+}
static CheckRecoverableKind getRecoverableKind(SanitizerMask Kind) {
assert(llvm::countPopulation(Kind) == 1);
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index d3a4fd2..f0f706d 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -1213,7 +1213,7 @@
EmitNewDeleteCall(CGF, OperatorDelete, FPT, DeleteArgs);
}
};
-} // namespace
+}
/// Enter a cleanup to call 'operator delete' if the initializer in a
/// new-expression throws.
@@ -1437,7 +1437,7 @@
CGF.EmitDeleteCall(OperatorDelete, Ptr, ElementType);
}
};
-} // namespace
+}
void
CodeGenFunction::pushCallObjectDeleteCleanup(const FunctionDecl *OperatorDelete,
@@ -1564,7 +1564,7 @@
EmitNewDeleteCall(CGF, OperatorDelete, DeleteFTy, Args);
}
};
-} // namespace
+}
/// Emit the code for deleting an array of objects.
static void EmitArrayDelete(CodeGenFunction &CGF,
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index e88d624..acfb9b6 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -421,7 +421,7 @@
bool operator<(const BaseInfo &O) const { return Offset < O.Offset; }
};
-} // namespace
+}
void ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD,
bool IsPrimaryBase,
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 09f92ad..9981fcc 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -448,7 +448,7 @@
method);
}
};
-} // namespace
+}
/// StartObjCMethod - Begin emission of an ObjCMethod. This generates
/// the LLVM function and sets the other context used by
@@ -599,7 +599,7 @@
CharUnits IvarSize;
CharUnits IvarAlignment;
};
-} // namespace
+}
/// Pick an implementation strategy for the given property synthesis.
PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM,
@@ -1296,7 +1296,7 @@
flags.isForNormalCleanup() && useEHCleanupForArray);
}
};
-} // namespace
+}
/// Like CodeGenFunction::destroyARCStrong, but do it with a call.
static void destroyARCStrongWithStore(CodeGenFunction &CGF,
@@ -1724,7 +1724,7 @@
CGF.EmitARCRelease(object, ARCImpreciseLifetime);
}
};
-} // namespace
+}
/// Produce the code for a CK_ARCConsumeObject. Does a primitive
/// release at the end of the full-expression.
@@ -2340,7 +2340,7 @@
CGF.EmitObjCMRRAutoreleasePoolPop(Token);
}
};
-} // namespace
+}
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr) {
if (CGM.getLangOpts().ObjCAutoRefCount)
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 95326b3..a45446a 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -3500,7 +3500,7 @@
void emitWriteHazard();
void emitHazardsInNewBlocks();
};
-} // namespace
+}
/// Create the fragile-ABI read and write hazards based on the current
/// state of the function, which is presumed to be immediately prior
diff --git a/clang/lib/CodeGen/CGObjCRuntime.cpp b/clang/lib/CodeGen/CGObjCRuntime.cpp
index 009c0d9..5290a87 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.cpp
+++ b/clang/lib/CodeGen/CGObjCRuntime.cpp
@@ -167,7 +167,7 @@
CGF.EmitRuntimeCallOrInvoke(Fn);
}
};
-} // namespace
+}
void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
@@ -307,7 +307,7 @@
CGF.Builder.CreateCall(SyncExitFn, SyncArg)->setDoesNotThrow();
}
};
-} // namespace
+}
void CGObjCRuntime::EmitAtSynchronizedStmt(CodeGenFunction &CGF,
const ObjCAtSynchronizedStmt &S,
diff --git a/clang/lib/CodeGen/CGObjCRuntime.h b/clang/lib/CodeGen/CGObjCRuntime.h
index 396d8e8..4752546 100644
--- a/clang/lib/CodeGen/CGObjCRuntime.h
+++ b/clang/lib/CodeGen/CGObjCRuntime.h
@@ -295,6 +295,6 @@
//TODO: This should include some way of selecting which runtime to target.
CGObjCRuntime *CreateGNUObjCRuntime(CodeGenModule &CGM);
CGObjCRuntime *CreateMacObjCRuntime(CodeGenModule &CGM);
-} // namespace CodeGen
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/CodeGen/CGOpenCLRuntime.h b/clang/lib/CodeGen/CGOpenCLRuntime.h
index 54d979f..0c50b92 100644
--- a/clang/lib/CodeGen/CGOpenCLRuntime.h
+++ b/clang/lib/CodeGen/CGOpenCLRuntime.h
@@ -46,7 +46,7 @@
virtual llvm::Type *convertOpenCLSpecificType(const Type *T);
};
-} // namespace CodeGen
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
index b28770e..c89d5cc 100644
--- a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
@@ -212,7 +212,7 @@
CGRecordLowering(const CGRecordLowering &) = delete;
void operator =(const CGRecordLowering &) = delete;
};
-} // namespace
+} // namespace {
CGRecordLowering::CGRecordLowering(CodeGenTypes &Types, const RecordDecl *D, bool Packed)
: Types(Types), Context(Types.getContext()), D(D),
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 89d01a1..54e6b73 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -258,7 +258,7 @@
};
void BackendConsumer::anchor() {}
-} // namespace clang
+}
/// ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr
/// buffer to be a valid FullSourceLoc.
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 79a1dcb..2dd5414 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1435,7 +1435,7 @@
return true;
}
};
-} // namespace
+}
// isTriviallyRecursive - Check if this function calls another
// decl that, because of the asm attribute or the other decl being a builtin,
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 28582f5..8e671fa 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -44,7 +44,7 @@
class FunctionType;
class LLVMContext;
class IndexedInstrProfReader;
-} // namespace llvm
+}
namespace clang {
class TargetCodeGenInfo;
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 51b44b7..f182a46 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -605,7 +605,7 @@
RecordNextStmtCount = true;
}
};
-} // namespace
+}
void PGOHash::combine(HashType Type) {
// Check that we never combine 0 and only have six bits.
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 92c206d..9ad5d14 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -884,7 +884,7 @@
// propagate counts into them.
}
};
-} // namespace
+}
static bool isMachO(const CodeGenModule &CGM) {
return CGM.getTarget().getTriple().isOSBinFormatMachO();
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index a6de477..3f5ad5d 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -336,7 +336,7 @@
// ARM64 libraries are prepared for non-unique RTTI.
bool shouldRTTIBeUnique() const override { return false; }
};
-} // namespace
+}
CodeGen::CGCXXABI *CodeGen::CreateItaniumCXXABI(CodeGenModule &CGM) {
switch (CGM.getTarget().getCXXABI().getKind()) {
@@ -1743,7 +1743,7 @@
Guard);
}
};
-} // namespace
+}
/// The ARM code here follows the Itanium code closely enough that we
/// just special-case it at particular places.
@@ -2250,7 +2250,7 @@
/// \param Force - true to force the creation of this RTTI value
llvm::Constant *BuildTypeInfo(QualType Ty, bool Force = false);
};
-} // namespace
+}
llvm::GlobalVariable *ItaniumRTTIBuilder::GetAddrOfTypeName(
QualType Ty, llvm::GlobalVariable::LinkageTypes Linkage) {
@@ -3347,7 +3347,7 @@
CGF.EmitRuntimeCallOrInvoke(getEndCatchFn(CGF.CGM));
}
};
-} // namespace
+}
/// Emits a call to __cxa_begin_catch and enters a cleanup to call
/// __cxa_end_catch.
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index f085a90..679516b 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -707,7 +707,7 @@
llvm::StructType *CatchHandlerTypeType;
};
-} // namespace
+}
CGCXXABI::RecordArgABI
MicrosoftCXXABI::getRecordArgABI(const CXXRecordDecl *RD) const {
@@ -2195,7 +2195,7 @@
CGF.EmitNounwindRuntimeCall(getInitThreadAbortFn(CGF.CGM), Guard);
}
};
-} // namespace
+}
void MicrosoftCXXABI::EmitGuardedInit(CodeGenFunction &CGF, const VarDecl &D,
llvm::GlobalVariable *GV,
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp
index 158ee90..25e5740 100644
--- a/clang/lib/CodeGen/ModuleBuilder.cpp
+++ b/clang/lib/CodeGen/ModuleBuilder.cpp
@@ -232,7 +232,7 @@
Builder->AddDependentLib(Lib);
}
};
-} // namespace
+}
void CodeGenerator::anchor() { }
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index d4d0e78..00fe2bf 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -685,7 +685,7 @@
}
};
-} // namespace
+}
/// Rewrite input constraint references after adding some output constraints.
/// In the case where there is one output and one input and we add one output,
@@ -1768,7 +1768,7 @@
addStackProbeSizeTargetAttribute(D, GV, CGM);
}
-} // namespace
+}
void X86_64ABIInfo::postMerge(unsigned AggregateSize, Class &Lo,
Class &Hi) const {
@@ -3173,7 +3173,7 @@
}
};
-} // namespace
+}
llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr,
QualType Ty,
@@ -3453,7 +3453,7 @@
}
};
-} // namespace
+}
// Return true if the ABI requires Ty to be passed sign- or zero-
// extended to 64 bits.
@@ -3999,7 +3999,7 @@
bool doesReturnSlotInterfereWithArgs() const override { return false; }
};
-} // namespace
+}
ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const {
Ty = useFirstFieldIfTransparentUnion(Ty);
@@ -4627,7 +4627,7 @@
ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM);
addStackProbeSizeTargetAttribute(D, GV, CGM);
}
-} // namespace
+}
void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const {
if (!getCXXABI().classifyReturnType(FI))
@@ -5201,7 +5201,7 @@
// Append metadata to nvvm.annotations
MD->addOperand(llvm::MDNode::get(Ctx, MDVals));
}
-} // namespace
+}
//===----------------------------------------------------------------------===//
// SystemZ ABI Implementation
@@ -5242,7 +5242,7 @@
: TargetCodeGenInfo(new SystemZABIInfo(CGT, HasVector)) {}
};
-} // namespace
+}
bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const {
// Treat an enum type as its underlying type.
@@ -5552,7 +5552,7 @@
CodeGen::CodeGenModule &M) const override;
};
-} // namespace
+}
void MSP430TargetCodeGenInfo::setTargetAttributes(const Decl *D,
llvm::GlobalValue *GV,
@@ -5634,7 +5634,7 @@
return SizeOfUnwindException;
}
};
-} // namespace
+}
void MipsABIInfo::CoerceToIntArgs(
uint64_t TySize, SmallVectorImpl<llvm::Type *> &ArgList) const {
@@ -6001,7 +6001,7 @@
}
}
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Hexagon ABI Implementation
@@ -6036,7 +6036,7 @@
}
};
-} // namespace
+}
void HexagonABIInfo::computeInfo(CGFunctionInfo &FI) const {
if (!getCXXABI().classifyReturnType(FI))
@@ -6150,7 +6150,7 @@
CodeGen::CodeGenModule &M) const override;
};
-} // namespace
+}
void AMDGPUTargetCodeGenInfo::setTargetAttributes(
const Decl *D,
diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h
index 97ac042..bf63265 100644
--- a/clang/lib/CodeGen/TargetInfo.h
+++ b/clang/lib/CodeGen/TargetInfo.h
@@ -226,6 +226,6 @@
return 0;
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 2ba969d..2367914 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2322,7 +2322,7 @@
/// on this runtime library name.
OMPRT_IOMP5
};
-} // namespace
+}
/// Compute the desired OpenMP runtime from the flag provided.
static OpenMPRuntimeKind getOpenMPRuntime(const ToolChain &TC,
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 58ee29b..753f542 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -234,7 +234,7 @@
const char* getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch);
void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple);
-} // namespace arm
+}
namespace mips {
typedef enum {
@@ -252,7 +252,7 @@
StringRef ABIName, StringRef FloatABI);
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
StringRef CPUName, StringRef ABIName, StringRef FloatABI);
-} // namespace mips
+}
namespace ppc {
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
@@ -371,7 +371,7 @@
const char *LinkingOutput) const override;
};
-} // namespace darwin
+}
/// openbsd -- Directly call GNU Binutils assembler and linker
namespace openbsd {
@@ -516,7 +516,7 @@
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-} // namespace gnutools
+}
namespace nacltools {
class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble {
@@ -542,7 +542,7 @@
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-} // namespace nacltools
+}
/// minix -- Directly call GNU Binutils assembler and linker
namespace minix {
@@ -731,7 +731,7 @@
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-} // namespace CrossWindows
+}
/// SHAVE tools -- Directly call moviCompile and moviAsm
namespace SHAVE {
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 7ad2fec..0feeaa0 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -293,8 +293,8 @@
return Seq[Index];
}
};
-} // namespace yaml
-} // namespace llvm
+}
+}
namespace clang {
namespace format {
diff --git a/clang/lib/Frontend/ASTConsumers.cpp b/clang/lib/Frontend/ASTConsumers.cpp
index 28771e2..52776b6 100644
--- a/clang/lib/Frontend/ASTConsumers.cpp
+++ b/clang/lib/Frontend/ASTConsumers.cpp
@@ -158,7 +158,7 @@
void HandleTopLevelSingleDecl(Decl *D);
};
-} // namespace
+}
void ASTViewer::HandleTopLevelSingleDecl(Decl *D) {
if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) {
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 3cf202d..01c56bd 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -96,7 +96,7 @@
/// \brief Erase temporary files and the preamble file.
void Cleanup();
};
-} // namespace
+}
static llvm::sys::SmartMutex<false> &getOnDiskMutex() {
static llvm::sys::SmartMutex<false> M(/* recursive = */ true);
@@ -972,7 +972,7 @@
}
};
-} // namespace
+}
std::unique_ptr<ASTConsumer>
PrecompilePreambleAction::CreateASTConsumer(CompilerInstance &CI,
@@ -2123,7 +2123,7 @@
return Next.getCodeCompletionTUInfo();
}
};
-} // namespace
+}
/// \brief Helper function that computes which global names are hidden by the
/// local code-completion results.
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index 1b20df6..be30d43 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -71,7 +71,7 @@
void ReadMethodPool(Selector Sel) override;
bool LookupUnqualified(LookupResult &R, Scope *S) override;
};
-} // namespace
+}
static ASTReader *
createASTReader(CompilerInstance &CI, StringRef pchFile,
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 514484a..250c992 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1910,7 +1910,7 @@
llvm::APInt getAsInteger() const;
};
-} // namespace
+}
void ModuleSignature::add(uint64_t Value, unsigned int NumBits) {
CurValue |= Value << CurBit;
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp
index 30fdf94..0995ab4 100644
--- a/clang/lib/Frontend/DependencyFile.cpp
+++ b/clang/lib/Frontend/DependencyFile.cpp
@@ -198,7 +198,7 @@
bool visitInputFile(StringRef Filename, bool isSystem,
bool isOverridden) override;
};
-} // namespace
+}
DependencyFileGenerator::DependencyFileGenerator(void *Impl)
: Impl(Impl) { }
diff --git a/clang/lib/Frontend/DependencyGraph.cpp b/clang/lib/Frontend/DependencyGraph.cpp
index f384f49..67a977e 100644
--- a/clang/lib/Frontend/DependencyGraph.cpp
+++ b/clang/lib/Frontend/DependencyGraph.cpp
@@ -57,7 +57,7 @@
}
};
-} // namespace
+}
void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile,
StringRef SysRoot) {
diff --git a/clang/lib/Frontend/DiagnosticRenderer.cpp b/clang/lib/Frontend/DiagnosticRenderer.cpp
index 5290837..c63e98d 100644
--- a/clang/lib/Frontend/DiagnosticRenderer.cpp
+++ b/clang/lib/Frontend/DiagnosticRenderer.cpp
@@ -87,7 +87,7 @@
}
};
-} // namespace
+}
static void mergeFixits(ArrayRef<FixItHint> FixItHints,
const SourceManager &SM, const LangOptions &LangOpts,
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index bcfd77e..6f202a15 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -554,7 +554,7 @@
}
#undef DUMP_BOOLEAN
};
-} // namespace
+}
void DumpModuleInfoAction::ExecuteAction() {
// Set up the output file.
diff --git a/clang/lib/Frontend/HeaderIncludeGen.cpp b/clang/lib/Frontend/HeaderIncludeGen.cpp
index f0a2cc6..5732e5b 100644
--- a/clang/lib/Frontend/HeaderIncludeGen.cpp
+++ b/clang/lib/Frontend/HeaderIncludeGen.cpp
@@ -44,7 +44,7 @@
SrcMgr::CharacteristicKind FileType,
FileID PrevFID) override;
};
-} // namespace
+}
void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders,
StringRef OutputPath, bool ShowDepth,
diff --git a/clang/lib/Frontend/ModuleDependencyCollector.cpp b/clang/lib/Frontend/ModuleDependencyCollector.cpp
index 539f9b0..67852dc 100644
--- a/clang/lib/Frontend/ModuleDependencyCollector.cpp
+++ b/clang/lib/Frontend/ModuleDependencyCollector.cpp
@@ -35,7 +35,7 @@
bool visitInputFile(StringRef Filename, bool IsSystem,
bool IsOverridden) override;
};
-} // namespace
+}
void ModuleDependencyCollector::attachToASTReader(ASTReader &R) {
R.addListener(llvm::make_unique<ModuleDependencyListener>(*this));
diff --git a/clang/lib/Frontend/Rewrite/FixItRewriter.cpp b/clang/lib/Frontend/Rewrite/FixItRewriter.cpp
index 3b8a207..dc787ac 100644
--- a/clang/lib/Frontend/Rewrite/FixItRewriter.cpp
+++ b/clang/lib/Frontend/Rewrite/FixItRewriter.cpp
@@ -69,7 +69,7 @@
}
};
-} // namespace
+}
bool FixItRewriter::WriteFixedFiles(
std::vector<std::pair<std::string, std::string> > *RewrittenFiles) {
diff --git a/clang/lib/Frontend/Rewrite/HTMLPrint.cpp b/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
index b270611..22ccfe6 100644
--- a/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
+++ b/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
@@ -45,7 +45,7 @@
void Initialize(ASTContext &context) override;
void HandleTranslationUnit(ASTContext &Ctx) override;
};
-} // namespace
+}
std::unique_ptr<ASTConsumer> clang::CreateHTMLPrinter(raw_ostream *OS,
Preprocessor &PP,
diff --git a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
index cfd790c..e13cdb3 100644
--- a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
+++ b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
@@ -609,7 +609,7 @@
}
};
-} // namespace
+}
void RewriteModernObjC::RewriteBlocksInFunctionProtoType(QualType funcType,
NamedDecl *D) {
diff --git a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
index 56f0606..b2a45b4 100644
--- a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
+++ b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
@@ -540,7 +540,7 @@
std::string &Result) override;
Stmt *RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) override;
};
-} // namespace
+}
void RewriteObjC::RewriteBlocksInFunctionProtoType(QualType funcType,
NamedDecl *D) {
diff --git a/clang/lib/Frontend/SerializedDiagnosticReader.cpp b/clang/lib/Frontend/SerializedDiagnosticReader.cpp
index 75fce89..0ebbd22 100644
--- a/clang/lib/Frontend/SerializedDiagnosticReader.cpp
+++ b/clang/lib/Frontend/SerializedDiagnosticReader.cpp
@@ -287,7 +287,7 @@
llvm_unreachable("Unknown error type!");
}
};
-} // namespace
+}
static llvm::ManagedStatic<SDErrorCategoryType> ErrorCategory;
const std::error_category &clang::serialized_diags::SDErrorCategory() {
diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
index b673efc..55df936 100644
--- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
+++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
@@ -301,7 +301,7 @@
const char *PEnd; // previous next/search subject end (1-past)
};
-} // namespace
+} // namespace anonymous
/// ParseDirective - Go through the comment and see if it indicates expected
/// diagnostics. If so, then put them in the appropriate directive list.
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 4ef0674..306401c 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -1069,7 +1069,7 @@
bool parseModuleMapFile();
};
-} // namespace clang
+}
SourceLocation ModuleMapParser::consumeToken() {
retry:
@@ -1263,7 +1263,7 @@
/// \brief The 'exhaustive' attribute.
AT_exhaustive
};
-} // namespace
+}
/// \brief Parse a module declaration.
///
diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp
index df7eec2..44513023 100644
--- a/clang/lib/Lex/PPExpressions.cpp
+++ b/clang/lib/Lex/PPExpressions.cpp
@@ -52,7 +52,7 @@
void setEnd(SourceLocation L) { Range.setEnd(L); }
};
-} // namespace
+}
static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
Token &PeekTok, bool ValueLive,
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index c2750f6..5f63d35 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/lib/Lex/PTHLexer.cpp
@@ -721,7 +721,7 @@
return CacheExists;
}
};
-} // namespace clang
+}
std::unique_ptr<FileSystemStatCache> PTHManager::createStatCache() {
return llvm::make_unique<PTHStatCache>(*FileLookup);
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 9e3d7b0..5eb6655 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -157,7 +157,7 @@
Failed = true;
}
};
-} // namespace
+}
/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then
/// return the first token after the directive. The _Pragma token has just
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp
index 824546a..a423041 100644
--- a/clang/lib/Lex/PreprocessingRecord.cpp
+++ b/clang/lib/Lex/PreprocessingRecord.cpp
@@ -195,7 +195,7 @@
}
};
-} // namespace
+}
unsigned PreprocessingRecord::findBeginLocalPreprocessedEntity(
SourceLocation Loc) const {
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 6ccd7a9..da759c7 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -485,7 +485,7 @@
Token NextToken;
bool AllowNonTypes;
};
-} // namespace
+}
/// \brief Parse a cast-expression, or, if \pisUnaryExpression is true, parse
/// a unary-expression.
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index d35d658..b658cef 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -142,7 +142,7 @@
private:
Token NextToken;
};
-} // namespace
+}
StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts,
diff --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp
index b89e446..8cdae6a 100644
--- a/clang/lib/Parse/ParseStmtAsm.cpp
+++ b/clang/lib/Parse/ParseStmtAsm.cpp
@@ -174,7 +174,7 @@
TheParser.Diag(Loc, diag::err_inline_ms_asm_parsing) << D.getMessage();
}
};
-} // namespace
+}
/// Parse an identifier in an MS-style inline assembly block.
///
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 76afcda..d63cf24 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -1023,7 +1023,7 @@
return CorrectionCandidateCallback::ValidateCandidate(Candidate);
}
};
-} // namespace
+}
/// isCXXDeclarationSpecifier - Returns TPResult::True if it is a declaration
/// specifier, TPResult::False if it is not, TPResult::Ambiguous if it could
/// be either a decl-specifier or a function-style cast, and TPResult::Error
diff --git a/clang/lib/Rewrite/DeltaTree.cpp b/clang/lib/Rewrite/DeltaTree.cpp
index 4ff3d7d..352fab0 100644
--- a/clang/lib/Rewrite/DeltaTree.cpp
+++ b/clang/lib/Rewrite/DeltaTree.cpp
@@ -149,7 +149,7 @@
static inline bool classof(const DeltaTreeNode *N) { return !N->isLeaf(); }
};
-} // namespace
+}
/// Destroy - A 'virtual' destructor.
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index 8c5589b4..36030b9 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -99,7 +99,7 @@
}
}
};
-} // namespace
+}
/// CheckUnreachable - Check for unreachable code.
static void CheckUnreachable(Sema &S, AnalysisDeclContext &AC) {
@@ -493,7 +493,7 @@
}
};
-} // namespace
+}
/// CheckFallThroughForFunctionDef - Check that we don't fall off the end of a
/// function that should return a value. Check that we don't fall off the end
@@ -601,7 +601,7 @@
bool doesContainReference() const { return FoundReference; }
};
-} // namespace
+}
static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {
QualType VariableTy = VD->getType().getCanonicalType();
@@ -1059,7 +1059,7 @@
Sema &S;
llvm::SmallPtrSet<const CFGBlock *, 16> ReachableBlocks;
};
-} // namespace
+}
static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
bool PerFunction) {
@@ -1414,7 +1414,7 @@
});
}
};
-} // namespace
+}
namespace clang {
namespace {
@@ -1432,8 +1432,7 @@
return SM.isBeforeInTranslationUnit(left.first.first, right.first.first);
}
};
-} // namespace
-} // namespace clang
+}}
//===----------------------------------------------------------------------===//
// -Wthread-safety
@@ -1794,9 +1793,7 @@
Warnings.emplace_back(std::move(Warning), OptionalNotes());
}
};
-} // namespace
-} // namespace consumed
-} // namespace clang
+}}}
//===----------------------------------------------------------------------===//
// AnalysisBasedWarnings - Worker object used by Sema to execute analysis-based
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index 1d7d27c..0e973cc 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -248,7 +248,7 @@
const CXXRecordDecl *DeclaringClass;
};
-} // namespace
+}
/// Checks whether one class might instantiate to the other.
static bool MightInstantiateTo(const CXXRecordDecl *From,
@@ -679,7 +679,7 @@
return findFriendship(Cur, 0);
}
};
-} // namespace
+}
/// Search for a class P that EC is a friend of, under the constraint
/// InstanceContext <= P
diff --git a/clang/lib/Sema/SemaCXXScopeSpec.cpp b/clang/lib/Sema/SemaCXXScopeSpec.cpp
index aeea26b..9e146ed 100644
--- a/clang/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/clang/lib/Sema/SemaCXXScopeSpec.cpp
@@ -419,7 +419,7 @@
Sema &SRef;
};
-} // namespace
+}
/// \brief Build a new nested-name-specifier for "identifier::", as described
/// by ActOnCXXNestedNameSpecifier.
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index db3f196..d9dc4df 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -140,7 +140,7 @@
PlaceholderKind = (BuiltinType::Kind) 0;
}
};
-} // namespace
+}
// The Try functions attempt a specific way of casting. If they succeed, they
// return TC_Success. If their way of casting is not appropriate for the given
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index af49994..f76727c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3198,7 +3198,7 @@
bool IsStringLocation, Range StringRange,
ArrayRef<FixItHint> Fixit = None);
};
-} // namespace
+}
SourceRange CheckFormatHandler::getFormatStringRange() {
return OrigFormatExpr->getSourceRange();
@@ -3552,7 +3552,7 @@
const Expr *E);
};
-} // namespace
+}
bool CheckPrintfHandler::HandleInvalidPrintfConversionSpecifier(
const analyze_printf::PrintfSpecifier &FS,
@@ -4275,7 +4275,7 @@
void HandleIncompleteScanList(const char *start, const char *end) override;
};
-} // namespace
+}
void CheckScanfHandler::HandleIncompleteScanList(const char *start,
const char *end) {
@@ -7944,7 +7944,7 @@
Tree.merge(Elts[I]);
}
};
-} // namespace
+}
void Sema::CheckUnsequencedOperations(Expr *E) {
SmallVector<Expr *, 8> WorkList;
@@ -8338,7 +8338,7 @@
Range = e->getSourceRange();
}
};
-} // namespace
+}
/// Consider whether capturing the given variable can possibly lead to
/// a retain cycle.
@@ -8484,7 +8484,7 @@
}
}
};
-} // namespace
+}
/// Check whether the given argument is a block which captures a
/// variable.
@@ -9322,7 +9322,7 @@
return false;
}
-} // namespace
+}
//===--- CHECK: pointer_with_type_tag attribute: datatypes should match ----//
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 284f7cf..ebb6bbc 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -342,7 +342,7 @@
bool IsImpossibleToSatisfy(const NamedDecl *ND) const;
//@}
};
-} // namespace
+}
class ResultBuilder::ShadowMapEntry::iterator {
llvm::PointerUnion<const NamedDecl *, const DeclIndexPair *> DeclOrIterator;
@@ -1264,7 +1264,7 @@
Results.AddResult(Result, CurContext, Hiding, InBaseClass);
}
};
-} // namespace
+}
/// \brief Add type specifiers for the current language as keyword results.
static void AddTypeSpecifierResults(const LangOptions &LangOpts,
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index ee03994..ce89d99 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -89,7 +89,7 @@
bool AllowClassTemplates;
};
-} // namespace
+}
/// \brief Determine whether the token kind starts a simple-type-specifier.
bool Sema::isSimpleTypeSpecifier(tok::TokenKind Kind) const {
@@ -2501,7 +2501,7 @@
QualType PromotedType;
};
-} // namespace
+}
/// getSpecialMember - get the special member enum for a method.
Sema::CXXSpecialMember Sema::getSpecialMember(const CXXMethodDecl *MD) {
@@ -6607,7 +6607,7 @@
CXXRecordDecl *ExpectedParent;
};
-} // namespace
+}
/// \brief Generate diagnostics for an invalid function redeclaration.
///
@@ -8759,7 +8759,7 @@
SelfReferenceChecker(S, OrigDecl).CheckExpr(E);
}
-} // namespace
+}
/// AddInitializerToDecl - Adds the initializer Init to the
/// declaration dcl. If DirectInit is true, this is C++ direct
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 471a03e..7ed9bfc 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -145,7 +145,7 @@
return S->Diag(Lambda->getLocStart(),
diag::err_lambda_capture_default_arg);
}
-} // namespace
+}
void
Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc,
@@ -2834,7 +2834,7 @@
CXXRecordDecl *ClassDecl;
};
-} // namespace
+}
/// \brief Handle a C++ member initializer.
MemInitResult
@@ -3756,7 +3756,7 @@
return false;
}
};
-} // namespace
+}
/// \brief Determine whether the given type is an incomplete or zero-lenfgth
/// array type.
@@ -4215,7 +4215,7 @@
return false;
}
-} // namespace
+}
/// ActOnMemInitializers - Handle the member initializers for a constructor.
void Sema::ActOnMemInitializers(Decl *ConstructorDecl,
@@ -4637,7 +4637,7 @@
CheckAbstractUsage(*this, D).Visit(TL, Sel);
}
-} // namespace
+}
/// Check for invalid uses of an abstract type in a method declaration.
static void CheckAbstractClassUsage(AbstractUsageInfo &Info,
@@ -5508,7 +5508,7 @@
bool isAccessible(Subobject Subobj, CXXMethodDecl *D);
};
-} // namespace
+}
/// Is the given special member inaccessible when used on the given
/// sub-object.
@@ -7517,7 +7517,7 @@
}
};
-} // namespace
+}
static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc,
CXXScopeSpec &SS,
@@ -8883,7 +8883,7 @@
return WasAlreadyBeingDeclared;
}
};
-} // namespace
+}
CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
CXXRecordDecl *ClassDecl) {
@@ -9267,7 +9267,7 @@
typedef llvm::DenseMap<const Type *, InheritingConstructorsForType> MapType;
MapType Map;
};
-} // namespace
+}
void Sema::DeclareInheritingConstructors(CXXRecordDecl *ClassDecl) {
// Defer declaring the inheriting constructors until the class is
@@ -13484,7 +13484,7 @@
return false;
}
};
-} // namespace
+}
bool Sema::checkThisInStaticMemberFunctionType(CXXMethodDecl *Method) {
TypeSourceInfo *TSInfo = Method->getTypeSourceInfo();
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 6ca4734..543566f 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -446,7 +446,7 @@
ObjCInterfaceDecl *CurrentIDecl;
};
-} // namespace
+}
static void diagnoseUseOfProtocols(Sema &TheSema,
ObjCContainerDecl *CD,
@@ -3059,7 +3059,7 @@
searchFromContainer(container);
}
};
-} // namespace
+}
void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod,
ObjCInterfaceDecl *CurrentClass,
@@ -3717,7 +3717,7 @@
return true;
}
};
-} // namespace
+}
void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S,
const ObjCImplementationDecl *ImplD) {
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index f26b5368..ffa47ee 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1138,7 +1138,7 @@
return S.ImpCastExprToType(op, S.Context.getComplexType(toType),
CK_IntegralComplexCast);
}
-} // namespace
+}
/// \brief Handle integer arithmetic conversions. Helper function of
/// UsualArithmeticConversions()
@@ -4257,7 +4257,7 @@
private:
const IdentifierInfo *const FunctionName;
};
-} // namespace
+}
static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn,
FunctionDecl *FDecl,
@@ -11974,7 +11974,7 @@
return E;
}
};
-} // namespace
+}
ExprResult Sema::TransformToPotentiallyEvaluated(Expr *E) {
assert(isUnevaluatedContext() &&
@@ -13310,7 +13310,7 @@
bool TraverseTemplateArgument(const TemplateArgument &Arg);
bool TraverseRecordType(RecordType *T);
};
-} // namespace
+}
bool MarkReferencedDecls::TraverseTemplateArgument(
const TemplateArgument &Arg) {
@@ -13409,7 +13409,7 @@
S.UpdateMarkingForLValueToRValue(E->getSubExpr());
}
};
-} // namespace
+}
/// \brief Mark any declarations that appear within this expression or any
/// potentially-evaluated subexpressions as "referenced".
@@ -13705,7 +13705,7 @@
return resolveDecl(E, E->getDecl());
}
};
-} // namespace
+}
/// Given a function expression of unknown-any type, try to rebuild it
/// to have a function type.
@@ -13796,7 +13796,7 @@
return resolveDecl(E, E->getDecl());
}
};
-} // namespace
+}
/// Rebuilds a call expression which yielded __unknown_anytype.
ExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) {
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 43c097e..6c839f3 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -2424,7 +2424,7 @@
/// in-class initializer.
MismatchResult analyzeInClassInitializer();
};
-} // namespace
+}
MismatchingNewDeleteDetector::MismatchResult
MismatchingNewDeleteDetector::analyzeDeleteExpr(const CXXDeleteExpr *DE) {
@@ -6571,7 +6571,7 @@
return CacheEntry = ExprError();
}
};
-} // namespace
+}
ExprResult
Sema::CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl,
diff --git a/clang/lib/Sema/SemaExprMember.cpp b/clang/lib/Sema/SemaExprMember.cpp
index d01640a..e421349 100644
--- a/clang/lib/Sema/SemaExprMember.cpp
+++ b/clang/lib/Sema/SemaExprMember.cpp
@@ -579,7 +579,7 @@
const RecordDecl *const Record;
};
-} // namespace
+}
static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R,
Expr *BaseExpr,
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index f6a5a06..9947fad 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -1895,7 +1895,7 @@
}
};
-} // namespace
+}
Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S,
IdentifierInfo *Name,
@@ -3184,7 +3184,7 @@
}
}
};
-} // namespace
+}
bool Sema::isKnownName(StringRef name) {
if (name.empty())
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 5c149e1..821d7f6 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -1915,7 +1915,7 @@
RecordDecl *Record;
};
-} // namespace
+}
/// @brief Check the well-formedness of a C99 designated initializer.
///
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index b13b992..3fd1f21 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -204,7 +204,7 @@
UnqualUsingEntry::Comparator()));
}
};
-} // namespace
+}
// Retrieve the set of identifier namespaces that correspond to a
// specific kind of name lookup.
@@ -875,7 +875,7 @@
LookupResult &R;
bool OldFindLocalExtern;
};
-} // namespace
+}
bool Sema::CppLookupName(LookupResult &R, Scope *S) {
assert(getLangOpts().CPlusPlus && "Can perform only C++ lookup");
@@ -2121,7 +2121,7 @@
Sema::AssociatedClassSet &Classes;
SourceLocation InstantiationLoc;
};
-} // namespace
+}
static void
addAssociatedClassesAndNamespaces(AssociatedLookup &Result, QualType T);
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index b6559b2..e609fcf 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -4924,7 +4924,7 @@
Diags.popMappings(SavedLoc);
}
};
-} // namespace
+}
OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList,
SourceLocation StartLoc,
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 072dc55..a0fdcd7 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -536,7 +536,7 @@
struct DFIParamWithArguments : DFIArguments {
TemplateParameter Param;
};
-} // namespace
+}
/// \brief Convert from Sema's representation of template deduction information
/// to the form used in overload-candidate information.
@@ -794,7 +794,7 @@
*i->Addr = i->Saved;
}
};
-} // namespace
+}
/// checkPlaceholderForOverload - Do any interesting placeholder-like
/// preprocessing on the given expression.
@@ -9555,7 +9555,7 @@
return S.SourceMgr.isBeforeInTranslationUnit(LLoc, RLoc);
}
};
-} // namespace
+}
/// CompleteNonViableCandidate - Normally, overload resolution only
/// computes up to the first. Produces the FixIt set if possible.
@@ -9747,7 +9747,7 @@
return S.SourceMgr.isBeforeInTranslationUnit(LLoc, RLoc);
}
};
-} // namespace
+}
/// Diagnose a template argument deduction failure.
/// We are treating these failures as overload failures due to bad
@@ -10165,7 +10165,7 @@
return &Matches[0].first;
}
};
-} // namespace
+}
/// ResolveAddressOfOverloadedFunction - Try to resolve the address of
/// an overloaded function (C++ [over.over]), where @p From is an
@@ -10632,7 +10632,7 @@
}
};
-} // namespace
+}
static std::unique_ptr<CorrectionCandidateCallback>
MakeValidator(Sema &SemaRef, MemberExpr *ME, size_t NumArgs,
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp
index a389988..3e465af 100644
--- a/clang/lib/Sema/SemaPseudoObject.cpp
+++ b/clang/lib/Sema/SemaPseudoObject.cpp
@@ -338,7 +338,7 @@
ExprResult buildGet() override;
ExprResult buildSet(Expr *op, SourceLocation, bool) override;
};
-} // namespace
+}
/// Capture the given expression in an OpaqueValueExpr.
OpaqueValueExpr *PseudoOpBuilder::capture(Expr *e) {
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index a7e56e7..50e4345 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -530,7 +530,7 @@
return LHS < RHS.first;
}
};
-} // namespace
+}
/// CmpCaseVals - Comparison predicate for sorting case values.
///
@@ -1904,7 +1904,7 @@
return Decl;
}
-} // namespace
+}
static bool ObjCEnumerationCollection(Expr *Collection) {
return !Collection->isTypeDependent()
@@ -2116,7 +2116,7 @@
Decl *D;
bool Enabled;
};
-} // namespace
+}
/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
StmtResult
@@ -2952,7 +2952,7 @@
S.MarkAnyDeclReferenced(T->getLocation(), T, /*OdrUse=*/false);
return true;
}
-} // namespace
+}
TypeLoc Sema::getReturnTypeLoc(FunctionDecl *FD) const {
TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc().IgnoreParens();
@@ -3489,7 +3489,7 @@
template <> struct isPodLike<CatchHandlerType> {
static const bool value = true;
};
-} // namespace llvm
+}
namespace {
class CatchTypePublicBases {
@@ -3526,7 +3526,7 @@
return false;
}
};
-} // namespace
+}
/// ActOnCXXTryBlock - Takes a try compound-statement and a number of
/// handlers and creates a try statement from them.
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 5c3a015..f4740a5 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -1549,7 +1549,7 @@
return TraverseType(T->getInjectedSpecializationType());
}
};
-} // namespace
+}
/// Determines whether a given type depends on the given parameter
/// list.
@@ -3953,7 +3953,7 @@
bool VisitTagDecl(const TagDecl *Tag);
bool VisitNestedNameSpecifier(NestedNameSpecifier *NNS);
};
-} // namespace
+}
bool UnnamedLocalNoLinkageFinder::VisitBuiltinType(const BuiltinType*) {
return false;
@@ -8220,7 +8220,7 @@
return E;
}
};
-} // namespace
+}
/// \brief Rebuilds a type within the context of the current instantiation.
///
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index c5b73f5..6f676ad 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -58,7 +58,7 @@
/// terms of noreturn and default calling convention adjustments.
TDF_InOverloadResolution = 0x20
};
-} // namespace clang
+}
using namespace clang;
@@ -3913,7 +3913,7 @@
return TransformType(TLB, TL);
}
};
-} // namespace
+}
Sema::DeduceAutoResult
Sema::DeduceAutoType(TypeSourceInfo *Type, Expr *&Init, QualType &Result) {
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index b9890d0..82ff7c0 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -844,7 +844,7 @@
SourceLocation loc,
TemplateArgument arg);
};
-} // namespace
+}
bool TemplateInstantiator::AlreadyTransformed(QualType T) {
if (T.isNull())
diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp
index 6a31125..fd3ba35 100644
--- a/clang/lib/Sema/SemaTemplateVariadic.cpp
+++ b/clang/lib/Sema/SemaTemplateVariadic.cpp
@@ -195,7 +195,7 @@
return true;
}
};
-} // namespace
+}
/// \brief Determine whether it's possible for an unexpanded parameter pack to
/// be valid in this location. This only happens when we're in a declaration
@@ -806,7 +806,7 @@
}
};
-} // namespace
+}
/// \brief Called when an expression computing the size of a parameter pack
/// is parsed.
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index aac0862..03cbdfd 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -242,7 +242,7 @@
savedAttrs.back()->setNext(nullptr);
}
};
-} // namespace
+}
static void spliceAttrIntoList(AttributeList &attr, AttributeList *&head) {
attr.setNext(head);
@@ -1409,7 +1409,7 @@
///
/// The values of this enum are used in diagnostics.
enum QualifiedFunctionKind { QFK_BlockPointer, QFK_Pointer, QFK_Reference };
-} // namespace
+}
/// Check whether the type T is a qualified function type, and if it is,
/// diagnose that it cannot be contained within the given kind of declarator.
@@ -4399,7 +4399,7 @@
llvm_unreachable("unsupported TypeLoc kind in declarator!");
}
};
-} // namespace
+}
static void fillAtomicQualLoc(AtomicTypeLoc ATL, const DeclaratorChunk &Chunk) {
SourceLocation Loc;
@@ -4990,7 +4990,7 @@
llvm_unreachable("unknown wrapping kind");
}
};
-} // namespace
+}
static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State,
AttributeList &Attr,
@@ -5904,7 +5904,7 @@
S.Diag(Loc, DiagID) << T;
}
};
-} // namespace
+}
bool Sema::RequireCompleteExprType(Expr *E, unsigned DiagID) {
TypeDiagnoserDiag Diagnoser(DiagID);
diff --git a/clang/lib/Sema/TypeLocBuilder.h b/clang/lib/Sema/TypeLocBuilder.h
index ed94867..82844b3 100644
--- a/clang/lib/Sema/TypeLocBuilder.h
+++ b/clang/lib/Sema/TypeLocBuilder.h
@@ -146,6 +146,6 @@
}
};
-} // namespace clang
+}
#endif
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 5ecedc7..7242793 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1686,7 +1686,7 @@
// files.
IdentifierInfo *getIdentifierInfo() const { return Found; }
};
-} // namespace
+}
void ASTReader::updateOutOfDateIdentifier(IdentifierInfo &II) {
// Note that we are loading an identifier.
@@ -3954,7 +3954,7 @@
SuggestedPredefines, ExistingLangOpts);
}
};
-} // namespace
+}
bool ASTReader::readASTFileControlBlock(
StringRef Filename, FileManager &FileMgr,
@@ -4739,7 +4739,7 @@
}
};
-} // namespace
+}
PreprocessedEntityID ASTReader::findPreprocessedEntity(SourceLocation Loc,
bool EndsAfter) const {
@@ -4859,7 +4859,7 @@
Optional<HeaderFileInfo> getHeaderFileInfo() const { return HFI; }
};
-} // namespace
+}
HeaderFileInfo ASTReader::GetHeaderFileInfo(const FileEntry *FE) {
HeaderFileInfoVisitor Visitor(FE);
@@ -6192,7 +6192,7 @@
return false;
}
};
-} // namespace
+}
ExternalLoadResult ASTReader::FindExternalLexicalDecls(const DeclContext *DC,
bool (*isKindWeWant)(Decl::Kind),
@@ -6237,7 +6237,7 @@
}
};
-} // namespace
+}
void ASTReader::FindFileRegionDecls(FileID File,
unsigned Offset, unsigned Length,
@@ -6355,7 +6355,7 @@
return FoundAnything;
}
};
-} // namespace
+}
/// \brief Retrieve the "definitive" module file for the definition of the
/// given declaration context, if there is one.
@@ -6504,7 +6504,7 @@
return FoundAnything && !This->VisitAll;
}
};
-} // namespace
+}
void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {
if (!DC->hasExternalVisibleStorage())
@@ -6848,7 +6848,7 @@
StringRef Next() override;
};
-} // namespace clang
+}
ASTIdentifierIterator::ASTIdentifierIterator(const ASTReader &Reader)
: Reader(Reader), Index(Reader.ModuleMgr.size() - 1) {
@@ -6960,8 +6960,7 @@
}
bool factoryHasMoreThanOneDecl() const { return FactoryHasMoreThanOneDecl; }
};
-} // namespace serialization
- } // namespace clang
+} } // end namespace clang::serialization
/// \brief Add the given set of methods to the method list.
static void addMethodsToPool(Sema &S, ArrayRef<ObjCMethodDecl *> Methods,
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 136ef1a..00ebd3e 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -387,7 +387,7 @@
}
}
};
-} // namespace clang
+}
namespace {
/// Iterator over the redeclarations of a declaration that have already
@@ -423,7 +423,7 @@
return A.Current != B.Current;
}
};
-} // namespace
+}
template<typename DeclT>
llvm::iterator_range<MergedRedeclIterator<DeclT>> merged_redecls(DeclT *D) {
return llvm::iterator_range<MergedRedeclIterator<DeclT>>(
@@ -2934,7 +2934,7 @@
std::make_pair(Canon, IsUnresolved ? PrevFD : FD));
}
}
-} // namespace clang
+}
void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, ...) {
llvm_unreachable("attachPreviousDecl on non-redeclarable declaration");
}
@@ -3490,7 +3490,7 @@
return Chain;
}
};
-} // namespace
+}
void ASTReader::loadPendingDeclChain(Decl *CanonDecl) {
// The decl might have been merged into something else after being added to
@@ -3647,7 +3647,7 @@
return true;
}
};
-} // namespace
+}
void ASTReader::loadObjCCategories(serialization::GlobalDeclID ID,
ObjCInterfaceDecl *D,
diff --git a/clang/lib/Serialization/ASTReaderInternals.h b/clang/lib/Serialization/ASTReaderInternals.h
index 9a15327..d1b032b 100644
--- a/clang/lib/Serialization/ASTReaderInternals.h
+++ b/clang/lib/Serialization/ASTReaderInternals.h
@@ -241,8 +241,8 @@
typedef llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>
HeaderFileInfoLookupTable;
-} // namespace reader
-} // namespace serialization
+} // end namespace clang::serialization::reader
+} // end namespace clang::serialization
} // end namespace clang
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index ae22101b..c15f6b0 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -103,7 +103,7 @@
void Visit##Type(Type *);
#include "clang/AST/StmtNodes.inc"
};
-} // namespace clang
+}
void ASTStmtReader::
ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
@@ -1699,7 +1699,7 @@
#include "clang/Basic/OpenMPKinds.def"
OMPClause *readClause();
};
-} // namespace clang
+}
OMPClause *OMPClauseReader::readClause() {
OMPClause *C;
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 45ab99c..5bb0bec 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -98,7 +98,7 @@
#define ABSTRACT_TYPE(Class, Base)
#include "clang/AST/TypeNodes.def"
};
-} // namespace
+}
void ASTTypeWriter::VisitBuiltinType(const BuiltinType *T) {
llvm_unreachable("Built-in types are never serialized");
@@ -458,7 +458,7 @@
void VisitFunctionTypeLoc(FunctionTypeLoc TyLoc);
};
-} // namespace
+}
void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) {
// nothing to do
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 0f81330..6c5bc5b 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -193,7 +193,7 @@
Record.append(LazySpecializations.begin(), LazySpecializations.end());
}
};
-} // namespace clang
+}
void ASTDeclWriter::Visit(Decl *D) {
DeclVisitor<ASTDeclWriter>::Visit(D);
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index f58ce5f..a461d3f 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -47,7 +47,7 @@
void Visit##Type(Type *);
#include "clang/AST/StmtNodes.inc"
};
-} // namespace clang
+}
void ASTStmtWriter::
AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &Args) {
@@ -1708,7 +1708,7 @@
#include "clang/Basic/OpenMPKinds.def"
void writeClause(OMPClause *C);
};
-} // namespace clang
+}
void OMPClauseWriter::writeClause(OMPClause *C) {
Record.push_back(C->getClauseKind());
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 1a6fc78..2c7da3e8 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -52,7 +52,7 @@
/// \brief The index for identifiers.
IDENTIFIER_INDEX
};
-} // namespace
+}
/// \brief The name of the global index file.
static const char * const IndexFileName = "modules.idx";
@@ -121,7 +121,7 @@
typedef llvm::OnDiskIterableChainedHashTable<IdentifierIndexReaderTrait>
IdentifierIndexTable;
-} // namespace
+}
GlobalModuleIndex::GlobalModuleIndex(std::unique_ptr<llvm::MemoryBuffer> Buffer,
llvm::BitstreamCursor Cursor)
@@ -430,7 +430,7 @@
/// \brief Write the index to the given bitstream.
void writeIndex(llvm::BitstreamWriter &Stream);
};
-} // namespace
+}
static void emitBlockID(unsigned ID, const char *Name,
llvm::BitstreamWriter &Stream,
@@ -493,7 +493,7 @@
return std::make_pair(k, IsInteresting);
}
};
-} // namespace
+}
bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) {
// Open the module file.
@@ -684,7 +684,7 @@
}
};
-} // namespace
+}
void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
using namespace llvm;
@@ -882,7 +882,7 @@
return Result;
}
};
-} // namespace
+}
IdentifierIterator *GlobalModuleIndex::createIdentifierIterator() const {
IdentifierIndexTable &Table =
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp
index f5dff2c..03d8ed0 100644
--- a/clang/lib/Serialization/ModuleManager.cpp
+++ b/clang/lib/Serialization/ModuleManager.cpp
@@ -534,7 +534,7 @@
return M->ModuleName;
}
};
-} // namespace llvm
+}
void ModuleManager::viewGraph() {
llvm::ViewGraph(*this, "Modules");
diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
index 6c83bdb..e462e2b 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
@@ -63,7 +63,7 @@
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 780d80a..3fd5576 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -132,7 +132,7 @@
void checkPostStmt(const ObjCArrayLiteral *AL,
CheckerContext &C) const;
};
-} // namespace
+}
void NilArgChecker::warnIfNilExpr(const Expr *E,
const char *Msg,
@@ -631,7 +631,7 @@
public:
void checkPreObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-} // namespace
+}
void ClassReleaseChecker::checkPreObjCMessage(const ObjCMethodCall &msg,
CheckerContext &C) const {
@@ -692,7 +692,7 @@
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 @@
const CallEvent *Call,
PointerEscapeKind Kind) const;
};
-} // namespace
+}
static bool isKnownNonNilCollectionType(QualType T) {
const ObjCObjectPointerType *PT = T->getAs<ObjCObjectPointerType>();
@@ -1208,7 +1208,7 @@
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 f698d1b..abfb971 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp
@@ -184,7 +184,7 @@
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 5b5fe1c..339af8f 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
@@ -241,7 +241,7 @@
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 81cd028..0beb917 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -756,7 +756,7 @@
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 6082664..a61e658 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
@@ -34,7 +34,7 @@
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 81cb6a6..05b4a61 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ b/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
@@ -30,8 +30,8 @@
#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 1494dcc..f4be5b3 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
@@ -77,7 +77,7 @@
return reachable[block->getBlockID()];
}
};
-} // namespace
+}
void ReachableCode::computeReachableBlocks() {
if (!cfg.getNumBlockIDs())
@@ -445,7 +445,7 @@
}
}
};
-} // 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 ee486b2..51e7a3d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
@@ -40,7 +40,7 @@
}
}
};
-} // namespace
+}
void ento::registerDominatorsTreeDumper(CheckerManager &mgr) {
mgr.registerChecker<DominatorsTreeDumper>();
@@ -60,7 +60,7 @@
}
}
};
-} // namespace
+}
void ento::registerLiveVariablesDumper(CheckerManager &mgr) {
mgr.registerChecker<LiveVariablesDumper>();
@@ -80,7 +80,7 @@
}
}
};
-} // namespace
+}
void ento::registerCFGViewer(CheckerManager &mgr) {
mgr.registerChecker<CFGViewer>();
@@ -106,7 +106,7 @@
}
}
};
-} // namespace
+}
void ento::registerCFGDumper(CheckerManager &mgr) {
mgr.registerChecker<CFGDumper>();
@@ -126,7 +126,7 @@
CG.viewGraph();
}
};
-} // namespace
+}
void ento::registerCallGraphViewer(CheckerManager &mgr) {
mgr.registerChecker<CallGraphViewer>();
@@ -146,7 +146,7 @@
CG.dump();
}
};
-} // namespace
+}
void ento::registerCallGraphDumper(CheckerManager &mgr) {
mgr.registerChecker<CallGraphDumper>();
@@ -185,7 +185,7 @@
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 7696fab..0bcebf6 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
@@ -205,7 +205,7 @@
}
}
}
-} // 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 6317e37..43a2812 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
@@ -41,7 +41,7 @@
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 ef7ba16..f36ec2c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
@@ -31,7 +31,7 @@
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 e71fb14..02c1209 100644
--- a/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
@@ -722,7 +722,7 @@
VisitStmt(ME);
}
-} // namespace
+}
// Register the checkers.
namespace {
@@ -738,7 +738,7 @@
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 68ffb26..0b7375a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
@@ -312,7 +312,7 @@
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 1ff43c5..52e2936 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
@@ -151,7 +151,7 @@
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 817122e..e913479 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
@@ -187,7 +187,7 @@
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 cf25577..296aec6 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
@@ -246,7 +246,7 @@
}
};
-} // 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 9d0638d..2be7f1d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
@@ -47,7 +47,7 @@
void checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-} // namespace
+}
void NSErrorMethodChecker::checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr,
@@ -94,7 +94,7 @@
void checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-} // namespace
+}
void CFErrorFunctionChecker::checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr,
@@ -146,7 +146,7 @@
"Coding conventions (Apple)") {}
};
-} // namespace
+}
namespace {
class NSOrCFErrorDerefChecker
@@ -164,7 +164,7 @@
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 6773b58..ba82d1d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
@@ -36,7 +36,7 @@
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 159fb8f..e3fc611 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
@@ -168,7 +168,7 @@
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 a398832..a2cf8e1 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
@@ -81,7 +81,7 @@
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 4b6c330..71ae09c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -61,7 +61,7 @@
ID.AddInteger((unsigned) X.getObjKind());
}
};
-} // namespace llvm
+} // end llvm namespace
//===----------------------------------------------------------------------===//
// Reference-counting logic (typestate + counts).
@@ -484,7 +484,7 @@
IdentifierInfo *getIdentifier() const { return II; }
Selector getSelector() const { return S; }
};
-} // namespace
+}
namespace llvm {
template <> struct DenseMapInfo<ObjCSummaryKey> {
@@ -510,7 +510,7 @@
}
};
-} // namespace llvm
+} // end llvm namespace
namespace {
class ObjCSummaryCache {
@@ -4032,6 +4032,4 @@
#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 fb135bd..6622313 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
@@ -34,7 +34,7 @@
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 c21f71e..327a9e0 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
@@ -40,7 +40,7 @@
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 22f4304..d33c977 100644
--- a/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
@@ -34,7 +34,7 @@
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 9be10ba..fc49a46 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
@@ -56,7 +56,7 @@
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 5f7f9ed..d78de3c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -48,7 +48,7 @@
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 5bffc41..7e1fc1e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
@@ -239,7 +239,7 @@
}
}
};
-} // 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 7e3c090..0e90566 100644
--- a/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
@@ -50,7 +50,7 @@
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 6447887..c1ac03d 100644
--- a/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
@@ -43,7 +43,7 @@
}
};
-} // namespace
+}
typedef llvm::ImmutableMap<CountKey, unsigned> CountMap;
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index fce72dd..97e97ef 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2847,7 +2847,7 @@
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 7a4d246..2684cc7 100644
--- a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
@@ -160,7 +160,7 @@
checkFn(S, C);
}
};
-} // namespace
+}
/// \brief Run checkers for visiting Stmts.
void CheckerManager::runCheckersForStmt(bool isPreVisit,
@@ -199,7 +199,7 @@
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 @@
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 @@
checkFn(Loc, IsLoad, BoundEx, C);
}
};
-} // namespace
+}
/// \brief Run checkers for load/store of a location.
@@ -331,7 +331,7 @@
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 @@
checkFn(Condition, C);
}
};
-} // namespace
+}
/// \brief Run checkers for branch condition.
void CheckerManager::runCheckersForBranchCondition(const Stmt *Condition,
@@ -444,7 +444,7 @@
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 4c255c1..ef515fb 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -2648,7 +2648,7 @@
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 c1baddd..e7cc23c 100644
--- a/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h
+++ b/clang/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h
@@ -39,7 +39,7 @@
}
};
-} // 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 5f3e18f..60b32c7 100644
--- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
@@ -40,8 +40,7 @@
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 dd0f612..6d41fc2 100644
--- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -131,7 +131,7 @@
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 @@
bool supportsFields() const { return SupportsFields; }
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Main RegionStore logic.
@@ -737,7 +737,7 @@
static_cast<DERIVED*>(this)->VisitCluster(BaseR, C);
}
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Binding invalidation.
@@ -963,7 +963,7 @@
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 @@
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 9911a8f..135cd4e 100644
--- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
+++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
@@ -93,8 +93,8 @@
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 1969250..e23bf8a 100644
--- a/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
+++ b/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
@@ -68,7 +68,7 @@
// BodyFarm.
llvm::StringMap<Stmt *> Bodies;
};
-} // namespace ento
-} // namespace clang
+}
+}
#endif
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp
index 5e373d6..f9cb7c6 100644
--- a/clang/lib/Tooling/Tooling.cpp
+++ b/clang/lib/Tooling/Tooling.cpp
@@ -173,7 +173,7 @@
FrontendAction *create() override { return Action; }
};
-} // namespace
+}
ToolInvocation::ToolInvocation(
std::vector<std::string> CommandLine, ToolAction *Action,
@@ -406,7 +406,7 @@
}
};
-} // namespace
+}
int ClangTool::buildASTs(std::vector<std::unique_ptr<ASTUnit>> &ASTs) {
ASTBuilderAction Action(ASTs);
diff --git a/clang/tools/diagtool/DiagTool.h b/clang/tools/diagtool/DiagTool.h
index c1ae0e5..04b926d 100644
--- a/clang/tools/diagtool/DiagTool.h
+++ b/clang/tools/diagtool/DiagTool.h
@@ -54,7 +54,7 @@
RegisterDiagTool() { diagTools->registerTool(new DIAGTOOL()); }
};
-} // namespace diagtool
+} // end diagtool namespace
#define DEF_DIAGTOOL(NAME, DESC, CLSNAME)\
namespace {\
diff --git a/clang/tools/diagtool/ListWarnings.cpp b/clang/tools/diagtool/ListWarnings.cpp
index 10c86b4..3e6e883 100644
--- a/clang/tools/diagtool/ListWarnings.cpp
+++ b/clang/tools/diagtool/ListWarnings.cpp
@@ -37,7 +37,7 @@
bool operator<(const Entry &x) const { return DiagName < x.DiagName; }
};
-} // namespace
+}
static void printEntries(std::vector<Entry> &entries, llvm::raw_ostream &out) {
for (std::vector<Entry>::iterator it = entries.begin(), ei = entries.end();
diff --git a/clang/tools/diagtool/ShowEnabledWarnings.cpp b/clang/tools/diagtool/ShowEnabledWarnings.cpp
index 67094a5..06f7432 100644
--- a/clang/tools/diagtool/ShowEnabledWarnings.cpp
+++ b/clang/tools/diagtool/ShowEnabledWarnings.cpp
@@ -34,7 +34,7 @@
bool operator<(const PrettyDiag &x) const { return Name < x.Name; }
};
-} // namespace
+}
static void printUsage() {
llvm::errs() << "Usage: diagtool show-enabled [<flags>] <single-input.c>\n";
diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp
index 317d0a0..aa92541 100644
--- a/clang/tools/driver/cc1as_main.cpp
+++ b/clang/tools/driver/cc1as_main.cpp
@@ -149,7 +149,7 @@
DiagnosticsEngine &Diags);
};
-} // namespace
+}
bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
ArrayRef<const char *> Argv,
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 857e276..2216ec6 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1897,7 +1897,7 @@
void EnqueueChildren(const Stmt *S);
void EnqueueChildren(const OMPClause *S);
};
-} // namespace
+} // end anonyous namespace
void EnqueueVisitor::AddDeclarationNameInfo(const Stmt *S) {
// 'S' should always be non-null, since it comes from the
@@ -2098,7 +2098,7 @@
void OMPClauseEnqueue::VisitOMPFlushClause(const OMPFlushClause *C) {
VisitOMPClauseList(C);
}
-} // namespace
+}
void EnqueueVisitor::EnqueueChildren(const OMPClause *S) {
unsigned size = WL.size();
@@ -2783,7 +2783,7 @@
return Pieces;
}
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Misc. API hooks.
@@ -5616,7 +5616,7 @@
assert(PostChildrenInfos.empty());
}
};
-} // namespace
+}
void AnnotateTokensWorker::AnnotateTokens() {
// Walk the AST within the region of interest, annotating tokens
@@ -7116,7 +7116,7 @@
SafetyStackThreadSize = Value;
}
-} // namespace clang
+}
void clang::setThreadBackgroundPriority() {
if (getenv("LIBCLANG_BGPRIO_DISABLE"))
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp
index 6637abb..a7b8e29 100644
--- a/clang/tools/libclang/CIndexCodeCompletion.cpp
+++ b/clang/tools/libclang/CIndexCodeCompletion.cpp
@@ -644,7 +644,7 @@
StoredResults.clear();
}
};
-} // namespace
+}
extern "C" {
struct CodeCompleteAtInfo {
@@ -996,7 +996,7 @@
return result < 0;
}
};
-} // namespace
+}
extern "C" {
void clang_sortCodeCompletionResults(CXCompletionResult *Results,
diff --git a/clang/tools/libclang/CIndexDiagnostic.cpp b/clang/tools/libclang/CIndexDiagnostic.cpp
index 24d8af8..9ba36a6 100644
--- a/clang/tools/libclang/CIndexDiagnostic.cpp
+++ b/clang/tools/libclang/CIndexDiagnostic.cpp
@@ -155,7 +155,7 @@
CXDiagnosticSetImpl *CurrentSet;
CXDiagnosticSetImpl *MainSet;
};
-} // namespace
+}
CXDiagnosticSetImpl *cxdiag::lazyCreateDiags(CXTranslationUnit TU,
bool checkIfChanged) {
diff --git a/clang/tools/libclang/CIndexer.h b/clang/tools/libclang/CIndexer.h
index 3e16f32..8a306cd 100644
--- a/clang/tools/libclang/CIndexer.h
+++ b/clang/tools/libclang/CIndexer.h
@@ -120,7 +120,7 @@
MacroDefinitionRecord *checkForMacroInMacroDefinition(const MacroInfo *MI,
const Token &Tok,
CXTranslationUnit TU);
- } // namespace cxindex
- } // namespace clang
+ }
+ }
#endif
diff --git a/clang/tools/libclang/CLog.h b/clang/tools/libclang/CLog.h
index 6a6e90a..b9309ed 100644
--- a/clang/tools/libclang/CLog.h
+++ b/clang/tools/libclang/CLog.h
@@ -87,8 +87,8 @@
Logger &operator<<(const llvm::format_object_base &Fmt);
};
-} // namespace cxindex
-} // namespace clang
+}
+}
/// \brief Macros to automate common uses of Logger. Like this:
/// \code
diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp
index 2950451..b8bb28e 100644
--- a/clang/tools/libclang/CXCursor.cpp
+++ b/clang/tools/libclang/CXCursor.cpp
@@ -1249,7 +1249,7 @@
x.data[1] == y.data[1];
}
};
-} // namespace llvm
+}
extern "C" {
CXCursorSet clang_createCXCursorSet() {
@@ -1325,7 +1325,7 @@
}
}
};
-} // namespace
+}
void *cxcursor::createOverridenCXCursorsPool() {
return new OverridenCursorsPool();
diff --git a/clang/tools/libclang/CXCursor.h b/clang/tools/libclang/CXCursor.h
index ec88d53..083b869 100644
--- a/clang/tools/libclang/CXCursor.h
+++ b/clang/tools/libclang/CXCursor.h
@@ -294,7 +294,6 @@
/// first in a declaration group.
bool isFirstInDeclGroup(CXCursor C);
-} // namespace cxcursor
-} // namespace clang
+}} // end namespace: clang::cxcursor
#endif
diff --git a/clang/tools/libclang/CXLoadedDiagnostic.cpp b/clang/tools/libclang/CXLoadedDiagnostic.cpp
index 746e457..754ad55 100644
--- a/clang/tools/libclang/CXLoadedDiagnostic.cpp
+++ b/clang/tools/libclang/CXLoadedDiagnostic.cpp
@@ -56,7 +56,7 @@
return mem;
}
};
-} // namespace
+}
//===----------------------------------------------------------------------===//
// Cleanup.
@@ -246,7 +246,7 @@
CXDiagnosticSet load(const char *file);
};
-} // namespace
+}
CXDiagnosticSet DiagLoader::load(const char *file) {
TopDiags = llvm::make_unique<CXLoadedDiagnosticSetImpl>();
diff --git a/clang/tools/libclang/CXLoadedDiagnostic.h b/clang/tools/libclang/CXLoadedDiagnostic.h
index b683927..d5006a4 100644
--- a/clang/tools/libclang/CXLoadedDiagnostic.h
+++ b/clang/tools/libclang/CXLoadedDiagnostic.h
@@ -89,6 +89,6 @@
unsigned severity;
unsigned category;
};
-} // namespace clang
+}
#endif
diff --git a/clang/tools/libclang/CXSourceLocation.h b/clang/tools/libclang/CXSourceLocation.h
index 3cb78d2..f0b3f49 100644
--- a/clang/tools/libclang/CXSourceLocation.h
+++ b/clang/tools/libclang/CXSourceLocation.h
@@ -73,7 +73,6 @@
}
-} // namespace cxloc
-} // namespace clang
+}} // end namespace: clang::cxloc
#endif
diff --git a/clang/tools/libclang/CXString.h b/clang/tools/libclang/CXString.h
index 3d54690..72ac0cf 100644
--- a/clang/tools/libclang/CXString.h
+++ b/clang/tools/libclang/CXString.h
@@ -96,12 +96,12 @@
/// \brief Returns true if the CXString data is managed by a pool.
bool isManagedByPool(CXString str);
-} // namespace cxstring
+}
static inline StringRef getContents(const CXUnsavedFile &UF) {
return StringRef(UF.Contents, UF.Length);
}
-} // namespace clang
+}
#endif
diff --git a/clang/tools/libclang/CXTranslationUnit.h b/clang/tools/libclang/CXTranslationUnit.h
index 9054c50..6022c9d 100644
--- a/clang/tools/libclang/CXTranslationUnit.h
+++ b/clang/tools/libclang/CXTranslationUnit.h
@@ -78,7 +78,6 @@
};
-} // namespace cxtu
-} // namespace clang
+}} // end namespace clang::cxtu
#endif
diff --git a/clang/tools/libclang/CursorVisitor.h b/clang/tools/libclang/CursorVisitor.h
index a00fc98..1b2a922 100644
--- a/clang/tools/libclang/CursorVisitor.h
+++ b/clang/tools/libclang/CursorVisitor.h
@@ -263,8 +263,8 @@
LLVM_ATTRIBUTE_NOINLINE bool Visit(const Stmt *S);
};
-} // namespace cxcursor
-} // namespace clang
+}
+}
#endif
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index c1e3378..e356400 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -141,7 +141,7 @@
return LHS == RHS;
}
};
-} // namespace llvm
+}
namespace {
diff --git a/clang/tools/libclang/IndexingContext.h b/clang/tools/libclang/IndexingContext.h
index 5f29e0b..4da6aeb 100644
--- a/clang/tools/libclang/IndexingContext.h
+++ b/clang/tools/libclang/IndexingContext.h
@@ -519,7 +519,6 @@
return IdxCtx.StrScratch.Allocate<T>();
}
-} // namespace cxindex
-} // namespace clang
+}} // end clang::cxindex
#endif
diff --git a/clang/unittests/AST/EvaluateAsRValueTest.cpp b/clang/unittests/AST/EvaluateAsRValueTest.cpp
index f1d3eb5..820edbc 100644
--- a/clang/unittests/AST/EvaluateAsRValueTest.cpp
+++ b/clang/unittests/AST/EvaluateAsRValueTest.cpp
@@ -79,7 +79,7 @@
}
};
};
-} // namespace
+}
TEST(EvaluateAsRValue, FailsGracefullyForUnknownTypes) {
// This is a regression test; the AST library used to trigger assertion
diff --git a/clang/unittests/Basic/DiagnosticTest.cpp b/clang/unittests/Basic/DiagnosticTest.cpp
index 100fda4..fa2b56e 100644
--- a/clang/unittests/Basic/DiagnosticTest.cpp
+++ b/clang/unittests/Basic/DiagnosticTest.cpp
@@ -46,4 +46,4 @@
EXPECT_FALSE(Diags.hasUnrecoverableErrorOccurred());
}
-} // namespace
+}
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp
index f087b69..494c27a 100644
--- a/clang/unittests/Basic/SourceManagerTest.cpp
+++ b/clang/unittests/Basic/SourceManagerTest.cpp
@@ -271,7 +271,7 @@
}
};
-} // namespace
+}
TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) {
const char *header =
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp
index fc3004e..71d2d2b 100644
--- a/clang/unittests/Basic/VirtualFileSystemTest.cpp
+++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp
@@ -279,7 +279,7 @@
}
operator StringRef() { return Path.str(); }
};
-} // namespace
+}
TEST(VirtualFileSystemTest, BasicRealFSIteration) {
ScopedDir TestDirectory("virtual-file-system-test", /*Unique*/true);
diff --git a/clang/unittests/CodeGen/BufferSourceTest.cpp b/clang/unittests/CodeGen/BufferSourceTest.cpp
index 00f0677..b2a8ba5 100644
--- a/clang/unittests/CodeGen/BufferSourceTest.cpp
+++ b/clang/unittests/CodeGen/BufferSourceTest.cpp
@@ -74,4 +74,4 @@
clang::ParseAST(compiler.getSema(), false, false);
}
-} // namespace
+}
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 715d0cb..15d62eb 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -893,5 +893,5 @@
verifyFormat("var x: {[k: string]: v};");
}
-} // namespace format
+} // end namespace tooling
} // end namespace clang
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp
index 35b3b6c..4c161e0 100644
--- a/clang/unittests/Format/FormatTestJava.cpp
+++ b/clang/unittests/Format/FormatTestJava.cpp
@@ -501,5 +501,5 @@
" void f() {}"));
}
-} // namespace format
+} // end namespace tooling
} // end namespace clang
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index e90c29f..ac8fcbd 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/unittests/Format/FormatTestProto.cpp
@@ -152,5 +152,5 @@
"};");
}
-} // namespace format
+} // end namespace tooling
} // end namespace clang
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index 6ae71eb..94812fc 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -346,4 +346,4 @@
ASSERT_EQ(ExpectedState, Parameters.State);
}
-} // namespace
+} // anonoymous namespace
diff --git a/clang/unittests/Tooling/RefactoringCallbacksTest.cpp b/clang/unittests/Tooling/RefactoringCallbacksTest.cpp
index ea4d8da..c2b331c 100644
--- a/clang/unittests/Tooling/RefactoringCallbacksTest.cpp
+++ b/clang/unittests/Tooling/RefactoringCallbacksTest.cpp
@@ -96,5 +96,5 @@
Callback);
}
-} // namespace tooling
+} // end namespace ast_matchers
} // end namespace clang
diff --git a/clang/unittests/Tooling/TestVisitor.h b/clang/unittests/Tooling/TestVisitor.h
index 77a42af..f4a0039 100644
--- a/clang/unittests/Tooling/TestVisitor.h
+++ b/clang/unittests/Tooling/TestVisitor.h
@@ -229,6 +229,6 @@
std::vector<MatchCandidate> DisallowedMatches;
std::vector<ExpectedMatch> ExpectedMatches;
};
-} // namespace clang
+}
#endif
diff --git a/clang/unittests/libclang/LibclangTest.cpp b/clang/unittests/libclang/LibclangTest.cpp
index 650d28b..e827ebc 100644
--- a/clang/unittests/libclang/LibclangTest.cpp
+++ b/clang/unittests/libclang/LibclangTest.cpp
@@ -68,7 +68,7 @@
clang_VirtualFileOverlay_dispose(VFO);
}
};
-} // namespace
+}
TEST(libclang, VirtualFileOverlay_Basic) {
const char *contents =
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 2972710..f79c4a5 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1016,7 +1016,7 @@
getType(), "SA->get" + std::string(getUpperName()) + "Loc()");
}
};
-} // namespace
+}
static std::unique_ptr<Argument>
createArgument(const Record &Arg, StringRef Attr,
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index 4f39459..7644ae2 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -89,7 +89,7 @@
Float32,
Float64
};
-} // namespace NeonTypeFlags
+}
class Intrinsic;
class NeonEmitter;
diff --git a/clang/utils/TableGen/TableGen.cpp b/clang/utils/TableGen/TableGen.cpp
index d232823..4484e65 100644
--- a/clang/utils/TableGen/TableGen.cpp
+++ b/clang/utils/TableGen/TableGen.cpp
@@ -237,7 +237,7 @@
return false;
}
-} // namespace
+}
int main(int argc, char **argv) {
sys::PrintStackTraceOnErrorSignal();