[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / clang-tools-extra / test / clang-tidy / infrastructure / read_file_config.cpp
blob3e39b4d630eb3b6f65bf1d4c4da46469be6a9387
1 // REQUIRES: static-analyzer
2 // RUN: mkdir -p %T/read-file-config/
3 // RUN: cp %s %T/read-file-config/test.cpp
4 // RUN: echo 'Checks: "-*,modernize-use-nullptr"' > %T/read-file-config/.clang-tidy
5 // RUN: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "%/T/read-file-config", "file": "%/T/read-file-config/test.cpp"}]' > %T/read-file-config/compile_commands.json
6 // RUN: clang-tidy %T/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
7 // RUN: clang-tidy -checks="-*,clang-analyzer-*" %T/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
9 void f() {
10 int x;
11 x = 1;
12 x = 2;