Regularize the API for accessing explicit template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp
index 716d21c..1bb9d19 100644
--- a/lib/Serialization/ASTWriterStmt.cpp
+++ b/lib/Serialization/ASTWriterStmt.cpp
@@ -369,7 +369,7 @@
Record.push_back(E->hasQualifier());
unsigned NumTemplateArgs = E->getNumTemplateArgs();
- assert((NumTemplateArgs != 0) == E->hasExplicitTemplateArgumentList() &&
+ assert((NumTemplateArgs != 0) == E->hasExplicitTemplateArgs() &&
"Template args list with no args ?");
Record.push_back(NumTemplateArgs);
@@ -379,7 +379,7 @@
}
if (NumTemplateArgs)
- AddExplicitTemplateArgumentList(*E->getExplicitTemplateArgumentList());
+ AddExplicitTemplateArgumentList(E->getExplicitTemplateArgs());
Writer.AddDeclRef(E->getDecl(), Record);
// FIXME: write DeclarationNameLoc.
@@ -535,7 +535,7 @@
}
unsigned NumTemplateArgs = E->getNumTemplateArgs();
- assert((NumTemplateArgs != 0) == E->hasExplicitTemplateArgumentList() &&
+ assert((NumTemplateArgs != 0) == E->hasExplicitTemplateArgs() &&
"Template args list with no args ?");
Record.push_back(NumTemplateArgs);
if (NumTemplateArgs) {
@@ -1159,8 +1159,7 @@
// Don't emit anything here, NumTemplateArgs must be emitted first.
if (E->hasExplicitTemplateArgs()) {
- const ExplicitTemplateArgumentList &Args
- = *E->getExplicitTemplateArgumentList();
+ const ExplicitTemplateArgumentList &Args = E->getExplicitTemplateArgs();
assert(Args.NumTemplateArgs &&
"Num of template args was zero! AST reading will mess up!");
Record.push_back(Args.NumTemplateArgs);