diff options
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/CXXABI.h | 2 | ||||
-rw-r--r-- | clang/lib/AST/CXXInheritance.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/Decl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/Expr.cpp | 6 | ||||
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 16 | ||||
-rw-r--r-- | clang/lib/AST/ItaniumCXXABI.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/MicrosoftCXXABI.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/NestedNameSpecifier.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/Type.cpp | 6 | ||||
-rw-r--r-- | clang/lib/AST/TypeLoc.cpp | 10 | ||||
-rw-r--r-- | clang/lib/AST/TypePrinter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/VTableBuilder.cpp | 2 |
21 files changed, 41 insertions, 41 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 4da6240f867..0ebd377e53e 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -550,7 +550,7 @@ namespace { 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 3c9899aec80..76e4e119150 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -223,7 +223,7 @@ namespace clang { Expr *VisitMemberExpr(MemberExpr *E); Expr *VisitCallExpr(CallExpr *E); }; -} // namespace clang +} using namespace clang; //---------------------------------------------------------------------------- @@ -296,7 +296,7 @@ namespace { 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 2dab43cea17..dad226474fa 100644 --- a/clang/lib/AST/CXXABI.h +++ b/clang/lib/AST/CXXABI.h @@ -62,6 +62,6 @@ public: /// 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 b1c5a0033b8..800c8f83b88 100644 --- a/clang/lib/AST/CXXInheritance.cpp +++ b/clang/lib/AST/CXXInheritance.cpp @@ -470,7 +470,7 @@ namespace { 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 973d79fc5d2..d9a3389c58f 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1350,7 +1350,7 @@ public: 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 c2c590f7c04..a1600cb1101 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -1259,7 +1259,7 @@ namespace { 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 0ea946d498d..c3ce4760097 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -96,7 +96,7 @@ namespace { 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 8f0c57b10b7..36f4139f835 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -188,7 +188,7 @@ namespace { SourceLocation (Expr::*v)() const) { return static_cast<const E*>(expr)->getLocStart(); } -} // namespace +} SourceLocation Expr::getExprLoc() const { switch (getStmtClass()) { @@ -2907,7 +2907,7 @@ namespace { HasSideEffects = true; } }; -} // namespace +} bool Expr::HasSideEffects(const ASTContext &Ctx, bool IncludePossibleEffects) const { @@ -3208,7 +3208,7 @@ namespace { 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 b69bc1c7953..8e472f17414 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -791,7 +791,7 @@ namespace { }; typedef ScopeRAII<false> BlockScopeRAII; typedef ScopeRAII<true> FullExpressionRAII; -} // namespace +} bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) { @@ -1091,7 +1091,7 @@ namespace { 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 @@ enum EvalStmtResult { /// 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 @@ public: } }; -} // namespace +} //===----------------------------------------------------------------------===// // Common base class for lvalue and temporary evaluation. @@ -4411,7 +4411,7 @@ public: } } }; -} // namespace +} //===----------------------------------------------------------------------===// // LValue Evaluation @@ -5153,7 +5153,7 @@ namespace { 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 @@ private: } }; -} // namespace +} bool DataRecursiveIntBinOpEvaluator:: VisitBinOpLHSOnly(EvalResult &LHSResult, const BinaryOperator *E, @@ -8640,7 +8640,7 @@ struct ICEDiag { 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 28cb6d8b36a..7503cbfc980 100644 --- a/clang/lib/AST/ItaniumCXXABI.cpp +++ b/clang/lib/AST/ItaniumCXXABI.cpp @@ -153,7 +153,7 @@ public: 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 38c3ccb673f..e5a31f879b7 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -408,7 +408,7 @@ private: 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 29229ee3c04..aba6796256a 100644 --- a/clang/lib/AST/MicrosoftCXXABI.cpp +++ b/clang/lib/AST/MicrosoftCXXABI.cpp @@ -124,7 +124,7 @@ public: 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 01b1ed3c2de..29a95a5103c 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -313,7 +313,7 @@ private: 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 059262109fc..50a00502ca9 100644 --- a/clang/lib/AST/NestedNameSpecifier.cpp +++ b/clang/lib/AST/NestedNameSpecifier.cpp @@ -377,7 +377,7 @@ namespace { memcpy(&Result, static_cast<char *>(Data) + Offset, sizeof(void*)); return Result; } -} // namespace +} SourceRange NestedNameSpecifierLoc::getSourceRange() const { if (!Qualifier) @@ -470,7 +470,7 @@ namespace { 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 31baed83e92..6f4a89fee39 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -190,7 +190,7 @@ namespace { (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 @@ namespace { 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 36eb08c01cb..658e3dfdeed 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -104,7 +104,7 @@ namespace { void Visit##CLASS(CLASS *Node); #include "clang/AST/StmtNodes.inc" }; -} // namespace +} //===----------------------------------------------------------------------===// // Stmt printing methods. @@ -799,7 +799,7 @@ void OMPClausePrinter::VisitOMPFlushClause(OMPFlushClause *Node) { OS << ")"; } } -} // namespace +} //===----------------------------------------------------------------------===// // OpenMP directives printing methods diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 47e161fd94d..23f8d0c8be7 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -65,7 +65,7 @@ namespace { /// \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 @@ OMPClauseProfiler::VisitOMPCopyprivateClause(const OMPCopyprivateClause *C) { 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 097d0120826..3ac11719409 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -597,7 +597,7 @@ namespace { return Visit(T->getOriginalType()); } }; -} // namespace +} AutoType *Type::getContainedAutoType() const { return GetContainedAutoVisitor().Visit(this); @@ -2101,7 +2101,7 @@ public: L.hasLocalOrUnnamedType() | R.hasLocalOrUnnamedType()); } }; -} // namespace +} static CachedProperties computeCachedProperties(const Type *T); @@ -2143,7 +2143,7 @@ public: 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 f3d379ae6ee..c069eb06173 100644 --- a/clang/lib/AST/TypeLoc.cpp +++ b/clang/lib/AST/TypeLoc.cpp @@ -33,7 +33,7 @@ namespace { } #include "clang/AST/TypeLocNodes.def" }; -} // namespace +} SourceRange TypeLoc::getLocalSourceRangeImpl(TypeLoc TL) { if (TL.isNull()) return SourceRange(); @@ -50,7 +50,7 @@ namespace { } #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 @@ namespace { } #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 @@ namespace { } #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 @@ namespace { } #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 a727a51fe6d..ebe09d85495 100644 --- a/clang/lib/AST/TypePrinter.cpp +++ b/clang/lib/AST/TypePrinter.cpp @@ -108,7 +108,7 @@ namespace { 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 ef3e5bb0b48..ca5f0aad001 100644 --- a/clang/lib/AST/VTableBuilder.cpp +++ b/clang/lib/AST/VTableBuilder.cpp @@ -2237,7 +2237,7 @@ void ItaniumVTableBuilder::dumpLayout(raw_ostream &Out) { Out << '\n'; } -} // namespace +} VTableLayout::VTableLayout(uint64_t NumVTableComponents, const VTableComponent *VTableComponents, |