Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / lambda-notes.cpp
blob2cb3abbba768bef2bfa8e25306abd48bb1aef7f1
1 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core.DivideZero -analyzer-config inline-lambdas=true -analyzer-output plist -verify %s -o %t
2 // RUN: tail -n +11 %t | %normalize_plist | diff -ub %S/Inputs/expected-plists/lambda-notes.cpp.plist -
5 // Diagnostic inside a lambda
7 void diagnosticFromLambda() {
8 int i = 0;
9 [=] {
10 int p = 5/i; // expected-warning{{Division by zero}}
11 (void)p;
12 }();