mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 20:15:49 -04:00

Summary: The `%diff_plist` lit substitution invokes `diff` with a non-portable `-I` option. The intended effect can be achieved by normalizing the inputs to `diff` beforehand. Such normalization can be done with `grep -Ev`, which is also used by other tests. This patch applies the change (adjusted for review comments) described in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html mechanically to the cases where the output file is piped to `%diff_plist` via `tail`. `%diff_plist` is then, being unused, removed. The changes were applied via a script. Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62951 llvm-svn: 362998
14 lines
415 B
C++
14 lines
415 B
C++
// RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core.DivideZero -analyzer-config inline-lambdas=true -analyzer-output plist -verify %s -o %t
|
|
// RUN: tail -n +11 %t | %normalize_plist | diff -u %S/Inputs/expected-plists/lambda-notes.cpp.plist -
|
|
|
|
|
|
// Diagnostic inside a lambda
|
|
|
|
void diagnosticFromLambda() {
|
|
int i = 0;
|
|
[=] {
|
|
int p = 5/i; // expected-warning{{Division by zero}}
|
|
(void)p;
|
|
}();
|
|
}
|