diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 62f658345a7..6df52d54b42 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -115,7 +115,7 @@ class TypeNameValidatorCCC : public CorrectionCandidateCallback { } // end anonymous namespace -/// \brief Determine whether the token kind starts a simple-type-specifier. +/// Determine whether the token kind starts a simple-type-specifier. bool Sema::isSimpleTypeSpecifier(tok::TokenKind Kind) const { switch (Kind) { // FIXME: Take into account the current language when deciding whether a @@ -166,7 +166,7 @@ enum class UnqualifiedTypeNameLookupResult { }; } // end anonymous namespace -/// \brief Tries to perform unqualified lookup of the type decls in bases for +/// Tries to perform unqualified lookup of the type decls in bases for /// dependent class. /// \return \a NotFound if no any decls is found, \a FoundNotType if found not a /// type decl, \a FoundType if only type decls are found. @@ -266,7 +266,7 @@ static ParsedType recoverFromTypeInKnownDependentBase(Sema &S, return S.CreateParsedType(T, Builder.getTypeSourceInfo(Context, T)); } -/// \brief If the identifier refers to a type name within this scope, +/// If the identifier refers to a type name within this scope, /// return the declaration of that type. /// /// This routine performs ordinary name lookup of the identifier II @@ -760,7 +760,7 @@ void Sema::DiagnoseUnknownTypeName(IdentifierInfo *&II, } } -/// \brief Determine whether the given result set contains either a type name +/// Determine whether the given result set contains either a type name /// or static bool isResultTypeOrTemplate(LookupResult &R, const Token &NextToken) { bool CheckTemplate = R.getSema().getLangOpts().CPlusPlus && @@ -1315,7 +1315,7 @@ void Sema::ActOnExitFunctionContext() { assert(CurContext && "Popped translation unit!"); } -/// \brief Determine whether we allow overloading of the function +/// Determine whether we allow overloading of the function /// PrevDecl with another declaration. /// /// This routine determines whether overloading is possible, not @@ -1501,7 +1501,7 @@ static void RemoveUsingDecls(LookupResult &R) { F.done(); } -/// \brief Check for this common pattern: +/// Check for this common pattern: /// @code /// class S { /// S(const S&); // DO NOT IMPLEMENT @@ -1838,7 +1838,7 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) { } } -/// \brief Look for an Objective-C class in the translation unit. +/// Look for an Objective-C class in the translation unit. /// /// \param Id The name of the Objective-C class we're looking for. If /// typo-correction fixes this name, the Id will be updated @@ -1908,7 +1908,7 @@ Scope *Sema::getNonFieldDeclScope(Scope *S) { return S; } -/// \brief Looks up the declaration of "struct objc_super" and +/// Looks up the declaration of "struct objc_super" and /// saves it for later use in building builtin declaration of /// objc_msgSendSuper and objc_msgSendSuper_stret. If no such /// pre-existing declaration exists no action takes place. @@ -2870,7 +2870,7 @@ static bool haveIncompatibleLanguageLinkages(const T *Old, const T *New) { template<typename T> static bool isExternC(T *D) { return D->isExternC(); } static bool isExternC(VarTemplateDecl *) { return false; } -/// \brief Check whether a redeclaration of an entity introduced by a +/// Check whether a redeclaration of an entity introduced by a /// using-declaration is valid, given that we know it's not an overload /// (nor a hidden tag declaration). template<typename ExpectedDecl> @@ -3563,7 +3563,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, return true; } -/// \brief Completes the merge of two function declarations that are +/// Completes the merge of two function declarations that are /// known to be compatible. /// /// This routine handles the merging of attributes and other @@ -4938,7 +4938,7 @@ DeclarationNameInfo Sema::GetNameForDeclarator(Declarator &D) { return GetNameFromUnqualifiedId(D.getName()); } -/// \brief Retrieves the declaration name from a parsed unqualified-id. +/// Retrieves the declaration name from a parsed unqualified-id. DeclarationNameInfo Sema::GetNameFromUnqualifiedId(const UnqualifiedId &Name) { DeclarationNameInfo NameInfo; @@ -5225,7 +5225,7 @@ bool Sema::DiagnoseClassNameShadow(DeclContext *DC, return false; } -/// \brief Diagnose a declaration whose declarator-id has the given +/// Diagnose a declaration whose declarator-id has the given /// nested-name-specifier. /// /// \param SS The nested-name-specifier of the declarator-id. @@ -5663,7 +5663,7 @@ TryToFixInvalidVariablyModifiedTypeSourceInfo(TypeSourceInfo *TInfo, return FixedTInfo; } -/// \brief Register the given locally-scoped extern "C" declaration so +/// Register the given locally-scoped extern "C" declaration so /// that it can be found later for redeclarations. We include any extern "C" /// declaration that is not visible in the translation unit here, not just /// function-scope declarations. @@ -5684,7 +5684,7 @@ NamedDecl *Sema::findLocallyScopedExternCDecl(DeclarationName Name) { return Result.empty() ? nullptr : *Result.begin(); } -/// \brief Diagnose function specifiers on a declaration of an identifier that +/// Diagnose function specifiers on a declaration of an identifier that /// does not identify a function. void Sema::DiagnoseFunctionSpecifiers(const DeclSpec &DS) { // FIXME: We should probably indicate the identifier in question to avoid @@ -5826,7 +5826,7 @@ Sema::ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *NewTD, return NewTD; } -/// \brief Determines whether the given declaration is an out-of-scope +/// Determines whether the given declaration is an out-of-scope /// previous declaration. /// /// This routine should be invoked when name lookup has found a @@ -6251,7 +6251,7 @@ bool Sema::adjustContextForLocalExternDecl(DeclContext *&DC) { return true; } -/// \brief Returns true if given declaration has external C language linkage. +/// Returns true if given declaration has external C language linkage. static bool isDeclExternC(const Decl *D) { if (const auto *FD = dyn_cast<FunctionDecl>(D)) return FD->isExternC(); @@ -6958,7 +6958,7 @@ static bool shouldWarnIfShadowedDecl(const DiagnosticsEngine &Diags, return !Diags.isIgnored(diag::warn_decl_shadow, R.getNameLoc()); } -/// \brief Return the declaration shadowed by the given variable \p D, or null +/// Return the declaration shadowed by the given variable \p D, or null /// if it doesn't shadow any declaration or shadowing warnings are disabled. NamedDecl *Sema::getShadowedDeclaration(const VarDecl *D, const LookupResult &R) { @@ -6975,7 +6975,7 @@ NamedDecl *Sema::getShadowedDeclaration(const VarDecl *D, : nullptr; } -/// \brief Return the declaration shadowed by the given typedef \p D, or null +/// Return the declaration shadowed by the given typedef \p D, or null /// if it doesn't shadow any declaration or shadowing warnings are disabled. NamedDecl *Sema::getShadowedDeclaration(const TypedefNameDecl *D, const LookupResult &R) { @@ -6990,7 +6990,7 @@ NamedDecl *Sema::getShadowedDeclaration(const TypedefNameDecl *D, return isa<TypedefNameDecl>(ShadowedDecl) ? ShadowedDecl : nullptr; } -/// \brief Diagnose variable or built-in function shadowing. Implements +/// Diagnose variable or built-in function shadowing. Implements /// -Wshadow. /// /// This method is called whenever a VarDecl is added to a "useful" @@ -7121,7 +7121,7 @@ void Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) { } } -/// \brief Check -Wshadow without the advantage of a previous lookup. +/// Check -Wshadow without the advantage of a previous lookup. void Sema::CheckShadow(Scope *S, VarDecl *D) { if (Diags.isIgnored(diag::warn_decl_shadow, D->getLocation())) return; @@ -7491,7 +7491,7 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } -/// \brief Perform semantic checking on a newly-created variable +/// Perform semantic checking on a newly-created variable /// declaration. /// /// This routine performs all of the type-checking required for a @@ -7562,7 +7562,7 @@ struct FindOverriddenMethod { enum OverrideErrorKind { OEK_All, OEK_NonDeleted, OEK_Deleted }; } // end anonymous namespace -/// \brief Report an error regarding overriding, along with any relevant +/// Report an error regarding overriding, along with any relevant /// overridden methods. /// /// \param DiagID the primary error to report. @@ -7678,7 +7678,7 @@ void Sema::MarkTypoCorrectedFunctionDefinition(const NamedDecl *F) { TypoCorrectedFunctionDefinitions.insert(F); } -/// \brief Generate diagnostics for an invalid function redeclaration. +/// Generate diagnostics for an invalid function redeclaration. /// /// This routine handles generating the diagnostic messages for an invalid /// function redeclaration, including finding possible similar declarations @@ -9156,7 +9156,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, return NewFD; } -/// \brief Checks if the new declaration declared in dependent context must be +/// Checks if the new declaration declared in dependent context must be /// put in the same redeclaration chain as the specified declaration. /// /// \param D Declaration that is checked. @@ -9182,7 +9182,7 @@ bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) { D->getFriendObjectKind() != Decl::FOK_None); } -/// \brief Check the target attribute of the function for MultiVersion +/// Check the target attribute of the function for MultiVersion /// validity. /// /// Returns true if there was an error, false otherwise. @@ -9333,7 +9333,7 @@ static bool CheckMultiVersionAdditionalRules(Sema &S, const FunctionDecl *OldFD, return false; } -/// \brief Check the validity of a mulitversion function declaration. +/// Check the validity of a mulitversion function declaration. /// Also sets the multiversion'ness' of the function itself. /// /// This sets NewFD->isInvalidDecl() to true if there was an error. @@ -9517,7 +9517,7 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD, return false; } -/// \brief Perform semantic checking of a new function declaration. +/// Perform semantic checking of a new function declaration. /// /// Performs semantic analysis of the new function declaration /// NewFD. This routine performs all semantic checking that does not @@ -11564,7 +11564,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { Context.addModuleInitializer(ModuleScopes.back().Module, var); } -/// \brief Determines if a variable's alignment is dependent. +/// Determines if a variable's alignment is dependent. static bool hasDependentAlignment(VarDecl *VD) { if (VD->getType()->isDependentType()) return true; @@ -12081,7 +12081,7 @@ Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) { return New; } -/// \brief Synthesizes a variable for a parameter arising from a +/// Synthesizes a variable for a parameter arising from a /// typedef. ParmVarDecl *Sema::BuildParmVarDeclForTypedef(DeclContext *DC, SourceLocation Loc, @@ -12584,7 +12584,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, return D; } -/// \brief Given the set of return statements within a function body, +/// Given the set of return statements within a function body, /// compute the variables that are subject to the named return value /// optimization. /// @@ -13089,7 +13089,7 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, return FD; } -/// \brief Adds any function attributes that we know a priori based on +/// Adds any function attributes that we know a priori based on /// the declaration of this function. /// /// These attributes can apply both to implicitly-declared builtins @@ -13281,7 +13281,7 @@ TypedefDecl *Sema::ParseTypedefDecl(Scope *S, Declarator &D, QualType T, return NewTD; } -/// \brief Check that this is a valid underlying type for an enum declaration. +/// Check that this is a valid underlying type for an enum declaration. bool Sema::CheckEnumUnderlyingType(TypeSourceInfo *TI) { SourceLocation UnderlyingLoc = TI->getTypeLoc().getBeginLoc(); QualType T = TI->getType(); @@ -13331,7 +13331,7 @@ bool Sema::CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, return false; } -/// \brief Get diagnostic %select index for tag kind for +/// Get diagnostic %select index for tag kind for /// redeclaration diagnostic message. /// WARNING: Indexes apply to particular diagnostics only! /// @@ -13345,7 +13345,7 @@ static unsigned getRedeclDiagFromTagKind(TagTypeKind Tag) { } } -/// \brief Determine if tag kind is a class-key compatible with +/// Determine if tag kind is a class-key compatible with /// class for redeclaration (class, struct, or __interface). /// /// \returns true iff the tag kind is compatible. @@ -13379,7 +13379,7 @@ Sema::NonTagKind Sema::getNonTagTypeDeclKind(const Decl *PrevDecl, llvm_unreachable("invalid TTK"); } -/// \brief Determine whether a tag with a given kind is acceptable +/// Determine whether a tag with a given kind is acceptable /// as a redeclaration of the given tag declaration. /// /// \returns true if the new tag kind is acceptable, false otherwise. @@ -13515,7 +13515,7 @@ static FixItHint createFriendTagNNSFixIt(Sema &SemaRef, NamedDecl *ND, Scope *S, return FixItHint::CreateInsertion(NameLoc, Insertion); } -/// \brief Determine whether a tag originally declared in context \p OldDC can +/// Determine whether a tag originally declared in context \p OldDC can /// be redeclared with an unqualified name in \p NewDC (assuming name lookup /// found a declaration in \p OldDC as a previous decl, perhaps through a /// using-declaration). @@ -13536,7 +13536,7 @@ static bool isAcceptableTagRedeclContext(Sema &S, DeclContext *OldDC, return false; } -/// \brief This is invoked when we see 'struct foo' or 'struct {'. In the +/// This is invoked when we see 'struct foo' or 'struct {'. In the /// former case, Name will be non-null. In the later case, Name will be null. /// TagSpec indicates what kind of tag this is. TUK indicates whether this is a /// reference/declaration/definition of a tag. @@ -14838,7 +14838,7 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record, return NewFD; } -/// \brief Build a new FieldDecl and check its well-formedness. +/// Build a new FieldDecl and check its well-formedness. /// /// This routine builds a new FieldDecl given the fields name, type, /// record, etc. \p PrevDecl should refer to any previous declaration @@ -15708,7 +15708,7 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ProcessDeclAttributeList(S, Record, Attr); } -/// \brief Determine whether the given integral value is representable within +/// Determine whether the given integral value is representable within /// the given type T. static bool isRepresentableIntegerValue(ASTContext &Context, llvm::APSInt &Value, @@ -15725,7 +15725,7 @@ static bool isRepresentableIntegerValue(ASTContext &Context, return Value.getMinSignedBits() <= BitWidth; } -// \brief Given an integral type, return the next larger integral type +// Given an integral type, return the next larger integral type // (or a NULL type of no such type exists). static QualType getNextLargerIntegralType(ASTContext &Context, QualType T) { // FIXME: Int128/UInt128 support, which also needs to be introduced into |