xref: /llvm-project/clang/test/Analysis/loop-widening-ignore-static-methods.cpp (revision 95dd80c2e83bbc18d29056081b3fb233a1664359)
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config widen-loops=true -analyzer-max-loop 2 %s
2 // REQUIRES: asserts
3 // expected-no-diagnostics
4 //
5 // This test checks that the loop-widening code ignores static methods.  If that is not the
6 // case, then an assertion will trigger.
7 
8 class Test {
foo()9   static void foo() {
10     for (;;) {}
11   }
12 };
13