diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-18 00:33:28 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-18 00:33:28 +0000 |
commit | b6ed153155d6fd961b5403a094598f366c581302 (patch) | |
tree | 15ff456efdecd3d861eb88912bc76a4a0b4e6c15 /clang/lib/AST/Decl.cpp | |
parent | e858e960c2ab01376488bff2e837a05093ef23cc (diff) | |
download | bcm5719-llvm-b6ed153155d6fd961b5403a094598f366c581302.tar.gz bcm5719-llvm-b6ed153155d6fd961b5403a094598f366c581302.zip |
Handle local enum types too.
Thanks to John McCall for pointing this out.
llvm-svn: 182182
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index cbd55889c9e..8a523d6a0de 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -298,11 +298,8 @@ static LinkageInfo getLIForTemplateTypeArgument(QualType T) { if (!TT) return LI; - const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(TT->getDecl()); - if (!RD) - return LI; - - const FunctionDecl *FD = getOutermostFunctionContext(RD); + const Decl *D = TT->getDecl(); + const FunctionDecl *FD = getOutermostFunctionContext(D); if (!FD) return LI; |