1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
4 void clang_analyzer_eval(bool);
6 // TODO: The following test will work properly once reinterpret_cast on pointer-to-member is handled properly
7 namespace testReinterpretCasting
{
12 struct Derived
: public Base
{};
14 struct DoubleDerived
: public Derived
{};
19 int DoubleDerived::*ddf
= &Base::field
;
20 int Base::*bf
= reinterpret_cast<int Base::*>(reinterpret_cast<int Derived::*>(reinterpret_cast<int Base::*>(ddf
)));
21 int Some::*sf
= reinterpret_cast<int Some::*>(ddf
);
24 clang_analyzer_eval(base
.*bf
== 13); // expected-warning{{TRUE}}
26 } // namespace testReinterpretCasting