Skip to content

Commit f3d05cb

Browse files
committed
[clang] Move Diags.isIgnored() check below faster checks
1 parent 4a158f6 commit f3d05cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11745,10 +11745,6 @@ static void CheckImplicitArgumentConversions(Sema &S, CallExpr *TheCall,
1174511745

1174611746
static void DiagnoseNullConversion(Sema &S, Expr *E, QualType T,
1174711747
SourceLocation CC) {
11748-
if (S.Diags.isIgnored(diag::warn_impcast_null_pointer_to_integer,
11749-
E->getExprLoc()))
11750-
return;
11751-
1175211748
// Don't warn on functions which have return type nullptr_t.
1175311749
if (isa<CallExpr>(E))
1175411750
return;
@@ -11765,6 +11761,10 @@ static void DiagnoseNullConversion(Sema &S, Expr *E, QualType T,
1176511761
T->isMemberPointerType() || !T->isScalarType() || T->isNullPtrType())
1176611762
return;
1176711763

11764+
if (S.Diags.isIgnored(diag::warn_impcast_null_pointer_to_integer,
11765+
E->getExprLoc()))
11766+
return;
11767+
1176811768
SourceLocation Loc = E->getSourceRange().getBegin();
1176911769

1177011770
// Venture through the macro stacks to get to the source of macro arguments.

0 commit comments

Comments
 (0)