aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/return.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-02-23 18:51:59 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-02-23 18:51:59 +0000
commitd067c07c6cbf099b25aba38bcb66f38e79d0c420 (patch)
treef1335f61d0db3ee2ab6e5251a96853ad8574eaa1 /test/Sema/return.c
parent87fb9404cd962b78c98947d75d68be1691c4e737 (diff)
Fix the behavior of -Wignored-qualifiers on return type qualifiers in
several ways. We now warn for more of the return types, and correctly locate the ignored ones. Also adds fix-it hints to remove the ignored qualifiers. Fixes much of PR9058, although not all of it. Patch by Hans Wennborg, a couple of minor style tweaks from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/return.c')
-rw-r--r--test/Sema/return.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Sema/return.c b/test/Sema/return.c
index 0c2c72ee53..d9456b6e35 100644
--- a/test/Sema/return.c
+++ b/test/Sema/return.c
@@ -242,6 +242,7 @@ static inline int si_forward() {} // expected-warning{{control reaches end of no
// Test warnings on ignored qualifiers on return types.
const int ignored_c_quals(); // expected-warning{{'const' type qualifier on return type has no effect}}
const volatile int ignored_cv_quals(); // expected-warning{{'const volatile' type qualifiers on return type have no effect}}
+char* const volatile restrict ignored_cvr_quals(); // expected-warning{{'const volatile restrict' type qualifiers on return type have no effect}}
// Test that for switch(enum) that if the switch statement covers all the cases
// that we don't consider that for -Wreturn-type.
@@ -254,4 +255,3 @@ int test_enum_cases(enum Cases C) {
case C3: return 4;
}
} // no-warning
-