1 // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fsyntax-only -verify %s
3 #if !__has_extension(statement_attributes_with_gnu_syntax)
4 #error "We should have statement attributes with GNU syntax support"
7 template <typename T
= void>
8 class __attribute__((nomerge
)) A
{
9 // expected-error@-1 {{'nomerge' attribute only applies to functions and statements}}
12 class B
: public A
<> {
20 __attribute__((nomerge
)) static_cast<B
*>(obj
)->bar();
21 __attribute__((nomerge
))[obj
]() { static_cast<B
*>(obj
)->bar(); }
23 __attribute__(()) try {