summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-04 22:26:26 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-04 22:26:26 +0000
commit67da35c832e66d3310ed67486cb46306f20cc642 (patch)
treefb9a44adb34cad6cc2686e6cca6427c8c0c489ed /clang/lib/Sema/SemaOverload.cpp
parent1de1707bfc789e9cf9467c2d37af2a584db6520b (diff)
downloadbcm5719-llvm-67da35c832e66d3310ed67486cb46306f20cc642.tar.gz
bcm5719-llvm-67da35c832e66d3310ed67486cb46306f20cc642.zip
Extract a common structure for holding information about the definition
of a C++ record. Exposed a lot of problems where various routines were silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order) when presented with a non-definition. Also cuts down on memory usage. llvm-svn: 95330
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 1319f337a6b..c76cbca160d 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -3408,6 +3408,9 @@ static Qualifiers CollectVRQualifiers(ASTContext &Context, Expr* ArgExpr) {
}
CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(TyRec->getDecl());
+ if (!ClassDecl->hasDefinition())
+ return VRQuals;
+
const UnresolvedSetImpl *Conversions =
ClassDecl->getVisibleConversionFunctions();
OpenPOWER on IntegriCloud