diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/SemaCXX/return.cpp | |
parent | c3b054d250cdca485c71845089c316e10610ebad (diff) |
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 46524fccfcc5d..af7f50ce44b3e 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 (); +}; |