r212833 - Test for warning being silenced
Sylvestre Ledru
sylvestre at debian.org
Fri Jul 11 10:23:14 PDT 2014
Author: sylvestre
Date: Fri Jul 11 12:23:13 2014
New Revision: 212833
URL: http://llvm.org/viewvc/llvm-project?rev=212833&view=rev
Log:
Test for warning being silenced
Summary:
Added some tests to see if the new warning would be silenced with a flag.
Patch by Arthur Marble <arthur at info9.net> in the context of Debian Google Summer of code 2014.
Reviewers: sylvestre.ledru
Reviewed By: sylvestre.ledru
Differential Revision: http://reviews.llvm.org/D4475
Modified:
cfe/trunk/test/Driver/clang_f_opts.c
Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=212833&r1=212832&r2=212833&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Fri Jul 11 12:23:13 2014
@@ -175,6 +175,15 @@
// CHECK-WARNING1: ignoring unsupported optimization flag '-finline-limit=1000'
// CHECK-WARNING2: ignoring unsupported optimization flag '-finline-limit'
+// Test that we mute the warning on these
+// RUN: %clang -### -finline-limit=1000 -Wno-unused-command-line-argument \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s
+// RUN: %clang -### -finline-limit -Wno-unused-command-line-argument \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
+// CHECK-NO-WARNING1-NOT: ignoring unsupported optimization flag '-finline-limit=1000'
+// CHECK-NO-WARNING2-NOT: ignoring unsupported optimization flag '-finline-limit'
+
+
// RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 %s
// RUN: %clang -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 %s
// CHECK-WCHAR1: -fno-short-wchar
More information about the cfe-commits
mailing list