llvm-for-llvmta/tools/clang/test/Analysis/loop-widening-ignore-static...

13 lines
351 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config widen-loops=true -analyzer-max-loop 2 %s
// REQUIRES: asserts
// expected-no-diagnostics
//
// This test checks that the loop-widening code ignores static methods. If that is not the
// case, then an assertion will trigger.
class Test {
static void foo() {
for (;;) {}
}
};