2012-03-04 17:41:16 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 %s -verify
|
|
|
|
|
2016-11-02 23:46:34 +08:00
|
|
|
// expected-note@+1 {{extern "C" language linkage specification begins here}}
|
2012-03-04 17:41:16 +08:00
|
|
|
extern "C" void operator "" _a(const char *); // expected-error {{must have C++ linkage}}
|
|
|
|
extern "C" template<char...> void operator "" _b(); // expected-error {{must have C++ linkage}}
|
2016-11-02 23:46:34 +08:00
|
|
|
// expected-note@-1 {{extern "C" language linkage specification begins here}}
|
2012-03-04 17:41:16 +08:00
|
|
|
|
2016-11-02 23:46:34 +08:00
|
|
|
extern "C" { // expected-note 4 {{extern "C" language linkage specification begins here}}
|
2012-03-04 17:41:16 +08:00
|
|
|
void operator "" _c(const char *); // expected-error {{must have C++ linkage}}
|
|
|
|
template<char...> void operator "" _d(); // expected-error {{must have C++ linkage}}
|
|
|
|
namespace N {
|
|
|
|
void operator "" _e(const char *); // expected-error {{must have C++ linkage}}
|
|
|
|
template<char...> void operator "" _f(); // expected-error {{must have C++ linkage}}
|
|
|
|
}
|
|
|
|
}
|