1 // RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core,debug.ExprInspection %s -verify
3 void clang_analyzer_checkInlined(bool);
4 void clang_analyzer_eval(int);
6 namespace EnumsViaMemberExpr
{
13 void testEnumVal(Foo Baz
) {
14 clang_analyzer_eval(Baz
.Bar
== Foo::Bar
); // expected-warning{{TRUE}}
17 void testEnumRef(Foo
&Baz
) {
18 clang_analyzer_eval(Baz
.Bar
== Foo::Bar
); // expected-warning{{TRUE}}
21 void testEnumPtr(Foo
*Baz
) {
22 clang_analyzer_eval(Baz
->Bar
== Foo::Bar
); // expected-warning{{TRUE}}
34 void g(bool (A::*mp_f
)() const) {
35 // This used to trigger an assertion because the 'this' pointer is a
39 void f() { g(&A::h
); }