diff options
Diffstat (limited to 'test/SemaCXX/return.cpp')
-rw-r--r-- | test/SemaCXX/return.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp index 46524fc..af7f50c 100644 --- a/test/SemaCXX/return.cpp +++ b/test/SemaCXX/return.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fexceptions -fsyntax-only -Wignored-qualifiers -verify +// RUN: %clang_cc1 %s -fcxx-exceptions -fexceptions -fsyntax-only -Wignored-qualifiers -verify int test1() { throw; @@ -41,3 +41,15 @@ char* volatile i(); // expected-warning{{'volatile' type qualifier on return typ const volatile int scalar_cv(); // expected-warning{{'const volatile' type qualifiers on return type have no effect}} } + +namespace PR9328 { + typedef char *PCHAR; + class Test + { + const PCHAR GetName() { return 0; } // expected-warning{{'const' type qualifier on return type has no effect}} + }; +} + +class foo { + operator int * const (); +}; |