xref: /llvm-project/clang/test/Tooling/clang-check-analyzer.cpp (revision 83494d2f8cc6bb743d408031188c20d6e64c2eff)
1 // RUN: clang-check -analyze "%s" -- -c 2>&1 | FileCheck %s
2 // RUN: clang-check -analyze "%s" -- -c -flto -Wa,--noexecstack 2>&1 | FileCheck %s
3 // RUN: clang-check -analyze "%s" -- -c -no-integrated-as -flto=thin 2>&1 | FileCheck %s
4 // RUN: clang-check -analyze "%s" -- -c -flto=full 2>&1 | FileCheck %s
5 
6 // CHECK: Dereference of null pointer
a(int * x)7 void a(int *x) { if(x){} *x = 47; }
8