diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-08 18:40:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-08 18:40:42 +0000 |
commit | 5daeee2bd66be84eaf764fb789afcb5bf63068bd (patch) | |
tree | 34ed89ebffaf1f6c4e5abb0a3a3c9dd370e88e44 /clang/lib/Sema/SemaDecl.cpp | |
parent | f90d3b096a50a5551f8df7fda5572631db90dc87 (diff) | |
download | bcm5719-llvm-5daeee2bd66be84eaf764fb789afcb5bf63068bd.tar.gz bcm5719-llvm-5daeee2bd66be84eaf764fb789afcb5bf63068bd.zip |
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs
llvm-svn: 60708
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index b6b1f4c4465..41587c5aee6 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -868,7 +868,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) { } } - if (PrevDecl && isTemplateParameterDecl(PrevDecl)) { + if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. InvalidDecl = InvalidDecl || DiagnoseTemplateParameterShadow(D.getIdentifierLoc(), PrevDecl); @@ -2035,7 +2035,7 @@ Sema::ActOnParamDeclarator(Scope *S, Declarator &D) { // among each other. Here they can only shadow globals, which is ok. IdentifierInfo *II = D.getIdentifier(); if (Decl *PrevDecl = LookupDecl(II, Decl::IDNS_Ordinary, S)) { - if (isTemplateParameterDecl(PrevDecl)) { + if (PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(D.getIdentifierLoc(), PrevDecl); // Just pretend that we didn't see the previous declaration. @@ -2299,7 +2299,7 @@ Sema::DeclTy *Sema::ActOnTag(Scope *S, unsigned TagType, TagKind TK, PrevDecl = dyn_cast_or_null<ScopedDecl>(LookupDecl(Name, Decl::IDNS_Tag,S)); } - if (PrevDecl && isTemplateParameterDecl(PrevDecl)) { + if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(NameLoc, PrevDecl); // Just pretend that we didn't see the previous declaration. @@ -2442,7 +2442,7 @@ Sema::DeclTy *Sema::ActOnTagStruct(Scope *S, TagDecl::TagKind Kind, TagKind TK, PrevDecl = dyn_cast_or_null<ScopedDecl>(LookupDecl(Name, Decl::IDNS_Tag,S)); } - if (PrevDecl && isTemplateParameterDecl(PrevDecl)) { + if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(NameLoc, PrevDecl); // Just pretend that we didn't see the previous declaration. @@ -2959,7 +2959,7 @@ Sema::DeclTy *Sema::ActOnEnumConstant(Scope *S, DeclTy *theEnumDecl, // Verify that there isn't already something declared with this name in this // scope. Decl *PrevDecl = LookupDecl(Id, Decl::IDNS_Ordinary, S); - if (PrevDecl && isTemplateParameterDecl(PrevDecl)) { + if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(IdLoc, PrevDecl); // Just pretend that we didn't see the previous declaration. |