blob: 51293a187ce2c308006257bacda768f516c6dc04 [file] [log] [blame]
Artem Dergachevab7747b2019-04-30 03:01:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection \
2// RUN: -analyzer-inline-max-stack-depth=5 -w -std=c++17 -verify %s
3
4void clang_analyzer_eval(bool);
5
6namespace inline_large_functions_with_if_constexpr {
7bool f0() { if constexpr (true); return true; }
8bool f1() { if constexpr (true); return f0(); }
9bool f2() { if constexpr (true); return f1(); }
10bool f3() { if constexpr (true); return f2(); }
11bool f4() { if constexpr (true); return f3(); }
12bool f5() { if constexpr (true); return f4(); }
13bool f6() { if constexpr (true); return f5(); }
14bool f7() { if constexpr (true); return f6(); }
15void bar() {
16 clang_analyzer_eval(f7()); // expected-warning{{TRUE}}
17}
18} // namespace inline_large_functions_with_if_constexpr