diff options
Diffstat (limited to 'test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp')
-rw-r--r-- | test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp new file mode 100644 index 0000000..4873c09 --- /dev/null +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void f() const; // expected-error{{type qualifier is not allowed on this function}} + +struct X { + void f() const; + friend void g() const; // expected-error{{type qualifier is not allowed on this function}} + static void h() const; // expected-error{{type qualifier is not allowed on this function}} +}; + +struct Y { + friend void X::f() const; + friend void ::f() const; // expected-error{{type qualifier is not allowed on this function}} +}; |