diff options
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index d5f6b640a70..a4b9086aa4c 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -46,7 +46,7 @@ clang::getTemplateParamsRange(TemplateParameterList const * const *Ps, } namespace clang { -/// \brief [temp.constr.decl]p2: A template's associated constraints are +/// [temp.constr.decl]p2: A template's associated constraints are /// defined as a single constraint-expression derived from the introduced /// constraint-expressions [ ... ]. /// @@ -65,7 +65,7 @@ static Expr *clang::formAssociatedConstraints(TemplateParameterList *Params, return Params->getRequiresClause(); } -/// \brief Determine whether the declaration found is acceptable as the name +/// Determine whether the declaration found is acceptable as the name /// of a template and, if so, return that template declaration. Otherwise, /// returns NULL. static NamedDecl *isAcceptableTemplateName(ASTContext &Context, @@ -765,7 +765,7 @@ static TemplateArgumentLoc translateTemplateArgument(Sema &SemaRef, llvm_unreachable("Unhandled parsed template argument"); } -/// \brief Translates template arguments as provided by the parser +/// Translates template arguments as provided by the parser /// into template arguments used by semantic analysis. void Sema::translateTemplateArguments(const ASTTemplateArgsPtr &TemplateArgsIn, TemplateArgumentListInfo &TemplateArgs) { @@ -904,7 +904,7 @@ NamedDecl *Sema::ActOnTypeParameter(Scope *S, bool Typename, return Param; } -/// \brief Check that the type of a non-type template parameter is +/// Check that the type of a non-type template parameter is /// well-formed. /// /// \returns the (possibly-promoted) parameter type if valid; @@ -1975,7 +1975,7 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template, ->setIsCopyDeductionCandidate(); } -/// \brief Diagnose the presence of a default template argument on a +/// Diagnose the presence of a default template argument on a /// template parameter, which is ill-formed in certain contexts. /// /// \returns true if the default template argument should be dropped. @@ -2031,7 +2031,7 @@ static bool DiagnoseDefaultTemplateArgument(Sema &S, llvm_unreachable("Invalid TemplateParamListContext!"); } -/// \brief Check for unexpanded parameter packs within the template parameters +/// Check for unexpanded parameter packs within the template parameters /// of a template template parameter, recursively. static bool DiagnoseUnexpandedParameterPacks(Sema &S, TemplateTemplateParmDecl *TTP) { @@ -2062,7 +2062,7 @@ static bool DiagnoseUnexpandedParameterPacks(Sema &S, return false; } -/// \brief Checks the validity of a template parameter list, possibly +/// Checks the validity of a template parameter list, possibly /// considering the template parameter list from a previous /// declaration. /// @@ -2429,7 +2429,7 @@ static SourceRange getRangeOfTypeInNestedNameSpecifier(ASTContext &Context, return SourceRange(); } -/// \brief Match the given template parameter lists to the given scope +/// Match the given template parameter lists to the given scope /// specifier, returning the template parameter list that applies to the /// name. /// @@ -3804,7 +3804,7 @@ DeclResult Sema::ActOnVarTemplateSpecialization( } namespace { -/// \brief A partial specialization whose template arguments have matched +/// A partial specialization whose template arguments have matched /// a given template-id. struct PartialSpecMatchResult { VarTemplatePartialSpecializationDecl *Partial; @@ -4092,7 +4092,7 @@ Sema::BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, return BuildTemplateIdExpr(SS, TemplateKWLoc, R, /*ADL*/ false, TemplateArgs); } -/// \brief Form a dependent template name. +/// Form a dependent template name. /// /// This action forms a dependent template name given the template /// name and its (presumably dependent) scope specifier. For @@ -4319,7 +4319,7 @@ bool Sema::CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, return false; } -/// \brief Substitute template arguments into the default template argument for +/// Substitute template arguments into the default template argument for /// the given template type parameter. /// /// \param SemaRef the semantic analysis object for which we are performing @@ -4375,7 +4375,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, return ArgType; } -/// \brief Substitute template arguments into the default template argument for +/// Substitute template arguments into the default template argument for /// the given non-type template parameter. /// /// \param SemaRef the semantic analysis object for which we are performing @@ -4423,7 +4423,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, return SemaRef.SubstExpr(Param->getDefaultArgument(), TemplateArgLists); } -/// \brief Substitute template arguments into the default template argument for +/// Substitute template arguments into the default template argument for /// the given template template parameter. /// /// \param SemaRef the semantic analysis object for which we are performing @@ -4487,7 +4487,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, TemplateArgLists); } -/// \brief If the given template parameter has a default template +/// If the given template parameter has a default template /// argument, substitute into that default template argument and /// return the corresponding template argument. TemplateArgumentLoc @@ -4588,7 +4588,7 @@ static TemplateArgumentLoc convertTypeTemplateArgumentToTemplate(TypeLoc TLoc) { return TemplateArgumentLoc(); } -/// \brief Check that the given template argument corresponds to the given +/// Check that the given template argument corresponds to the given /// template parameter. /// /// \param Param The template parameter against which the argument will be @@ -4850,7 +4850,7 @@ bool Sema::CheckTemplateArgument(NamedDecl *Param, return false; } -/// \brief Diagnose an arity mismatch in the +/// Diagnose an arity mismatch in the static bool diagnoseArityMismatch(Sema &S, TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs) { @@ -4871,7 +4871,7 @@ static bool diagnoseArityMismatch(Sema &S, TemplateDecl *Template, return true; } -/// \brief Check whether the template parameter is a pack expansion, and if so, +/// Check whether the template parameter is a pack expansion, and if so, /// determine the number of parameters produced by that expansion. For instance: /// /// \code @@ -4927,7 +4927,7 @@ static bool diagnoseMissingArgument(Sema &S, SourceLocation Loc, return diagnoseArityMismatch(S, TD, Loc, Args); } -/// \brief Check that the given template argument list is well-formed +/// Check that the given template argument list is well-formed /// for specializing the given template. bool Sema::CheckTemplateArgumentList( TemplateDecl *Template, SourceLocation TemplateLoc, @@ -5434,7 +5434,7 @@ bool UnnamedLocalNoLinkageFinder::VisitNestedNameSpecifier( llvm_unreachable("Invalid NestedNameSpecifier::Kind!"); } -/// \brief Check a template argument against its corresponding +/// Check a template argument against its corresponding /// template type parameter. /// /// This routine implements the semantics of C++ [temp.arg.type]. It @@ -5472,7 +5472,7 @@ enum NullPointerValueKind { NPV_Error }; -/// \brief Determine whether the given template argument is a null pointer +/// Determine whether the given template argument is a null pointer /// value of the appropriate type. static NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, @@ -5568,7 +5568,7 @@ isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, return NPV_NotNullPointer; } -/// \brief Checks whether the given template argument is compatible with its +/// Checks whether the given template argument is compatible with its /// template parameter. static bool CheckTemplateArgumentIsCompatibleWithParameter( Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, @@ -5625,7 +5625,7 @@ static bool CheckTemplateArgumentIsCompatibleWithParameter( return false; } -/// \brief Checks whether the given template argument is the address +/// Checks whether the given template argument is the address /// of an object or function according to C++ [temp.arg.nontype]p1. static bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, @@ -5913,7 +5913,7 @@ CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, return false; } -/// \brief Checks whether the given template argument is a pointer to +/// Checks whether the given template argument is a pointer to /// member constant according to C++ [temp.arg.nontype]p1. static bool CheckTemplateArgumentPointerToMember(Sema &S, NonTypeTemplateParmDecl *Param, @@ -6042,7 +6042,7 @@ static bool CheckTemplateArgumentPointerToMember(Sema &S, return true; } -/// \brief Check a template argument against its corresponding +/// Check a template argument against its corresponding /// non-type template parameter. /// /// This routine implements the semantics of C++ [temp.arg.nontype]. @@ -6560,7 +6560,7 @@ static void DiagnoseTemplateParameterListArityMismatch( Sema &S, TemplateParameterList *New, TemplateParameterList *Old, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc); -/// \brief Check a template argument against its corresponding +/// Check a template argument against its corresponding /// template template parameter. /// /// This routine implements the semantics of C++ [temp.arg.template]. @@ -6627,7 +6627,7 @@ bool Sema::CheckTemplateTemplateArgument(TemplateParameterList *Params, Arg.getLocation()); } -/// \brief Given a non-type template argument that refers to a +/// Given a non-type template argument that refers to a /// declaration and the type of its corresponding non-type template /// parameter, produce an expression that properly refers to that /// declaration. @@ -6750,7 +6750,7 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, return BuildDeclRefExpr(VD, T, VK, Loc); } -/// \brief Construct a new expression that refers to the given +/// Construct a new expression that refers to the given /// integral template argument with the given source-location /// information. /// @@ -6810,7 +6810,7 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, return E; } -/// \brief Match two template parameters within template parameter lists. +/// Match two template parameters within template parameter lists. static bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, NamedDecl *Old, bool Complain, Sema::TemplateParameterListEqualKind Kind, @@ -6913,7 +6913,7 @@ static bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, NamedDecl *Old, return true; } -/// \brief Diagnose a known arity mismatch when comparing template argument +/// Diagnose a known arity mismatch when comparing template argument /// lists. static void DiagnoseTemplateParameterListArityMismatch(Sema &S, @@ -6935,7 +6935,7 @@ void DiagnoseTemplateParameterListArityMismatch(Sema &S, << SourceRange(Old->getTemplateLoc(), Old->getRAngleLoc()); } -/// \brief Determine whether the given template parameter lists are +/// Determine whether the given template parameter lists are /// equivalent. /// /// \param New The new template parameter list, typically written in the @@ -7027,7 +7027,7 @@ Sema::TemplateParameterListsAreEqual(TemplateParameterList *New, return true; } -/// \brief Check whether a template can be declared within this scope. +/// Check whether a template can be declared within this scope. /// /// If the template declaration is valid in this scope, returns /// false. Otherwise, issues a diagnostic and returns true. @@ -7076,7 +7076,7 @@ Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) { << TemplateParams->getSourceRange(); } -/// \brief Determine what kind of template specialization the given declaration +/// Determine what kind of template specialization the given declaration /// is. static TemplateSpecializationKind getTemplateSpecializationKind(Decl *D) { if (!D) @@ -7092,7 +7092,7 @@ static TemplateSpecializationKind getTemplateSpecializationKind(Decl *D) { return TSK_Undeclared; } -/// \brief Check whether a specialization is well-formed in the current +/// Check whether a specialization is well-formed in the current /// context. /// /// This routine determines whether a template specialization can be declared @@ -7208,7 +7208,7 @@ static SourceRange findTemplateParameter(unsigned Depth, TypeLoc TL) { return Checker.MatchLoc; } -/// \brief Subroutine of Sema::CheckTemplatePartialSpecializationArgs +/// Subroutine of Sema::CheckTemplatePartialSpecializationArgs /// that checks non-type template partial specialization arguments. static bool CheckNonTypeTemplatePartialSpecializationArgs( Sema &S, SourceLocation TemplateNameLoc, NonTypeTemplateParmDecl *Param, @@ -7296,7 +7296,7 @@ static bool CheckNonTypeTemplatePartialSpecializationArgs( return false; } -/// \brief Check the non-type template arguments of a class template +/// Check the non-type template arguments of a class template /// partial specialization according to C++ [temp.class.spec]p9. /// /// \param TemplateNameLoc the location of the template name. @@ -7710,7 +7710,7 @@ Decl *Sema::ActOnTemplateDeclarator(Scope *S, return NewDecl; } -/// \brief Strips various properties off an implicit instantiation +/// Strips various properties off an implicit instantiation /// that has just been explicitly specialized. static void StripImplicitInstantiation(NamedDecl *D) { D->dropAttr<DLLImportAttr>(); @@ -7720,7 +7720,7 @@ static void StripImplicitInstantiation(NamedDecl *D) { FD->setInlineSpecified(false); } -/// \brief Compute the diagnostic location for an explicit instantiation +/// Compute the diagnostic location for an explicit instantiation // declaration or definition. static SourceLocation DiagLocForExplicitInstantiation( NamedDecl* D, SourceLocation PointOfInstantiation) { @@ -7737,7 +7737,7 @@ static SourceLocation DiagLocForExplicitInstantiation( return PrevDiagLoc; } -/// \brief Diagnose cases where we have an explicit template specialization +/// Diagnose cases where we have an explicit template specialization /// before/after an explicit template instantiation, producing diagnostics /// for those cases where they are required and determining whether the /// new specialization/instantiation will have any effect. @@ -7922,7 +7922,7 @@ Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, llvm_unreachable("Missing specialization/instantiation case?"); } -/// \brief Perform semantic analysis for the given dependent function +/// Perform semantic analysis for the given dependent function /// template specialization. /// /// The only possible way to get a dependent function template specialization @@ -7962,7 +7962,7 @@ Sema::CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, return false; } -/// \brief Perform semantic analysis for the given function template +/// Perform semantic analysis for the given function template /// specialization. /// /// This routine performs all of the semantic analysis required for an @@ -8185,7 +8185,7 @@ bool Sema::CheckFunctionTemplateSpecialization( return false; } -/// \brief Perform semantic analysis for the given non-template member +/// Perform semantic analysis for the given non-template member /// specialization. /// /// This routine performs all of the semantic analysis required for an @@ -8395,7 +8395,7 @@ void Sema::CompleteMemberSpecialization(NamedDecl *Member, llvm_unreachable("unknown member specialization kind"); } -/// \brief Check the scope of an explicit instantiation. +/// Check the scope of an explicit instantiation. /// /// \returns true if a serious error occurs, false otherwise. static bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, @@ -8449,7 +8449,7 @@ static bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, return false; } -/// \brief Determine whether the given scope specifier has a template-id in it. +/// Determine whether the given scope specifier has a template-id in it. static bool ScopeSpecifierHasTemplateId(const CXXScopeSpec &SS) { if (!SS.isSet()) return false; @@ -9503,7 +9503,7 @@ static bool isEnableIf(NestedNameSpecifierLoc NNS, const IdentifierInfo &II, return true; } -/// \brief Build the type that describes a C++ typename specifier, +/// Build the type that describes a C++ typename specifier, /// e.g., "typename T::type". QualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, @@ -9678,7 +9678,7 @@ namespace { : TreeTransform<CurrentInstantiationRebuilder>(SemaRef), Loc(Loc), Entity(Entity) { } - /// \brief Determine whether the given type \p T has already been + /// Determine whether the given type \p T has already been /// transformed. /// /// For the purposes of type reconstruction, a type has already been @@ -9687,14 +9687,14 @@ namespace { return T.isNull() || !T->isDependentType(); } - /// \brief Returns the location of the entity whose type is being + /// Returns the location of the entity whose type is being /// rebuilt. SourceLocation getBaseLocation() { return Loc; } - /// \brief Returns the name of the entity whose type is being rebuilt. + /// Returns the name of the entity whose type is being rebuilt. DeclarationName getBaseEntity() { return Entity; } - /// \brief Sets the "base" location and entity when that + /// Sets the "base" location and entity when that /// information is known based on another transformation. void setBase(SourceLocation Loc, DeclarationName Entity) { this->Loc = Loc; @@ -9708,7 +9708,7 @@ namespace { }; } // end anonymous namespace -/// \brief Rebuilds a type within the context of the current instantiation. +/// Rebuilds a type within the context of the current instantiation. /// /// The type \p T is part of the type of an out-of-line member definition of /// a class template (or class template partial specialization) that was parsed @@ -9766,7 +9766,7 @@ bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS) { return false; } -/// \brief Rebuild the template parameters now that we know we're in a current +/// Rebuild the template parameters now that we know we're in a current /// instantiation. bool Sema::RebuildTemplateParamsInCurrentInstantiation( TemplateParameterList *Params) { @@ -9805,7 +9805,7 @@ bool Sema::RebuildTemplateParamsInCurrentInstantiation( return false; } -/// \brief Produces a formatted string that describes the binding of +/// Produces a formatted string that describes the binding of /// template parameters to template arguments. std::string Sema::getTemplateArgumentBindingsText(const TemplateParameterList *Params, @@ -9883,7 +9883,7 @@ bool Sema::IsInsideALocalClassWithinATemplateFunction() { } namespace { -/// \brief Walk the path from which a declaration was instantiated, and check +/// Walk the path from which a declaration was instantiated, and check /// that every explicit specialization along that path is visible. This enforces /// C++ [temp.expl.spec]/6: /// @@ -10019,7 +10019,7 @@ void Sema::checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec) { ExplicitSpecializationVisibilityChecker(*this, Loc).check(Spec); } -/// \brief Check whether a template partial specialization that we've discovered +/// Check whether a template partial specialization that we've discovered /// is hidden, and produce suitable diagnostics if so. void Sema::checkPartialSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec) { |