diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-21 20:29:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-21 20:29:55 +0000 |
commit | 27ac429624675306626af028f50cc3bfe172fe7e (patch) | |
tree | 64f609dbd4cc89b8973856c6f632fb80edbd5c2f /clang/lib/Sema/SemaCXXCast.cpp | |
parent | c425fe4c8014c1f0c921d94ba03d8e137b42a3fa (diff) | |
download | bcm5719-llvm-27ac429624675306626af028f50cc3bfe172fe7e.tar.gz bcm5719-llvm-27ac429624675306626af028f50cc3bfe172fe7e.zip |
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.
llvm-svn: 104374
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCXXCast.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp index c8eae2fb0a8..9b955525548 100644 --- a/clang/lib/Sema/SemaCXXCast.cpp +++ b/clang/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); |