summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-14 17:47:39 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-14 17:47:39 +0000
commitd2e6a457229ccf2478cbd7de5fe763b871a482d8 (patch)
treeecb0845d6180610cd78c298314fb8a99b0b09741 /clang/lib/AST/DeclCXX.cpp
parentfc59ce1ea47cd9ea8f887dc5e5ae8191ef762957 (diff)
downloadbcm5719-llvm-d2e6a457229ccf2478cbd7de5fe763b871a482d8.tar.gz
bcm5719-llvm-d2e6a457229ccf2478cbd7de5fe763b871a482d8.zip
When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. llvm-svn: 93433
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index b30d335918a..1cce35c0b39 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -144,6 +144,19 @@ CXXRecordDecl::setBases(ASTContext &C,
}
}
+/// Callback function for CXXRecordDecl::forallBases that acknowledges
+/// that it saw a base class.
+static bool SawBase(const CXXRecordDecl *, void *) {
+ return true;
+}
+
+bool CXXRecordDecl::hasAnyDependentBases() const {
+ if (!isDependentContext())
+ return false;
+
+ return !forallBases(SawBase, 0);
+}
+
bool CXXRecordDecl::hasConstCopyConstructor(ASTContext &Context) const {
return getCopyConstructor(Context, Qualifiers::Const) != 0;
}
OpenPOWER on IntegriCloud