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> llvm-svn: 205285
This commit is contained in:
parent
e081e22036
commit
8d265c2633
|
@ -3278,7 +3278,7 @@ compareConversionFunctions(Sema &S, FunctionDecl *Function1,
|
|||
// 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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue