From 0f59cb38e7f319ee46b66812b212a5afaa3572bb Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 18 Dec 2015 21:45:41 +0000 Subject: Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call for the derived class into it. This is mostly just a cleanup, but could in principle be a bugfix if there is some codepath that reaches here and didn't previously require a complete type (I couldn't find any such codepath, though). llvm-svn: 256037 --- clang/lib/Sema/SemaFixItUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaFixItUtils.cpp') diff --git a/clang/lib/Sema/SemaFixItUtils.cpp b/clang/lib/Sema/SemaFixItUtils.cpp index 982d9cf4c26..714fbedf09b 100644 --- a/clang/lib/Sema/SemaFixItUtils.cpp +++ b/clang/lib/Sema/SemaFixItUtils.cpp @@ -42,7 +42,7 @@ bool ConversionFixItGenerator::compareTypesSimple(CanQualType From, const CanQualType FromUnq = From.getUnqualifiedType(); const CanQualType ToUnq = To.getUnqualifiedType(); - if ((FromUnq == ToUnq || (S.IsDerivedFrom(FromUnq, ToUnq)) ) && + if ((FromUnq == ToUnq || (S.IsDerivedFrom(Loc, FromUnq, ToUnq)) ) && To.isAtLeastAsQualifiedAs(From)) return true; return false; -- cgit v1.2.3