// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fsyntax-only -verify %s
#if !__has_extension(statement_attributes_with_gnu_syntax)
#error"We should have statement attributes with GNU syntax support"#endiftemplate<typename T =void>class__attribute__((nomerge))A{// expected-error@-1 {{'nomerge' attribute only applies to functions and statements}}
};classB:publicA<>{public:voidbar();};voidbar();voidfoo(A<>*obj){__attribute__((nomerge))static_cast<B *>(obj)->bar();__attribute__((nomerge))[obj](){static_cast<B *>(obj)->bar();}();__attribute__(())try{bar();}catch(...){}}