Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Preprocessor / pragma_assume_nonnull.c
blob1aec2120fd167e0478ff6e1fce968393f9e6b1c5
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -E %s | FileCheck %s
4 // CHECK: #pragma clang assume_nonnull begin
5 #pragma clang assume_nonnull begin
7 int bar(int * ip) { return *ip; }
9 // CHECK: #pragma clang assume_nonnull end
10 #pragma clang assume_nonnull end
12 int foo(int * _Nonnull ip) { return *ip; }
14 int main(void) {
15 return bar(0) + foo(0); // expected-warning 2 {{null passed to a callee that requires a non-null argument}}