]> granicus.if.org Git - clang/commitdiff
Test for warning being silenced
authorSylvestre Ledru <sylvestre@debian.org>
Fri, 11 Jul 2014 17:23:13 +0000 (17:23 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Fri, 11 Jul 2014 17:23:13 +0000 (17:23 +0000)
Summary:
Added some tests to see if the new warning would be silenced with a flag.

Patch by Arthur Marble <arthur@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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212833 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/clang_f_opts.c

index 3971216b2e03a3109617b67746603b5a657cd20d..f31e9e225cb62eb42d21b3a48bc3de6b41e673b2 100644 (file)
 // 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