aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-21 20:29:55 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-21 20:29:55 +0000
commite0d5fe2a417b84ac8b51927ebeb8f1c9ae492760 (patch)
tree398a9b75769c5ef3dc32fcf23ac1f6613374f8ba /lib/Sema
parent34d7c4d62863ca0d5bcf705da0e1001878386c26 (diff)
Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a canonical type. Fixes PR7176. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaCXXCast.cpp2
-rw-r--r--lib/Sema/SemaExceptionSpec.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp
index c8eae2fb0a..9b95552554 100644
--- a/lib/Sema/SemaCXXCast.cpp
+++ b/lib/Sema/SemaCXXCast.cpp
@@ -859,7 +859,7 @@ TryStaticMemberPointerUpcast(Sema &Self, Expr *&SrcExpr, QualType SrcType,
}
// B is a base of D. But is it an allowed base? If not, it's a hard error.
- if (Paths.isAmbiguous(DestClass)) {
+ if (Paths.isAmbiguous(Self.Context.getCanonicalType(DestClass))) {
Paths.clear();
Paths.setRecordingPaths(true);
bool StillOkay = Self.IsDerivedFrom(SrcClass, DestClass, Paths);
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp
index 53e9385749..7d73fe4777 100644
--- a/lib/Sema/SemaExceptionSpec.cpp
+++ b/lib/Sema/SemaExceptionSpec.cpp
@@ -389,7 +389,7 @@ bool Sema::CheckExceptionSpecSubset(
if (!IsDerivedFrom(CanonicalSubT, CanonicalSuperT, Paths))
continue;
- if (Paths.isAmbiguous(CanonicalSuperT))
+ if (Paths.isAmbiguous(Context.getCanonicalType(CanonicalSuperT)))
continue;
// Do this check from a context without privileges.