Clang Project

clang_source_code/test/Tooling/clang-check-analyzer.cpp
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
7void a(int *x) { if(x){} *x = 47; }
8