brintos

brintos / llvm-project-archived public Read only

0
0
Text · 577 B · 768f258 Raw
20 lines · cpp
1// Check whether output generation options (like -save-temps) will not affect2// the execution of the analyzer.3 4// RUN: clang-check -analyze %s -- -save-temps -c -Xclang -verify5 6// Check whether redundant -fsyntax-only options will affect the execution of7// the analyzer.8 9// RUN: clang-check -analyze %s -- \10// RUN:   -fsyntax-only -c -fsyntax-only -Xclang -verify 2>&1 | \11// RUN:   FileCheck %s --allow-empty12 13// CHECK-NOT: argument unused during compilation: '--analyze'14 15void a(int *x) {16  if (x) {17  }18  *x = 47; // expected-warning {{Dereference of null pointer}}19}20