diff options
Diffstat (limited to 'clang/lib/Sema')
25 files changed, 81 insertions, 84 deletions
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp index 8c5589b43ae..36030b99a30 100644 --- a/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp @@ -99,7 +99,7 @@ namespace { } } }; -} // namespace +} /// CheckUnreachable - Check for unreachable code. static void CheckUnreachable(Sema &S, AnalysisDeclContext &AC) { @@ -493,7 +493,7 @@ struct CheckFallThroughDiagnostics { } }; -} // 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 @@ public: bool doesContainReference() const { return FoundReference; } }; -} // namespace +} static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) { QualType VariableTy = VD->getType().getCanonicalType(); @@ -1059,7 +1059,7 @@ namespace { Sema &S; llvm::SmallPtrSet<const CFGBlock *, 16> ReachableBlocks; }; -} // namespace +} static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) { @@ -1414,7 +1414,7 @@ private: }); } }; -} // namespace +} namespace clang { namespace { @@ -1432,8 +1432,7 @@ struct SortDiagBySourceLocation { return SM.isBeforeInTranslationUnit(left.first.first, right.first.first); } }; -} // namespace -} // namespace clang +}} //===----------------------------------------------------------------------===// // -Wthread-safety @@ -1794,9 +1793,7 @@ public: 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 1d7d27c0f0e..0e973cc5eba 100644 --- a/clang/lib/Sema/SemaAccess.cpp +++ b/clang/lib/Sema/SemaAccess.cpp @@ -248,7 +248,7 @@ private: const CXXRecordDecl *DeclaringClass; }; -} // namespace +} /// Checks whether one class might instantiate to the other. static bool MightInstantiateTo(const CXXRecordDecl *From, @@ -679,7 +679,7 @@ struct ProtectedFriendContext { 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 aeea26b4e3e..9e146ed3a64 100644 --- a/clang/lib/Sema/SemaCXXScopeSpec.cpp +++ b/clang/lib/Sema/SemaCXXScopeSpec.cpp @@ -419,7 +419,7 @@ class NestedNameSpecifierValidatorCCC : public CorrectionCandidateCallback { 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 db3f19607fd..d9dc4df9f27 100644 --- a/clang/lib/Sema/SemaCast.cpp +++ b/clang/lib/Sema/SemaCast.cpp @@ -140,7 +140,7 @@ namespace { 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 af49994b261..f76727cad88 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -3198,7 +3198,7 @@ protected: bool IsStringLocation, Range StringRange, ArrayRef<FixItHint> Fixit = None); }; -} // namespace +} SourceRange CheckFormatHandler::getFormatStringRange() { return OrigFormatExpr->getSourceRange(); @@ -3552,7 +3552,7 @@ public: const Expr *E); }; -} // namespace +} bool CheckPrintfHandler::HandleInvalidPrintfConversionSpecifier( const analyze_printf::PrintfSpecifier &FS, @@ -4275,7 +4275,7 @@ public: void HandleIncompleteScanList(const char *start, const char *end) override; }; -} // namespace +} void CheckScanfHandler::HandleIncompleteScanList(const char *start, const char *end) { @@ -7944,7 +7944,7 @@ public: Tree.merge(Elts[I]); } }; -} // namespace +} void Sema::CheckUnsequencedOperations(Expr *E) { SmallVector<Expr *, 8> WorkList; @@ -8338,7 +8338,7 @@ namespace { Range = e->getSourceRange(); } }; -} // namespace +} /// Consider whether capturing the given variable can possibly lead to /// a retain cycle. @@ -8484,7 +8484,7 @@ namespace { } } }; -} // namespace +} /// Check whether the given argument is a block which captures a /// variable. @@ -9322,7 +9322,7 @@ bool isLayoutCompatible(ASTContext &C, QualType T1, QualType T2) { 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 284f7cf8d55..ebb6bbcd345 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -342,7 +342,7 @@ namespace { bool IsImpossibleToSatisfy(const NamedDecl *ND) const; //@} }; -} // namespace +} class ResultBuilder::ShadowMapEntry::iterator { llvm::PointerUnion<const NamedDecl *, const DeclIndexPair *> DeclOrIterator; @@ -1264,7 +1264,7 @@ namespace { 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 ee039940585..ce89d993f3c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -89,7 +89,7 @@ class TypeNameValidatorCCC : public CorrectionCandidateCallback { 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 @@ struct GNUCompatibleParamWarning { QualType PromotedType; }; -} // namespace +} /// getSpecialMember - get the special member enum for a method. Sema::CXXSpecialMember Sema::getSpecialMember(const CXXMethodDecl *MD) { @@ -6607,7 +6607,7 @@ class DifferentNameValidatorCCC : public CorrectionCandidateCallback { CXXRecordDecl *ExpectedParent; }; -} // namespace +} /// \brief Generate diagnostics for an invalid function redeclaration. /// @@ -8759,7 +8759,7 @@ namespace { 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 471a03e123a..7ed9bfcb979 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -145,7 +145,7 @@ namespace { return S->Diag(Lambda->getLocStart(), diag::err_lambda_capture_default_arg); } -} // namespace +} void Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc, @@ -2834,7 +2834,7 @@ private: CXXRecordDecl *ClassDecl; }; -} // namespace +} /// \brief Handle a C++ member initializer. MemInitResult @@ -3756,7 +3756,7 @@ struct BaseAndFieldInfo { return false; } }; -} // namespace +} /// \brief Determine whether the given type is an incomplete or zero-lenfgth /// array type. @@ -4215,7 +4215,7 @@ bool CheckRedundantUnionInit(Sema &S, return false; } -} // namespace +} /// ActOnMemInitializers - Handle the member initializers for a constructor. void Sema::ActOnMemInitializers(Decl *ConstructorDecl, @@ -4637,7 +4637,7 @@ void AbstractUsageInfo::CheckType(const NamedDecl *D, TypeLoc TL, 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 @@ struct SpecialMemberDeletionInfo { bool isAccessible(Subobject Subobj, CXXMethodDecl *D); }; -} // namespace +} /// Is the given special member inaccessible when used on the given /// sub-object. @@ -7517,7 +7517,7 @@ public: } }; -} // namespace +} static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, @@ -8883,7 +8883,7 @@ struct DeclaringSpecialMember { return WasAlreadyBeingDeclared; } }; -} // namespace +} CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor( CXXRecordDecl *ClassDecl) { @@ -9267,7 +9267,7 @@ private: 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 @@ namespace { 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 6ca4734dfe9..543566fdb7c 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -446,7 +446,7 @@ class ObjCInterfaceValidatorCCC : public CorrectionCandidateCallback { ObjCInterfaceDecl *CurrentIDecl; }; -} // namespace +} static void diagnoseUseOfProtocols(Sema &TheSema, ObjCContainerDecl *CD, @@ -3059,7 +3059,7 @@ private: searchFromContainer(container); } }; -} // namespace +} void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, @@ -3717,7 +3717,7 @@ namespace { 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 f26b5368a34..ffa47eeb587 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1138,7 +1138,7 @@ ExprResult doComplexIntegralCast(Sema &S, Expr *op, QualType toType) { return S.ImpCastExprToType(op, S.Context.getComplexType(toType), CK_IntegralComplexCast); } -} // namespace +} /// \brief Handle integer arithmetic conversions. Helper function of /// UsualArithmeticConversions() @@ -4257,7 +4257,7 @@ public: private: const IdentifierInfo *const FunctionName; }; -} // namespace +} static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, FunctionDecl *FDecl, @@ -11974,7 +11974,7 @@ namespace { return E; } }; -} // namespace +} ExprResult Sema::TransformToPotentiallyEvaluated(Expr *E) { assert(isUnevaluatedContext() && @@ -13310,7 +13310,7 @@ namespace { bool TraverseTemplateArgument(const TemplateArgument &Arg); bool TraverseRecordType(RecordType *T); }; -} // namespace +} bool MarkReferencedDecls::TraverseTemplateArgument( const TemplateArgument &Arg) { @@ -13409,7 +13409,7 @@ namespace { 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 @@ namespace { 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 @@ namespace { 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 43c097e39ed..6c839f356fd 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -2424,7 +2424,7 @@ private: /// in-class initializer. MismatchResult analyzeInClassInitializer(); }; -} // namespace +} MismatchingNewDeleteDetector::MismatchResult MismatchingNewDeleteDetector::analyzeDeleteExpr(const CXXDeleteExpr *DE) { @@ -6571,7 +6571,7 @@ public: 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 d01640a3692..e421349338b 100644 --- a/clang/lib/Sema/SemaExprMember.cpp +++ b/clang/lib/Sema/SemaExprMember.cpp @@ -579,7 +579,7 @@ private: 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 f6a5a067ddb..9947fad70dd 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -1895,7 +1895,7 @@ class ObjCInterfaceOrSuperCCC : public CorrectionCandidateCallback { } }; -} // namespace +} Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S, IdentifierInfo *Name, @@ -3184,7 +3184,7 @@ namespace { } } }; -} // namespace +} bool Sema::isKnownName(StringRef name) { if (name.empty()) diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 5c149e116a3..821d7f64b25 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -1915,7 +1915,7 @@ class FieldInitializerValidatorCCC : public CorrectionCandidateCallback { 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 b13b99237de..3fd1f21ba3f 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -204,7 +204,7 @@ namespace { UnqualUsingEntry::Comparator())); } }; -} // namespace +} // Retrieve the set of identifier namespaces that correspond to a // specific kind of name lookup. @@ -875,7 +875,7 @@ struct FindLocalExternScope { LookupResult &R; bool OldFindLocalExtern; }; -} // namespace +} bool Sema::CppLookupName(LookupResult &R, Scope *S) { assert(getLangOpts().CPlusPlus && "Can perform only C++ lookup"); @@ -2121,7 +2121,7 @@ namespace { 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 b6559b2e217..e609fcf1d9b 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -4924,7 +4924,7 @@ public: 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 072dc55c0a6..a0fdcd78e59 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -536,7 +536,7 @@ namespace { 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 @@ namespace { *i->Addr = i->Saved; } }; -} // namespace +} /// checkPlaceholderForOverload - Do any interesting placeholder-like /// preprocessing on the given expression. @@ -9555,7 +9555,7 @@ struct CompareOverloadCandidatesForDisplay { 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 @@ struct CompareTemplateSpecCandidatesForDisplay { 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 @@ public: 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 @@ public: } }; -} // 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 a3899883d17..3e465af9632 100644 --- a/clang/lib/Sema/SemaPseudoObject.cpp +++ b/clang/lib/Sema/SemaPseudoObject.cpp @@ -338,7 +338,7 @@ namespace { 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 a7e56e7d06b..50e4345216a 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -530,7 +530,7 @@ namespace { return LHS < RHS.first; } }; -} // namespace +} /// CmpCaseVals - Comparison predicate for sorting case values. /// @@ -1904,7 +1904,7 @@ VarDecl *BuildForRangeVarDecl(Sema &SemaRef, SourceLocation Loc, return Decl; } -} // namespace +} static bool ObjCEnumerationCollection(Expr *Collection) { return !Collection->isTypeDependent() @@ -2116,7 +2116,7 @@ struct InvalidateOnErrorScope { Decl *D; bool Enabled; }; -} // namespace +} /// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement. StmtResult @@ -2952,7 +2952,7 @@ bool LocalTypedefNameReferencer::VisitRecordType(const RecordType *RT) { 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 DenseMapInfo<CatchHandlerType> { template <> struct isPodLike<CatchHandlerType> { static const bool value = true; }; -} // namespace llvm +} namespace { class CatchTypePublicBases { @@ -3526,7 +3526,7 @@ public: 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 5c3a0158891..f4740a5cd85 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -1549,7 +1549,7 @@ struct DependencyChecker : RecursiveASTVisitor<DependencyChecker> { return TraverseType(T->getInjectedSpecializationType()); } }; -} // namespace +} /// Determines whether a given type depends on the given parameter /// list. @@ -3953,7 +3953,7 @@ namespace { bool VisitTagDecl(const TagDecl *Tag); bool VisitNestedNameSpecifier(NestedNameSpecifier *NNS); }; -} // namespace +} bool UnnamedLocalNoLinkageFinder::VisitBuiltinType(const BuiltinType*) { return false; @@ -8220,7 +8220,7 @@ namespace { 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 c5b73f53c55..6f676ad7c55 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -58,7 +58,7 @@ namespace clang { /// terms of noreturn and default calling convention adjustments. TDF_InOverloadResolution = 0x20 }; -} // namespace clang +} using namespace clang; @@ -3913,7 +3913,7 @@ namespace { 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 b9890d0fd3f..82ff7c0ca4f 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -844,7 +844,7 @@ namespace { 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 6a31125c1f8..fd3ba3549b4 100644 --- a/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -195,7 +195,7 @@ namespace { 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 @@ class ParameterPackValidatorCCC : public CorrectionCandidateCallback { } }; -} // 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 aac0862c09a..03cbdfdbf1d 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -242,7 +242,7 @@ namespace { savedAttrs.back()->setNext(nullptr); } }; -} // namespace +} static void spliceAttrIntoList(AttributeList &attr, AttributeList *&head) { attr.setNext(head); @@ -1409,7 +1409,7 @@ namespace { /// /// 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 @@ namespace { llvm_unreachable("unsupported TypeLoc kind in declarator!"); } }; -} // namespace +} static void fillAtomicQualLoc(AtomicTypeLoc ATL, const DeclaratorChunk &Chunk) { SourceLocation Loc; @@ -4990,7 +4990,7 @@ namespace { llvm_unreachable("unknown wrapping kind"); } }; -} // namespace +} static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State, AttributeList &Attr, @@ -5904,7 +5904,7 @@ namespace { 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 ed948676b67..82844b39146 100644 --- a/clang/lib/Sema/TypeLocBuilder.h +++ b/clang/lib/Sema/TypeLocBuilder.h @@ -146,6 +146,6 @@ private: } }; -} // namespace clang +} #endif |

