27 lines · cpp
1// RUN: %clang_cc1 -verify %s -Wno-unevaluated-expression2// Don't crash (PR50497).3 4// expected-no-diagnostics5namespace std {6class type_info;7}8 9class Ex {10 // polymorphic11 virtual ~Ex();12};13void Frob(const std::type_info &type);14 15void Foo(Ex *ex) {16 // generic lambda17 [=](auto rate) {18 // typeid19 Frob(typeid(*ex));20 }(1);21 22 [=](auto rate) {23 // unevaluated nested typeid24 Frob(typeid((typeid(*ex), ex)));25 }(1);26}27