// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-linux-gnu -O2 -o - %s | FileCheck -check-prefix=NULL-POINTER-INVALID %s
// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-linux-gnu -O2 -o - %s -fno-delete-null-pointer-checks | FileCheck -check-prefix=NULL-POINTER-VALID %s
// Test that clang does not remove the null pointer check with
// -fno-delete-null-pointer-checks.
int
// NULL-POINTER-INVALID-NOT: attributes #0 = {{.*}} null_pointer_is_valid
// NULL-POINTER-VALID: attributes #0 = {{.*}} null_pointer_is_valid