forked from OSchip/llvm-project
The canonical declaration of a NULL declaration is NULL
llvm-svn: 71409
This commit is contained in:
parent
e362cea568
commit
5e4e50c280
|
|
@ -1704,6 +1704,9 @@ QualType ASTContext::getCanonicalType(QualType T) {
|
|||
}
|
||||
|
||||
Decl *ASTContext::getCanonicalDecl(Decl *D) {
|
||||
if (!D)
|
||||
return 0;
|
||||
|
||||
if (TagDecl *Tag = dyn_cast<TagDecl>(D)) {
|
||||
QualType T = getTagDeclType(Tag);
|
||||
return cast<TagDecl>(cast<TagType>(T.getTypePtr()->CanonicalType)
|
||||
|
|
|
|||
Loading…
Reference in New Issue