diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-13 08:50:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-13 08:50:30 +0000 |
commit | de80ec1fa947855d2e53722a8cd71367ff513481 (patch) | |
tree | 22ceaf6afd0878c875e743c4e8e82fd6a12d29dc /test/SemaCXX/conditional-expr.cpp | |
parent | 218f47ff746b2216e949e79a287c034fd0bd8713 (diff) |
Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,
test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
qualifiers on return type have no effect
const volatile Enum g2() {
^~~~~ ~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conditional-expr.cpp')
-rw-r--r-- | test/SemaCXX/conditional-expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp index 9cbc324467..f37ccc8a15 100644 --- a/test/SemaCXX/conditional-expr.cpp +++ b/test/SemaCXX/conditional-expr.cpp @@ -292,10 +292,15 @@ namespace PR7598 { return v; } + const volatile Enum g2() { // expected-warning{{'const volatile' type qualifiers on return type have no effect}} + return v; + } + void f() { const Enum v2 = v; Enum e = false ? g() : v; Enum e2 = false ? v2 : v; + Enum e3 = false ? g2() : v; } } |