From f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 15 Jul 2010 17:07:12 +0000 Subject: Update clang to r108428. --- test/SemaCXX/return.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/SemaCXX/return.cpp') diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp index e682fdf..6bdbe52 100644 --- a/test/SemaCXX/return.cpp +++ b/test/SemaCXX/return.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -Wignored-qualifiers -verify int test1() { throw; @@ -16,3 +16,13 @@ template T h() { return 17; } + +// Don't warn on cv-qualified class return types, only scalar return types. +namespace ignored_quals { +struct S {}; +const S class_c(); +const volatile S class_cv(); + +const int scalar_c(); // expected-warning{{'const' type qualifier on return type has no effect}} +const volatile int scalar_cv(); // expected-warning{{'const volatile' type qualifiers on return type have no effect}} +} -- cgit v1.1