aboutsummaryrefslogtreecommitdiff
path: root/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
commit220a9c82dc76a83a7f930879bf176783866c0514 (patch)
treeaf049abce637b2d9793b8b895afbdcf105f09b31 /lib/AST/Decl.cpp
parent52a4ff6eae5d5e303c8b43022211e6d3ed429254 (diff)
Putting back safe fixes 116836,116837,116838
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index e822009c58..4898d6f2fc 100644
--- a/lib/AST/Decl.cpp
+++ b/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)