r205285 - Add defensive check that argument may be null in call to compareConversionFunctions() on incorrect code.
Ted Kremenek
kremenek at apple.com
Tue Apr 1 00:23:18 PDT 2014
Author: kremenek
Date: Tue Apr 1 02:23:18 2014
New Revision: 205285
URL: http://llvm.org/viewvc/llvm-project?rev=205285&view=rev
Log:
Add defensive check that argument may be null in call to compareConversionFunctions() on incorrect code.
I'm looking into getting a reduced test case, but it's not
immediately available.
Fixes <rdar://problem/16344806>
Modified:
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=205285&r1=205284&r2=205285&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Tue Apr 1 02:23:18 2014
@@ -3278,7 +3278,7 @@ compareConversionFunctions(Sema &S, Func
// respectively, always prefer the conversion to a function pointer,
// because the function pointer is more lightweight and is more likely
// to keep code working.
- CXXConversionDecl *Conv1 = dyn_cast<CXXConversionDecl>(Function1);
+ CXXConversionDecl *Conv1 = dyn_cast_or_null<CXXConversionDecl>(Function1);
if (!Conv1)
return ImplicitConversionSequence::Indistinguishable;
More information about the cfe-commits
mailing list