[cfe-commits] r140330 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h lib/AST/Expr.cpp lib/AST/ExprCXX.cpp lib/AST/ItaniumMangle.cpp lib/Serialization/ASTReaderStmt.cpp lib/Serialization/ASTWriterStmt.cpp tools/libclang/CIndex.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Sep 22 13:07:03 PDT 2011
Author: akirtzidis
Date: Thu Sep 22 15:07:03 2011
New Revision: 140330
URL: http://llvm.org/viewvc/llvm-project?rev=140330&view=rev
Log:
Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change.
Modified:
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/ExprCXX.h
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/ExprCXX.cpp
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Thu Sep 22 15:07:03 2011
@@ -690,7 +690,9 @@
/// \brief Represents an explicit template argument list in C++, e.g.,
/// the "<int>" in "sort<int>".
-struct ExplicitTemplateArgumentList {
+/// This is safe to be used inside an AST node, in contrast with
+/// TemplateArgumentListInfo.
+struct ASTTemplateArgumentListInfo {
/// \brief The source location of the left angle bracket ('<');
SourceLocation LAngleLoc;
@@ -887,29 +889,29 @@
/// \brief Retrieve the explicit template argument list that followed the
/// member template name.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(hasExplicitTemplateArgs());
if (hasFoundDecl())
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(
&getInternalFoundDecl() + 1);
if (hasQualifier())
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(
&getInternalQualifierLoc() + 1);
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(this + 1);
}
/// \brief Retrieve the explicit template argument list that followed the
/// member template name.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
return const_cast<DeclRefExpr *>(this)->getExplicitTemplateArgs();
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getExplicitTemplateArgsOpt() const {
+ const ASTTemplateArgumentListInfo *getExplicitTemplateArgsOpt() const {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -2162,26 +2164,26 @@
/// \brief Retrieve the explicit template argument list that
/// follow the member template name. This must only be called on an
/// expression with explicit template arguments.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(HasExplicitTemplateArgumentList);
if (!HasQualifierOrFoundDecl)
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(this + 1);
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(
getMemberQualifier() + 1);
}
/// \brief Retrieve the explicit template argument list that
/// followed the member template name. This must only be called on
/// an expression with explicit template arguments.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
return const_cast<MemberExpr *>(this)->getExplicitTemplateArgs();
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() const {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Thu Sep 22 15:07:03 2011
@@ -1842,16 +1842,16 @@
/// template argument list, e.g. f<int>.
bool hasExplicitTemplateArgs() const { return HasExplicitTemplateArgs; }
- ExplicitTemplateArgumentList &getExplicitTemplateArgs(); // defined far below
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs(); // defined far below
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
return const_cast<OverloadExpr*>(this)->getExplicitTemplateArgs();
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -1969,21 +1969,21 @@
// nodes, users are *forbidden* from calling these methods on objects
// without explicit template arguments.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<ExplicitTemplateArgumentList*>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo*>(this + 1);
}
/// Gets a reference to the explicit template argument list.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<const ExplicitTemplateArgumentList*>(this + 1);
+ return *reinterpret_cast<const ASTTemplateArgumentListInfo*>(this + 1);
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -2094,21 +2094,21 @@
// nodes, users are *forbidden* from calling these methods on objects
// without explicit template arguments.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<ExplicitTemplateArgumentList*>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo*>(this + 1);
}
/// Gets a reference to the explicit template argument list.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<const ExplicitTemplateArgumentList*>(this + 1);
+ return *reinterpret_cast<const ASTTemplateArgumentListInfo*>(this + 1);
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -2470,14 +2470,14 @@
/// \brief Retrieve the explicit template argument list that followed the
/// member template name, if any.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(HasExplicitTemplateArgs);
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(this + 1);
}
/// \brief Retrieve the explicit template argument list that followed the
/// member template name, if any.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
return const_cast<CXXDependentScopeMemberExpr *>(this)
->getExplicitTemplateArgs();
}
@@ -2485,7 +2485,7 @@
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -2663,22 +2663,22 @@
/// \brief Retrieve the explicit template argument list that followed the
/// member template name.
- ExplicitTemplateArgumentList &getExplicitTemplateArgs() {
+ ASTTemplateArgumentListInfo &getExplicitTemplateArgs() {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<ExplicitTemplateArgumentList *>(this + 1);
+ return *reinterpret_cast<ASTTemplateArgumentListInfo *>(this + 1);
}
/// \brief Retrieve the explicit template argument list that followed the
/// member template name, if any.
- const ExplicitTemplateArgumentList &getExplicitTemplateArgs() const {
+ const ASTTemplateArgumentListInfo &getExplicitTemplateArgs() const {
assert(hasExplicitTemplateArgs());
- return *reinterpret_cast<const ExplicitTemplateArgumentList *>(this + 1);
+ return *reinterpret_cast<const ASTTemplateArgumentListInfo *>(this + 1);
}
/// \brief Retrieves the optional explicit template arguments.
/// This points to the same data as getExplicitTemplateArgs(), but
/// returns null if there are no explicit template arguments.
- const ExplicitTemplateArgumentList *getOptionalExplicitTemplateArgs() {
+ const ASTTemplateArgumentListInfo *getOptionalExplicitTemplateArgs() {
if (!hasExplicitTemplateArgs()) return 0;
return &getExplicitTemplateArgs();
}
@@ -2856,7 +2856,7 @@
}
};
-inline ExplicitTemplateArgumentList &OverloadExpr::getExplicitTemplateArgs() {
+inline ASTTemplateArgumentListInfo &OverloadExpr::getExplicitTemplateArgs() {
if (isa<UnresolvedLookupExpr>(this))
return cast<UnresolvedLookupExpr>(this)->getExplicitTemplateArgs();
else
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Sep 22 15:07:03 2011
@@ -130,7 +130,7 @@
// Primary Expressions.
//===----------------------------------------------------------------------===//
-void ExplicitTemplateArgumentList::initializeFrom(
+void ASTTemplateArgumentListInfo::initializeFrom(
const TemplateArgumentListInfo &Info) {
LAngleLoc = Info.getLAngleLoc();
RAngleLoc = Info.getRAngleLoc();
@@ -141,7 +141,7 @@
new (&ArgBuffer[i]) TemplateArgumentLoc(Info[i]);
}
-void ExplicitTemplateArgumentList::initializeFrom(
+void ASTTemplateArgumentListInfo::initializeFrom(
const TemplateArgumentListInfo &Info,
bool &Dependent,
bool &InstantiationDependent,
@@ -163,7 +163,7 @@
}
}
-void ExplicitTemplateArgumentList::copyInto(
+void ASTTemplateArgumentListInfo::copyInto(
TemplateArgumentListInfo &Info) const {
Info.setLAngleLoc(LAngleLoc);
Info.setRAngleLoc(RAngleLoc);
@@ -171,12 +171,12 @@
Info.addArgument(getTemplateArgs()[I]);
}
-std::size_t ExplicitTemplateArgumentList::sizeFor(unsigned NumTemplateArgs) {
- return sizeof(ExplicitTemplateArgumentList) +
+std::size_t ASTTemplateArgumentListInfo::sizeFor(unsigned NumTemplateArgs) {
+ return sizeof(ASTTemplateArgumentListInfo) +
sizeof(TemplateArgumentLoc) * NumTemplateArgs;
}
-std::size_t ExplicitTemplateArgumentList::sizeFor(
+std::size_t ASTTemplateArgumentListInfo::sizeFor(
const TemplateArgumentListInfo &Info) {
return sizeFor(Info.size());
}
@@ -360,7 +360,7 @@
if (FoundD)
Size += sizeof(NamedDecl *);
if (TemplateArgs)
- Size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
+ Size += ASTTemplateArgumentListInfo::sizeFor(*TemplateArgs);
void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>());
return new (Mem) DeclRefExpr(QualifierLoc, D, NameInfo, FoundD, TemplateArgs,
@@ -378,7 +378,7 @@
if (HasFoundDecl)
Size += sizeof(NamedDecl *);
if (HasExplicitTemplateArgs)
- Size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
+ Size += ASTTemplateArgumentListInfo::sizeFor(NumTemplateArgs);
void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>());
return new (Mem) DeclRefExpr(EmptyShell());
@@ -952,7 +952,7 @@
Size += sizeof(MemberNameQualifier);
if (targs)
- Size += ExplicitTemplateArgumentList::sizeFor(*targs);
+ Size += ASTTemplateArgumentListInfo::sizeFor(*targs);
void *Mem = C.Allocate(Size, llvm::alignOf<MemberExpr>());
MemberExpr *E = new (Mem) MemberExpr(base, isarrow, memberdecl, nameinfo,
Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Thu Sep 22 15:07:03 2011
@@ -202,7 +202,7 @@
UnresolvedSetIterator End)
{
void *Mem = C.Allocate(sizeof(UnresolvedLookupExpr) +
- ExplicitTemplateArgumentList::sizeFor(Args));
+ ASTTemplateArgumentListInfo::sizeFor(Args));
return new (Mem) UnresolvedLookupExpr(C, NamingClass, QualifierLoc, NameInfo,
ADL, /*Overload*/ true, &Args,
Begin, End, /*StdIsAssociated=*/false);
@@ -213,7 +213,7 @@
unsigned NumTemplateArgs) {
std::size_t size = sizeof(UnresolvedLookupExpr);
if (HasExplicitTemplateArgs)
- size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
+ size += ASTTemplateArgumentListInfo::sizeFor(NumTemplateArgs);
void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedLookupExpr>());
UnresolvedLookupExpr *E = new (Mem) UnresolvedLookupExpr(EmptyShell());
@@ -332,7 +332,7 @@
bool ContainsUnexpandedParameterPack
= ExprBits.ContainsUnexpandedParameterPack;
- reinterpret_cast<ExplicitTemplateArgumentList*>(this+1)
+ reinterpret_cast<ASTTemplateArgumentListInfo*>(this+1)
->initializeFrom(*Args, Dependent, InstantiationDependent,
ContainsUnexpandedParameterPack);
@@ -347,7 +347,7 @@
const TemplateArgumentListInfo *Args) {
std::size_t size = sizeof(DependentScopeDeclRefExpr);
if (Args)
- size += ExplicitTemplateArgumentList::sizeFor(*Args);
+ size += ASTTemplateArgumentListInfo::sizeFor(*Args);
void *Mem = C.Allocate(size);
return new (Mem) DependentScopeDeclRefExpr(C.DependentTy, QualifierLoc,
NameInfo, Args);
@@ -359,7 +359,7 @@
unsigned NumTemplateArgs) {
std::size_t size = sizeof(DependentScopeDeclRefExpr);
if (HasExplicitTemplateArgs)
- size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
+ size += ASTTemplateArgumentListInfo::sizeFor(NumTemplateArgs);
void *Mem = C.Allocate(size);
DependentScopeDeclRefExpr *E
= new (Mem) DependentScopeDeclRefExpr(QualType(), NestedNameSpecifierLoc(),
@@ -838,7 +838,7 @@
std::size_t size = sizeof(CXXDependentScopeMemberExpr);
if (TemplateArgs)
- size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
+ size += ASTTemplateArgumentListInfo::sizeFor(*TemplateArgs);
void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>());
return new (Mem) CXXDependentScopeMemberExpr(C, Base, BaseType,
@@ -859,7 +859,7 @@
DeclarationNameInfo());
std::size_t size = sizeof(CXXDependentScopeMemberExpr) +
- ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
+ ASTTemplateArgumentListInfo::sizeFor(NumTemplateArgs);
void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>());
CXXDependentScopeMemberExpr *E
= new (Mem) CXXDependentScopeMemberExpr(C, 0, QualType(),
@@ -947,7 +947,7 @@
UnresolvedSetIterator End) {
std::size_t size = sizeof(UnresolvedMemberExpr);
if (TemplateArgs)
- size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
+ size += ASTTemplateArgumentListInfo::sizeFor(*TemplateArgs);
void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>());
return new (Mem) UnresolvedMemberExpr(C,
@@ -961,7 +961,7 @@
unsigned NumTemplateArgs) {
std::size_t size = sizeof(UnresolvedMemberExpr);
if (HasExplicitTemplateArgs)
- size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
+ size += ASTTemplateArgumentListInfo::sizeFor(NumTemplateArgs);
void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>());
UnresolvedMemberExpr *E = new (Mem) UnresolvedMemberExpr(EmptyShell());
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Thu Sep 22 15:07:03 2011
@@ -310,7 +310,7 @@
void mangleCXXCtorType(CXXCtorType T);
void mangleCXXDtorType(CXXDtorType T);
- void mangleTemplateArgs(const ExplicitTemplateArgumentList &TemplateArgs);
+ void mangleTemplateArgs(const ASTTemplateArgumentListInfo &TemplateArgs);
void mangleTemplateArgs(TemplateName Template,
const TemplateArgument *TemplateArgs,
unsigned NumTemplateArgs);
@@ -2817,7 +2817,7 @@
}
void CXXNameMangler::mangleTemplateArgs(
- const ExplicitTemplateArgumentList &TemplateArgs) {
+ const ASTTemplateArgumentListInfo &TemplateArgs) {
// <template-args> ::= I <template-arg>+ E
Out << 'I';
for (unsigned i = 0, e = TemplateArgs.NumTemplateArgs; i != e; ++i)
Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Thu Sep 22 15:07:03 2011
@@ -80,7 +80,7 @@
static const unsigned NumExprFields = NumStmtFields + 7;
/// \brief Read and initialize a ExplicitTemplateArgumentList structure.
- void ReadExplicitTemplateArgumentList(ExplicitTemplateArgumentList &ArgList,
+ void ReadExplicitTemplateArgumentList(ASTTemplateArgumentListInfo &ArgList,
unsigned NumTemplateArgs);
void VisitStmt(Stmt *S);
@@ -91,7 +91,7 @@
}
void ASTStmtReader::
-ReadExplicitTemplateArgumentList(ExplicitTemplateArgumentList &ArgList,
+ReadExplicitTemplateArgumentList(ASTTemplateArgumentListInfo &ArgList,
unsigned NumTemplateArgs) {
TemplateArgumentListInfo ArgInfo;
ArgInfo.setLAngleLoc(ReadSourceLocation(Record, Idx));
Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterStmt.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Thu Sep 22 15:07:03 2011
@@ -36,7 +36,7 @@
: Writer(Writer), Record(Record) { }
void
- AddExplicitTemplateArgumentList(const ExplicitTemplateArgumentList &Args);
+ AddExplicitTemplateArgumentList(const ASTTemplateArgumentListInfo &Args);
void VisitStmt(Stmt *S);
#define STMT(Type, Base) \
@@ -46,7 +46,7 @@
}
void ASTStmtWriter::
-AddExplicitTemplateArgumentList(const ExplicitTemplateArgumentList &Args) {
+AddExplicitTemplateArgumentList(const ASTTemplateArgumentListInfo &Args) {
Writer.AddSourceLocation(Args.LAngleLoc, Record);
Writer.AddSourceLocation(Args.RAngleLoc, Record);
for (unsigned i=0; i != Args.NumTemplateArgs; ++i)
@@ -1142,7 +1142,7 @@
Record.push_back(E->hasExplicitTemplateArgs());
if (E->hasExplicitTemplateArgs()) {
- const ExplicitTemplateArgumentList &Args = E->getExplicitTemplateArgs();
+ const ASTTemplateArgumentListInfo &Args = E->getExplicitTemplateArgs();
Record.push_back(Args.NumTemplateArgs);
AddExplicitTemplateArgumentList(Args);
}
@@ -1168,7 +1168,7 @@
// emitted first.
Record.push_back(E->hasExplicitTemplateArgs());
if (E->hasExplicitTemplateArgs()) {
- const ExplicitTemplateArgumentList &Args = E->getExplicitTemplateArgs();
+ const ASTTemplateArgumentListInfo &Args = E->getExplicitTemplateArgs();
Record.push_back(Args.NumTemplateArgs);
AddExplicitTemplateArgumentList(Args);
}
@@ -1197,7 +1197,7 @@
// Don't emit anything here, hasExplicitTemplateArgs() must be emitted first.
Record.push_back(E->hasExplicitTemplateArgs());
if (E->hasExplicitTemplateArgs()) {
- const ExplicitTemplateArgumentList &Args = E->getExplicitTemplateArgs();
+ const ASTTemplateArgumentListInfo &Args = E->getExplicitTemplateArgs();
Record.push_back(Args.NumTemplateArgs);
AddExplicitTemplateArgumentList(Args);
}
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=140330&r1=140329&r2=140330&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Sep 22 15:07:03 2011
@@ -1622,7 +1622,7 @@
DEF_JOB(MemberExprParts, MemberExpr, MemberExprPartsKind)
DEF_JOB(DeclRefExprParts, DeclRefExpr, DeclRefExprPartsKind)
DEF_JOB(OverloadExprParts, OverloadExpr, OverloadExprPartsKind)
-DEF_JOB(ExplicitTemplateArgsVisit, ExplicitTemplateArgumentList,
+DEF_JOB(ExplicitTemplateArgsVisit, ASTTemplateArgumentListInfo,
ExplicitTemplateArgsVisitKind)
DEF_JOB(SizeOfPackExprParts, SizeOfPackExpr, SizeOfPackExprPartsKind)
#undef DEF_JOB
@@ -1769,7 +1769,7 @@
private:
void AddDeclarationNameInfo(Stmt *S);
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc Qualifier);
- void AddExplicitTemplateArgs(const ExplicitTemplateArgumentList *A);
+ void AddExplicitTemplateArgs(const ASTTemplateArgumentListInfo *A);
void AddMemberRef(FieldDecl *D, SourceLocation L);
void AddStmt(Stmt *S);
void AddDecl(Decl *D, bool isFirst = true);
@@ -1799,10 +1799,10 @@
WL.push_back(DeclVisit(D, Parent, isFirst));
}
void EnqueueVisitor::
- AddExplicitTemplateArgs(const ExplicitTemplateArgumentList *A) {
+ AddExplicitTemplateArgs(const ASTTemplateArgumentListInfo *A) {
if (A)
WL.push_back(ExplicitTemplateArgsVisit(
- const_cast<ExplicitTemplateArgumentList*>(A), Parent));
+ const_cast<ASTTemplateArgumentListInfo*>(A), Parent));
}
void EnqueueVisitor::AddMemberRef(FieldDecl *D, SourceLocation L) {
if (D)
@@ -2101,7 +2101,7 @@
continue;
}
case VisitorJob::ExplicitTemplateArgsVisitKind: {
- const ExplicitTemplateArgumentList *ArgList =
+ const ASTTemplateArgumentListInfo *ArgList =
cast<ExplicitTemplateArgsVisit>(&LI)->get();
for (const TemplateArgumentLoc *Arg = ArgList->getTemplateArgs(),
*ArgEnd = Arg + ArgList->NumTemplateArgs;
@@ -2264,7 +2264,7 @@
RefNamePieces buildPieces(unsigned NameFlags, bool IsMemberRefExpr,
const DeclarationNameInfo &NI,
const SourceRange &QLoc,
- const ExplicitTemplateArgumentList *TemplateArgs = 0){
+ const ASTTemplateArgumentListInfo *TemplateArgs = 0){
const bool WantQualifier = NameFlags & CXNameRange_WantQualifier;
const bool WantTemplateArgs = NameFlags & CXNameRange_WantTemplateArgs;
const bool WantSinglePiece = NameFlags & CXNameRange_WantSinglePiece;
More information about the cfe-commits
mailing list