summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-22 17:12:29 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-22 17:12:29 +0000
commit024d80e571ae0fc97ca731e0a56faac56f20841a (patch)
tree07570c1be4853d91ede6329d27d647d41b8bcabc /clang/lib/Sema
parent0c6f5395644a3cb838b63e48a1df00f4648cbf20 (diff)
downloadbcm5719-llvm-024d80e571ae0fc97ca731e0a56faac56f20841a.tar.gz
bcm5719-llvm-024d80e571ae0fc97ca731e0a56faac56f20841a.zip
Don't look for a destructor in a dependent type. Fixes PR7198.
llvm-svn: 104445
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 6d907ed4e01..3be673f7f9e 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -4795,7 +4795,7 @@ bool Sema::InitializeVarWithConstructor(VarDecl *VD,
void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {
CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(Record->getDecl());
if (!ClassDecl->isInvalidDecl() && !VD->isInvalidDecl() &&
- !ClassDecl->hasTrivialDestructor()) {
+ !ClassDecl->hasTrivialDestructor() && !ClassDecl->isDependentContext()) {
CXXDestructorDecl *Destructor = ClassDecl->getDestructor(Context);
MarkDeclarationReferenced(VD->getLocation(), Destructor);
CheckDestructorAccess(VD->getLocation(), Destructor,
OpenPOWER on IntegriCloud