summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/AST/TemplateBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/AST/TemplateBase.h')
-rw-r--r--clang/include/clang/AST/TemplateBase.h108
1 files changed, 54 insertions, 54 deletions
diff --git a/clang/include/clang/AST/TemplateBase.h b/clang/include/clang/AST/TemplateBase.h
index 850250b9c0a..a1920253de7 100644
--- a/clang/include/clang/AST/TemplateBase.h
+++ b/clang/include/clang/AST/TemplateBase.h
@@ -47,12 +47,12 @@ struct PrintingPolicy;
class TypeSourceInfo;
class ValueDecl;
-/// \brief Represents a template argument.
+/// Represents a template argument.
class TemplateArgument {
public:
- /// \brief The kind of template argument we're storing.
+ /// The kind of template argument we're storing.
enum ArgKind {
- /// \brief Represents an empty template argument, e.g., one that has not
+ /// Represents an empty template argument, e.g., one that has not
/// been deduced.
Null = 0,
@@ -92,7 +92,7 @@ public:
};
private:
- /// \brief The kind of template argument we're storing.
+ /// The kind of template argument we're storing.
struct DA {
unsigned Kind;
@@ -138,16 +138,16 @@ private:
};
public:
- /// \brief Construct an empty, invalid template argument.
+ /// Construct an empty, invalid template argument.
constexpr TemplateArgument() : TypeOrValue({Null, 0}) {}
- /// \brief Construct a template type argument.
+ /// Construct a template type argument.
TemplateArgument(QualType T, bool isNullPtr = false) {
TypeOrValue.Kind = isNullPtr ? NullPtr : Type;
TypeOrValue.V = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
}
- /// \brief Construct a template argument that refers to a
+ /// Construct a template argument that refers to a
/// declaration, which is either an external declaration or a
/// template declaration.
TemplateArgument(ValueDecl *D, QualType QT) {
@@ -157,18 +157,18 @@ public:
DeclArg.D = D;
}
- /// \brief Construct an integral constant template argument. The memory to
+ /// Construct an integral constant template argument. The memory to
/// store the value is allocated with Ctx.
TemplateArgument(ASTContext &Ctx, const llvm::APSInt &Value, QualType Type);
- /// \brief Construct an integral constant template argument with the same
+ /// Construct an integral constant template argument with the same
/// value as Other but a different type.
TemplateArgument(const TemplateArgument &Other, QualType Type) {
Integer = Other.Integer;
Integer.Type = Type.getAsOpaquePtr();
}
- /// \brief Construct a template argument that is a template.
+ /// Construct a template argument that is a template.
///
/// This form of template argument is generally used for template template
/// parameters. However, the template name could be a dependent template
@@ -182,7 +182,7 @@ public:
TemplateArg.NumExpansions = 0;
}
- /// \brief Construct a template argument that is a template pack expansion.
+ /// Construct a template argument that is a template pack expansion.
///
/// This form of template argument is generally used for template template
/// parameters. However, the template name could be a dependent template
@@ -202,7 +202,7 @@ public:
TemplateArg.NumExpansions = 0;
}
- /// \brief Construct a template argument that is an expression.
+ /// Construct a template argument that is an expression.
///
/// This form of template argument only occurs in template argument
/// lists used for dependent types and for expression; it will not
@@ -212,7 +212,7 @@ public:
TypeOrValue.V = reinterpret_cast<uintptr_t>(E);
}
- /// \brief Construct a template argument that is a template argument pack.
+ /// Construct a template argument that is a template argument pack.
///
/// We assume that storage for the template arguments provided
/// outlives the TemplateArgument itself.
@@ -226,40 +226,40 @@ public:
static TemplateArgument getEmptyPack() { return TemplateArgument(None); }
- /// \brief Create a new template argument pack by copying the given set of
+ /// Create a new template argument pack by copying the given set of
/// template arguments.
static TemplateArgument CreatePackCopy(ASTContext &Context,
ArrayRef<TemplateArgument> Args);
- /// \brief Return the kind of stored template argument.
+ /// Return the kind of stored template argument.
ArgKind getKind() const { return (ArgKind)TypeOrValue.Kind; }
- /// \brief Determine whether this template argument has no value.
+ /// Determine whether this template argument has no value.
bool isNull() const { return getKind() == Null; }
- /// \brief Whether this template argument is dependent on a template
+ /// Whether this template argument is dependent on a template
/// parameter such that its result can change from one instantiation to
/// another.
bool isDependent() const;
- /// \brief Whether this template argument is dependent on a template
+ /// Whether this template argument is dependent on a template
/// parameter.
bool isInstantiationDependent() const;
- /// \brief Whether this template argument contains an unexpanded
+ /// Whether this template argument contains an unexpanded
/// parameter pack.
bool containsUnexpandedParameterPack() const;
- /// \brief Determine whether this template argument is a pack expansion.
+ /// Determine whether this template argument is a pack expansion.
bool isPackExpansion() const;
- /// \brief Retrieve the type for a type template argument.
+ /// Retrieve the type for a type template argument.
QualType getAsType() const {
assert(getKind() == Type && "Unexpected kind");
return QualType::getFromOpaquePtr(reinterpret_cast<void*>(TypeOrValue.V));
}
- /// \brief Retrieve the declaration for a declaration non-type
+ /// Retrieve the declaration for a declaration non-type
/// template argument.
ValueDecl *getAsDecl() const {
assert(getKind() == Declaration && "Unexpected kind");
@@ -271,19 +271,19 @@ public:
return QualType::getFromOpaquePtr(DeclArg.QT);
}
- /// \brief Retrieve the type for null non-type template argument.
+ /// Retrieve the type for null non-type template argument.
QualType getNullPtrType() const {
assert(getKind() == NullPtr && "Unexpected kind");
return QualType::getFromOpaquePtr(reinterpret_cast<void*>(TypeOrValue.V));
}
- /// \brief Retrieve the template name for a template name argument.
+ /// Retrieve the template name for a template name argument.
TemplateName getAsTemplate() const {
assert(getKind() == Template && "Unexpected kind");
return TemplateName::getFromVoidPointer(TemplateArg.Name);
}
- /// \brief Retrieve the template argument as a template name; if the argument
+ /// Retrieve the template argument as a template name; if the argument
/// is a pack expansion, return the pattern as a template name.
TemplateName getAsTemplateOrTemplatePattern() const {
assert((getKind() == Template || getKind() == TemplateExpansion) &&
@@ -292,11 +292,11 @@ public:
return TemplateName::getFromVoidPointer(TemplateArg.Name);
}
- /// \brief Retrieve the number of expansions that a template template argument
+ /// Retrieve the number of expansions that a template template argument
/// expansion will produce, if known.
Optional<unsigned> getNumTemplateExpansions() const;
- /// \brief Retrieve the template argument as an integral value.
+ /// Retrieve the template argument as an integral value.
// FIXME: Provide a way to read the integral data without copying the value.
llvm::APSInt getAsIntegral() const {
assert(getKind() == Integral && "Unexpected kind");
@@ -311,7 +311,7 @@ public:
Integer.IsUnsigned);
}
- /// \brief Retrieve the type of the integral value.
+ /// Retrieve the type of the integral value.
QualType getIntegralType() const {
assert(getKind() == Integral && "Unexpected kind");
return QualType::getFromOpaquePtr(Integer.Type);
@@ -322,70 +322,70 @@ public:
Integer.Type = T.getAsOpaquePtr();
}
- /// \brief If this is a non-type template argument, get its type. Otherwise,
+ /// If this is a non-type template argument, get its type. Otherwise,
/// returns a null QualType.
QualType getNonTypeTemplateArgumentType() const;
- /// \brief Retrieve the template argument as an expression.
+ /// Retrieve the template argument as an expression.
Expr *getAsExpr() const {
assert(getKind() == Expression && "Unexpected kind");
return reinterpret_cast<Expr *>(TypeOrValue.V);
}
- /// \brief Iterator that traverses the elements of a template argument pack.
+ /// Iterator that traverses the elements of a template argument pack.
using pack_iterator = const TemplateArgument *;
- /// \brief Iterator referencing the first argument of a template argument
+ /// Iterator referencing the first argument of a template argument
/// pack.
pack_iterator pack_begin() const {
assert(getKind() == Pack);
return Args.Args;
}
- /// \brief Iterator referencing one past the last argument of a template
+ /// Iterator referencing one past the last argument of a template
/// argument pack.
pack_iterator pack_end() const {
assert(getKind() == Pack);
return Args.Args + Args.NumArgs;
}
- /// \brief Iterator range referencing all of the elements of a template
+ /// Iterator range referencing all of the elements of a template
/// argument pack.
ArrayRef<TemplateArgument> pack_elements() const {
return llvm::makeArrayRef(pack_begin(), pack_end());
}
- /// \brief The number of template arguments in the given template argument
+ /// The number of template arguments in the given template argument
/// pack.
unsigned pack_size() const {
assert(getKind() == Pack);
return Args.NumArgs;
}
- /// \brief Return the array of arguments in this template argument pack.
+ /// Return the array of arguments in this template argument pack.
ArrayRef<TemplateArgument> getPackAsArray() const {
assert(getKind() == Pack);
return llvm::makeArrayRef(Args.Args, Args.NumArgs);
}
- /// \brief Determines whether two template arguments are superficially the
+ /// Determines whether two template arguments are superficially the
/// same.
bool structurallyEquals(const TemplateArgument &Other) const;
- /// \brief When the template argument is a pack expansion, returns
+ /// When the template argument is a pack expansion, returns
/// the pattern of the pack expansion.
TemplateArgument getPackExpansionPattern() const;
- /// \brief Print this template argument to the given output stream.
+ /// Print this template argument to the given output stream.
void print(const PrintingPolicy &Policy, raw_ostream &Out) const;
- /// \brief Debugging aid that dumps the template argument.
+ /// Debugging aid that dumps the template argument.
void dump(raw_ostream &Out) const;
- /// \brief Debugging aid that dumps the template argument to standard error.
+ /// Debugging aid that dumps the template argument to standard error.
void dump() const;
- /// \brief Used to insert TemplateArguments into FoldingSets.
+ /// Used to insert TemplateArguments into FoldingSets.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) const;
};
@@ -478,7 +478,7 @@ public:
Argument.getKind() == TemplateArgument::TemplateExpansion);
}
- /// \brief - Fetches the primary location of the argument.
+ /// - Fetches the primary location of the argument.
SourceLocation getLocation() const {
if (Argument.getKind() == TemplateArgument::Template ||
Argument.getKind() == TemplateArgument::TemplateExpansion)
@@ -487,7 +487,7 @@ public:
return getSourceRange().getBegin();
}
- /// \brief - Fetches the full source range of the argument.
+ /// - Fetches the full source range of the argument.
SourceRange getSourceRange() const LLVM_READONLY;
const TemplateArgument &getArgument() const {
@@ -588,7 +588,7 @@ public:
}
};
-/// \brief Represents an explicit template argument list in C++, e.g.,
+/// Represents an explicit template argument list in C++, e.g.,
/// the "<int>" in "sort<int>".
/// This is safe to be used inside an AST node, in contrast with
/// TemplateArgumentListInfo.
@@ -602,16 +602,16 @@ private:
ASTTemplateArgumentListInfo(const TemplateArgumentListInfo &List);
public:
- /// \brief The source location of the left angle bracket ('<').
+ /// The source location of the left angle bracket ('<').
SourceLocation LAngleLoc;
- /// \brief The source location of the right angle bracket ('>').
+ /// The source location of the right angle bracket ('>').
SourceLocation RAngleLoc;
- /// \brief The number of template arguments in TemplateArgs.
+ /// The number of template arguments in TemplateArgs.
unsigned NumTemplateArgs;
- /// \brief Retrieve the template arguments
+ /// Retrieve the template arguments
const TemplateArgumentLoc *getTemplateArgs() const {
return getTrailingObjects<TemplateArgumentLoc>();
}
@@ -628,7 +628,7 @@ public:
Create(ASTContext &C, const TemplateArgumentListInfo &List);
};
-/// \brief Represents an explicit template argument list in C++, e.g.,
+/// Represents an explicit template argument list in C++, e.g.,
/// the "<int>" in "sort<int>".
///
/// It is intended to be used as a trailing object on AST nodes, and
@@ -636,19 +636,19 @@ public:
/// but expects the containing object to also provide storage for
/// that.
struct alignas(void *) ASTTemplateKWAndArgsInfo {
- /// \brief The source location of the left angle bracket ('<').
+ /// The source location of the left angle bracket ('<').
SourceLocation LAngleLoc;
- /// \brief The source location of the right angle bracket ('>').
+ /// The source location of the right angle bracket ('>').
SourceLocation RAngleLoc;
- /// \brief The source location of the template keyword; this is used
+ /// The source location of the template keyword; this is used
/// as part of the representation of qualified identifiers, such as
/// S<T>::template apply<T>. Will be empty if this expression does
/// not have a template keyword.
SourceLocation TemplateKWLoc;
- /// \brief The number of template arguments in TemplateArgs.
+ /// The number of template arguments in TemplateArgs.
unsigned NumTemplateArgs;
void initializeFrom(SourceLocation TemplateKWLoc,
OpenPOWER on IntegriCloud