summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2010-10-19 21:54:32 +0000
committerAndrew Trick <atrick@apple.com>2010-10-19 21:54:32 +0000
commitba266eec79a9293910a5875d31cc0813bbc8a233 (patch)
tree848d0ef94404592138278534c9e649f7a55f9be1 /clang/lib/AST/Decl.cpp
parent7f48df30174d9be4e23ca04731d167beb0ce2f91 (diff)
downloadbcm5719-llvm-ba266eec79a9293910a5875d31cc0813bbc8a233.tar.gz
bcm5719-llvm-ba266eec79a9293910a5875d31cc0813bbc8a233.zip
Putting back safe fixes 116836,116837,116838
llvm-svn: 116866
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index e822009c580..4898d6f2fc0 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1580,6 +1580,8 @@ void TagDecl::completeDefinition() {
TagDecl* TagDecl::getDefinition() const {
if (isDefinition())
return const_cast<TagDecl *>(this);
+ if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(this))
+ return CXXRD->getDefinition();
for (redecl_iterator R = redecls_begin(), REnd = redecls_end();
R != REnd; ++R)
OpenPOWER on IntegriCloud