diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-07-14 06:36:18 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-07-14 06:36:18 +0000 |
commit | 5495f37302f7c82192dab1ce8d9c9fe76ed0ee37 (patch) | |
tree | 32d6d6983c6603ac3733ed1f2d8f10dee397c2b5 /test/SemaCXX/conditional-expr.cpp | |
parent | 773eb03d8c12639e4219869a97c3b45ff13a1533 (diff) |
Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.
This flag and warning match GCC semantics. Also, move it to -Wextra as this is
a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to
the tests which no longer by default emit the warning. Added explicit test
cases for both C and C++ behavior with the warning turned on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conditional-expr.cpp')
-rw-r--r-- | test/SemaCXX/conditional-expr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp index f37ccc8a15..065179b6da 100644 --- a/test/SemaCXX/conditional-expr.cpp +++ b/test/SemaCXX/conditional-expr.cpp @@ -288,11 +288,11 @@ namespace PR7598 { v = 1, }; - const Enum g() { // expected-warning{{type qualifier on return type has no effect}} + const Enum g() { return v; } - const volatile Enum g2() { // expected-warning{{'const volatile' type qualifiers on return type have no effect}} + const volatile Enum g2() { return v; } |