summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-05-01 01:05:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-05-01 01:05:51 +0000
commitdde65ea89a28130215be2509c1f7c84052096be9 (patch)
tree17ea0ee11a754bc49b9c385cb8dba640fbb22b1f /clang/lib
parent0883632acbf3a2869e24b7740be8fe36b16765a7 (diff)
downloadbcm5719-llvm-dde65ea89a28130215be2509c1f7c84052096be9.tar.gz
bcm5719-llvm-dde65ea89a28130215be2509c1f7c84052096be9.zip
Switch the interface name for both TemplateTypeParmType and
SubstTemplateTypeParmType to be 'getIdentifier' instead of 'getName' as it returns an identifier. This makes them more consistent with the NamedDecl interface. Also, switch back to using this interface to acquire the indentifier in TypePrinter.cpp. I missed this in r130628. llvm-svn: 130629
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Type.cpp2
-rw-r--r--clang/lib/AST/TypePrinter.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateVariadic.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 1ed17704267..9eb497bea62 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -1504,7 +1504,7 @@ bool EnumType::classof(const TagType *TT) {
return isa<EnumDecl>(TT->getDecl());
}
-IdentifierInfo *TemplateTypeParmType::getName() const {
+IdentifierInfo *TemplateTypeParmType::getIdentifier() const {
return isCanonicalUnqualified() ? 0 : getDecl()->getIdentifier();
}
diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp
index a0d40e14d77..0c5df7fae67 100644
--- a/clang/lib/AST/TypePrinter.cpp
+++ b/clang/lib/AST/TypePrinter.cpp
@@ -653,7 +653,7 @@ void TypePrinter::printTemplateTypeParm(const TemplateTypeParmType *T,
if (!S.empty()) // Prefix the basic type, e.g. 'parmname X'.
S = ' ' + S;
- if (IdentifierInfo *Id = T->getDecl() ? T->getDecl()->getIdentifier() : 0)
+ if (IdentifierInfo *Id = T->getIdentifier())
S = Id->getName().str() + S;
else
S = "type-parameter-" + llvm::utostr_32(T->getDepth()) + '-' +
diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp
index 5c321fd6df5..096d353bccc 100644
--- a/clang/lib/Sema/SemaTemplateVariadic.cpp
+++ b/clang/lib/Sema/SemaTemplateVariadic.cpp
@@ -167,7 +167,7 @@ DiagnoseUnexpandedParameterPacks(Sema &S, SourceLocation Loc,
IdentifierInfo *Name = 0;
if (const TemplateTypeParmType *TTP
= Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>())
- Name = TTP->getName();
+ Name = TTP->getIdentifier();
else
Name = Unexpanded[I].first.get<NamedDecl *>()->getIdentifier();
@@ -483,7 +483,7 @@ bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc,
= Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>()) {
Depth = TTP->getDepth();
Index = TTP->getIndex();
- Name = TTP->getName();
+ Name = TTP->getIdentifier();
} else {
NamedDecl *ND = Unexpanded[I].first.get<NamedDecl *>();
if (isa<ParmVarDecl>(ND))
OpenPOWER on IntegriCloud