diff options
Diffstat (limited to 'include/clang/AST/NestedNameSpecifier.h')
-rw-r--r-- | include/clang/AST/NestedNameSpecifier.h | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h index e2cb45c36de6..2255d5114350 100644 --- a/include/clang/AST/NestedNameSpecifier.h +++ b/include/clang/AST/NestedNameSpecifier.h @@ -36,7 +36,7 @@ struct PrintingPolicy; class Type; class TypeLoc; -/// \brief Represents a C++ nested name specifier, such as +/// Represents a C++ nested name specifier, such as /// "\::std::vector<int>::". /// /// C++ nested name specifiers are the prefixes to qualified @@ -47,7 +47,7 @@ class TypeLoc; /// The last two specifiers can only appear at the start of a /// nested-namespace-specifier. class NestedNameSpecifier : public llvm::FoldingSetNode { - /// \brief Enumeration describing + /// Enumeration describing enum StoredSpecifierKind { StoredIdentifier = 0, StoredDecl = 1, @@ -55,7 +55,7 @@ class NestedNameSpecifier : public llvm::FoldingSetNode { StoredTypeSpecWithTemplate = 3 }; - /// \brief The nested name specifier that precedes this nested name + /// The nested name specifier that precedes this nested name /// specifier. /// /// The pointer is the nested-name-specifier that precedes this @@ -63,7 +63,7 @@ class NestedNameSpecifier : public llvm::FoldingSetNode { /// SpecifierKind. llvm::PointerIntPair<NestedNameSpecifier *, 2, StoredSpecifierKind> Prefix; - /// \brief The last component in the nested name specifier, which + /// The last component in the nested name specifier, which /// can be an identifier, a declaration, or a type. /// /// When the pointer is NULL, this specifier represents the global @@ -73,42 +73,42 @@ class NestedNameSpecifier : public llvm::FoldingSetNode { void* Specifier = nullptr; public: - /// \brief The kind of specifier that completes this nested name + /// The kind of specifier that completes this nested name /// specifier. enum SpecifierKind { - /// \brief An identifier, stored as an IdentifierInfo*. + /// An identifier, stored as an IdentifierInfo*. Identifier, - /// \brief A namespace, stored as a NamespaceDecl*. + /// A namespace, stored as a NamespaceDecl*. Namespace, - /// \brief A namespace alias, stored as a NamespaceAliasDecl*. + /// A namespace alias, stored as a NamespaceAliasDecl*. NamespaceAlias, - /// \brief A type, stored as a Type*. + /// A type, stored as a Type*. TypeSpec, - /// \brief A type that was preceded by the 'template' keyword, + /// A type that was preceded by the 'template' keyword, /// stored as a Type*. TypeSpecWithTemplate, - /// \brief The global specifier '::'. There is no stored value. + /// The global specifier '::'. There is no stored value. Global, - /// \brief Microsoft's '__super' specifier, stored as a CXXRecordDecl* of + /// Microsoft's '__super' specifier, stored as a CXXRecordDecl* of /// the class it appeared in. Super }; private: - /// \brief Builds the global specifier. + /// Builds the global specifier. NestedNameSpecifier() : Prefix(nullptr, StoredIdentifier) {} - /// \brief Copy constructor used internally to clone nested name + /// Copy constructor used internally to clone nested name /// specifiers. NestedNameSpecifier(const NestedNameSpecifier &Other) = default; - /// \brief Either find or insert the given nested name specifier + /// Either find or insert the given nested name specifier /// mockup in the given context. static NestedNameSpecifier *FindOrInsert(const ASTContext &Context, const NestedNameSpecifier &Mockup); @@ -116,7 +116,7 @@ private: public: NestedNameSpecifier &operator=(const NestedNameSpecifier &) = delete; - /// \brief Builds a specifier combining a prefix and an identifier. + /// Builds a specifier combining a prefix and an identifier. /// /// The prefix must be dependent, since nested name specifiers /// referencing an identifier are only permitted when the identifier @@ -125,22 +125,22 @@ public: NestedNameSpecifier *Prefix, IdentifierInfo *II); - /// \brief Builds a nested name specifier that names a namespace. + /// Builds a nested name specifier that names a namespace. static NestedNameSpecifier *Create(const ASTContext &Context, NestedNameSpecifier *Prefix, const NamespaceDecl *NS); - /// \brief Builds a nested name specifier that names a namespace alias. + /// Builds a nested name specifier that names a namespace alias. static NestedNameSpecifier *Create(const ASTContext &Context, NestedNameSpecifier *Prefix, NamespaceAliasDecl *Alias); - /// \brief Builds a nested name specifier that names a type. + /// Builds a nested name specifier that names a type. static NestedNameSpecifier *Create(const ASTContext &Context, NestedNameSpecifier *Prefix, bool Template, const Type *T); - /// \brief Builds a specifier that consists of just an identifier. + /// Builds a specifier that consists of just an identifier. /// /// The nested-name-specifier is assumed to be dependent, but has no /// prefix because the prefix is implied by something outside of the @@ -149,16 +149,16 @@ public: static NestedNameSpecifier *Create(const ASTContext &Context, IdentifierInfo *II); - /// \brief Returns the nested name specifier representing the global + /// Returns the nested name specifier representing the global /// scope. static NestedNameSpecifier *GlobalSpecifier(const ASTContext &Context); - /// \brief Returns the nested name specifier representing the __super scope + /// Returns the nested name specifier representing the __super scope /// for the given CXXRecordDecl. static NestedNameSpecifier *SuperSpecifier(const ASTContext &Context, CXXRecordDecl *RD); - /// \brief Return the prefix of this nested name specifier. + /// Return the prefix of this nested name specifier. /// /// The prefix contains all of the parts of the nested name /// specifier that preced this current specifier. For example, for a @@ -167,10 +167,10 @@ public: /// "foo::". NestedNameSpecifier *getPrefix() const { return Prefix.getPointer(); } - /// \brief Determine what kind of nested name specifier is stored. + /// Determine what kind of nested name specifier is stored. SpecifierKind getKind() const; - /// \brief Retrieve the identifier stored in this nested name + /// Retrieve the identifier stored in this nested name /// specifier. IdentifierInfo *getAsIdentifier() const { if (Prefix.getInt() == StoredIdentifier) @@ -179,19 +179,19 @@ public: return nullptr; } - /// \brief Retrieve the namespace stored in this nested name + /// Retrieve the namespace stored in this nested name /// specifier. NamespaceDecl *getAsNamespace() const; - /// \brief Retrieve the namespace alias stored in this nested name + /// Retrieve the namespace alias stored in this nested name /// specifier. NamespaceAliasDecl *getAsNamespaceAlias() const; - /// \brief Retrieve the record declaration stored in this nested name + /// Retrieve the record declaration stored in this nested name /// specifier. CXXRecordDecl *getAsRecordDecl() const; - /// \brief Retrieve the type stored in this nested name specifier. + /// Retrieve the type stored in this nested name specifier. const Type *getAsType() const { if (Prefix.getInt() == StoredTypeSpec || Prefix.getInt() == StoredTypeSpecWithTemplate) @@ -200,19 +200,19 @@ public: return nullptr; } - /// \brief Whether this nested name specifier refers to a dependent + /// Whether this nested name specifier refers to a dependent /// type or not. bool isDependent() const; - /// \brief Whether this nested name specifier involves a template + /// Whether this nested name specifier involves a template /// parameter. bool isInstantiationDependent() const; - /// \brief Whether this nested-name-specifier contains an unexpanded + /// Whether this nested-name-specifier contains an unexpanded /// parameter pack (for C++11 variadic templates). bool containsUnexpandedParameterPack() const; - /// \brief Print this nested name specifier to the given output + /// Print this nested name specifier to the given output /// stream. void print(raw_ostream &OS, const PrintingPolicy &Policy) const; @@ -221,53 +221,53 @@ public: ID.AddPointer(Specifier); } - /// \brief Dump the nested name specifier to standard output to aid + /// Dump the nested name specifier to standard output to aid /// in debugging. void dump(const LangOptions &LO) const; void dump() const; }; -/// \brief A C++ nested-name-specifier augmented with source location +/// A C++ nested-name-specifier augmented with source location /// information. class NestedNameSpecifierLoc { NestedNameSpecifier *Qualifier = nullptr; void *Data = nullptr; - /// \brief Determines the data length for the last component in the + /// Determines the data length for the last component in the /// given nested-name-specifier. static unsigned getLocalDataLength(NestedNameSpecifier *Qualifier); - /// \brief Determines the data length for the entire + /// Determines the data length for the entire /// nested-name-specifier. static unsigned getDataLength(NestedNameSpecifier *Qualifier); public: - /// \brief Construct an empty nested-name-specifier. + /// Construct an empty nested-name-specifier. NestedNameSpecifierLoc() = default; - /// \brief Construct a nested-name-specifier with source location information + /// Construct a nested-name-specifier with source location information /// from NestedNameSpecifierLoc(NestedNameSpecifier *Qualifier, void *Data) : Qualifier(Qualifier), Data(Data) {} - /// \brief Evalutes true when this nested-name-specifier location is + /// Evaluates true when this nested-name-specifier location is /// non-empty. explicit operator bool() const { return Qualifier; } - /// \brief Evalutes true when this nested-name-specifier location is + /// Evaluates true when this nested-name-specifier location is /// empty. bool hasQualifier() const { return Qualifier; } - /// \brief Retrieve the nested-name-specifier to which this instance + /// Retrieve the nested-name-specifier to which this instance /// refers. NestedNameSpecifier *getNestedNameSpecifier() const { return Qualifier; } - /// \brief Retrieve the opaque pointer that refers to source-location data. + /// Retrieve the opaque pointer that refers to source-location data. void *getOpaqueData() const { return Data; } - /// \brief Retrieve the source range covering the entirety of this + /// Retrieve the source range covering the entirety of this /// nested-name-specifier. /// /// For example, if this instance refers to a nested-name-specifier @@ -275,7 +275,7 @@ public: /// from the initial '::' to the last '::'. SourceRange getSourceRange() const LLVM_READONLY; - /// \brief Retrieve the source range covering just the last part of + /// Retrieve the source range covering just the last part of /// this nested-name-specifier, not including the prefix. /// /// For example, if this instance refers to a nested-name-specifier @@ -283,31 +283,31 @@ public: /// from "vector" to the last '::'. SourceRange getLocalSourceRange() const; - /// \brief Retrieve the location of the beginning of this + /// Retrieve the location of the beginning of this /// nested-name-specifier. SourceLocation getBeginLoc() const { return getSourceRange().getBegin(); } - /// \brief Retrieve the location of the end of this + /// Retrieve the location of the end of this /// nested-name-specifier. SourceLocation getEndLoc() const { return getSourceRange().getEnd(); } - /// \brief Retrieve the location of the beginning of this + /// Retrieve the location of the beginning of this /// component of the nested-name-specifier. SourceLocation getLocalBeginLoc() const { return getLocalSourceRange().getBegin(); } - /// \brief Retrieve the location of the end of this component of the + /// Retrieve the location of the end of this component of the /// nested-name-specifier. SourceLocation getLocalEndLoc() const { return getLocalSourceRange().getEnd(); } - /// \brief Return the prefix of this nested-name-specifier. + /// Return the prefix of this nested-name-specifier. /// /// For example, if this instance refers to a nested-name-specifier /// \c \::std::vector<int>::, the prefix is \c \::std::. Note that the @@ -320,11 +320,11 @@ public: return NestedNameSpecifierLoc(Qualifier->getPrefix(), Data); } - /// \brief For a nested-name-specifier that refers to a type, + /// For a nested-name-specifier that refers to a type, /// retrieve the type with source-location information. TypeLoc getTypeLoc() const; - /// \brief Determines the data length for the entire + /// Determines the data length for the entire /// nested-name-specifier. unsigned getDataLength() const { return getDataLength(Qualifier); } @@ -339,15 +339,15 @@ public: } }; -/// \brief Class that aids in the construction of nested-name-specifiers along +/// Class that aids in the construction of nested-name-specifiers along /// with source-location information for all of the components of the /// nested-name-specifier. class NestedNameSpecifierLocBuilder { - /// \brief The current representation of the nested-name-specifier we're + /// The current representation of the nested-name-specifier we're /// building. NestedNameSpecifier *Representation = nullptr; - /// \brief Buffer used to store source-location information for the + /// Buffer used to store source-location information for the /// nested-name-specifier. /// /// Note that we explicitly manage the buffer (rather than using a @@ -355,11 +355,11 @@ class NestedNameSpecifierLocBuilder { /// a \c CXXScopeSpec, and CXXScopeSpec uses a NestedNameSpecifierLocBuilder. char *Buffer = nullptr; - /// \brief The size of the buffer used to store source-location information + /// The size of the buffer used to store source-location information /// for the nested-name-specifier. unsigned BufferSize = 0; - /// \brief The capacity of the buffer used to store source-location + /// The capacity of the buffer used to store source-location /// information for the nested-name-specifier. unsigned BufferCapacity = 0; @@ -375,10 +375,10 @@ public: free(Buffer); } - /// \brief Retrieve the representation of the nested-name-specifier. + /// Retrieve the representation of the nested-name-specifier. NestedNameSpecifier *getRepresentation() const { return Representation; } - /// \brief Extend the current nested-name-specifier by another + /// Extend the current nested-name-specifier by another /// nested-name-specifier component of the form 'type::'. /// /// \param Context The AST context in which this nested-name-specifier @@ -392,7 +392,7 @@ public: void Extend(ASTContext &Context, SourceLocation TemplateKWLoc, TypeLoc TL, SourceLocation ColonColonLoc); - /// \brief Extend the current nested-name-specifier by another + /// Extend the current nested-name-specifier by another /// nested-name-specifier component of the form 'identifier::'. /// /// \param Context The AST context in which this nested-name-specifier @@ -406,7 +406,7 @@ public: void Extend(ASTContext &Context, IdentifierInfo *Identifier, SourceLocation IdentifierLoc, SourceLocation ColonColonLoc); - /// \brief Extend the current nested-name-specifier by another + /// Extend the current nested-name-specifier by another /// nested-name-specifier component of the form 'namespace::'. /// /// \param Context The AST context in which this nested-name-specifier @@ -420,7 +420,7 @@ public: void Extend(ASTContext &Context, NamespaceDecl *Namespace, SourceLocation NamespaceLoc, SourceLocation ColonColonLoc); - /// \brief Extend the current nested-name-specifier by another + /// Extend the current nested-name-specifier by another /// nested-name-specifier component of the form 'namespace-alias::'. /// /// \param Context The AST context in which this nested-name-specifier @@ -435,11 +435,11 @@ public: void Extend(ASTContext &Context, NamespaceAliasDecl *Alias, SourceLocation AliasLoc, SourceLocation ColonColonLoc); - /// \brief Turn this (empty) nested-name-specifier into the global + /// Turn this (empty) nested-name-specifier into the global /// nested-name-specifier '::'. void MakeGlobal(ASTContext &Context, SourceLocation ColonColonLoc); - /// \brief Turns this (empty) nested-name-specifier into '__super' + /// Turns this (empty) nested-name-specifier into '__super' /// nested-name-specifier. /// /// \param Context The AST context in which this nested-name-specifier @@ -455,7 +455,7 @@ public: void MakeSuper(ASTContext &Context, CXXRecordDecl *RD, SourceLocation SuperLoc, SourceLocation ColonColonLoc); - /// \brief Make a new nested-name-specifier from incomplete source-location + /// Make a new nested-name-specifier from incomplete source-location /// information. /// /// This routine should be used very, very rarely, in cases where we @@ -464,23 +464,23 @@ public: void MakeTrivial(ASTContext &Context, NestedNameSpecifier *Qualifier, SourceRange R); - /// \brief Adopt an existing nested-name-specifier (with source-range + /// Adopt an existing nested-name-specifier (with source-range /// information). void Adopt(NestedNameSpecifierLoc Other); - /// \brief Retrieve the source range covered by this nested-name-specifier. + /// Retrieve the source range covered by this nested-name-specifier. SourceRange getSourceRange() const LLVM_READONLY { return NestedNameSpecifierLoc(Representation, Buffer).getSourceRange(); } - /// \brief Retrieve a nested-name-specifier with location information, + /// Retrieve a nested-name-specifier with location information, /// copied into the given AST context. /// /// \param Context The context into which this nested-name-specifier will be /// copied. NestedNameSpecifierLoc getWithLocInContext(ASTContext &Context) const; - /// \brief Retrieve a nested-name-specifier with location + /// Retrieve a nested-name-specifier with location /// information based on the information in this builder. /// /// This loc will contain references to the builder's internal data and may @@ -489,14 +489,14 @@ public: return NestedNameSpecifierLoc(Representation, Buffer); } - /// \brief Clear out this builder, and prepare it to build another + /// Clear out this builder, and prepare it to build another /// nested-name-specifier with source-location information. void Clear() { Representation = nullptr; BufferSize = 0; } - /// \brief Retrieve the underlying buffer. + /// Retrieve the underlying buffer. /// /// \returns A pair containing a pointer to the buffer of source-location /// data and the size of the source-location data that resides in that |