From: Sylvestre Ledru Date: Fri, 11 Jul 2014 17:23:13 +0000 (+0000) Subject: Test for warning being silenced X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6735f36dd97063d1f91bf571e8e2fd13c9d2dea2;p=clang 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 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 --- diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c index 3971216b2e..f31e9e225c 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -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