16 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -verify %s2// expected-no-diagnostics3 4// Do not crash when __PRETTY_FUNCTION__ appears in the trailing return type of the lambda5void foo() {6 []() -> decltype(static_cast<const char*>(__PRETTY_FUNCTION__)) {7 return nullptr;8 }();9 10#ifdef MS11 []() -> decltype(static_cast<const char*>(__FUNCSIG__)) {12 return nullptr;13 }();14#endif15}16