Index: lib/Sema/SemaChecking.cpp =================================================================== --- lib/Sema/SemaChecking.cpp +++ lib/Sema/SemaChecking.cpp @@ -1348,7 +1348,8 @@ } if (FDecl || Proto) { - CheckNonNullArguments(*this, FDecl, Proto, Args, Loc); + if (!isUnevaluatedContext()) + CheckNonNullArguments(*this, FDecl, Proto, Args, Loc); // Type safety checking. if (FDecl) { Index: test/Sema/non-null-warning.c =================================================================== --- test/Sema/non-null-warning.c +++ test/Sema/non-null-warning.c @@ -39,4 +39,5 @@ int main () { foo(0); // expected-warning {{null passed to a callee that requires a non-null argument}} + (void)sizeof(foo(0)); // expect no warning when in an unevaluated context. }