diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-07 00:24:21 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-07 00:24:21 +0000 |
| commit | 3be1cb294f328f03afcb9c9e039b078a8643d0d9 (patch) | |
| tree | 0d05f2452ec652e2986cf91e558cb2a24af79354 /clang/test | |
| parent | 0233d4957443d8b07368eb0dca6ee77de8977a23 (diff) | |
| download | bcm5719-llvm-3be1cb294f328f03afcb9c9e039b078a8643d0d9.tar.gz bcm5719-llvm-3be1cb294f328f03afcb9c9e039b078a8643d0d9.zip | |
Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)
-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.
The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.
-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.
llvm-svn: 215046
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Frontend/optimization-remark.c | 15 | ||||
| -rw-r--r-- | clang/test/Frontend/warning-options.cpp | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Rmodule-build.m | 16 | ||||
| -rw-r--r-- | clang/test/Modules/module_file_info.m | 2 | ||||
| -rw-r--r-- | clang/test/Modules/no-stale-modtime.m | 8 |
5 files changed, 37 insertions, 8 deletions
diff --git a/clang/test/Frontend/optimization-remark.c b/clang/test/Frontend/optimization-remark.c index e512253682a..6ada0030a70 100644 --- a/clang/test/Frontend/optimization-remark.c +++ b/clang/test/Frontend/optimization-remark.c @@ -6,6 +6,21 @@ // RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -verify // RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -gline-tables-only -verify // RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>/dev/null | FileCheck %s +// +// Check that we can override -Rpass= with -Rno-pass. +// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS +// RUN: %clang_cc1 %s -Rpass=inline -Rno-pass -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS +// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS +// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -Reverything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS +// +// FIXME: -Reverything should imply -Rpass=.*. +// RUN: %clang_cc1 %s -Reverything -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS +// +// FIXME: -Rpass should either imply -Rpass=.* or should be rejected. +// RUN: %clang_cc1 %s -Rpass -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS + +// CHECK-REMARKS: remark: +// CHECK-NO-REMARKS-NOT: remark: // -Rpass should produce source location annotations, exclusively (just // like -gmlt). diff --git a/clang/test/Frontend/warning-options.cpp b/clang/test/Frontend/warning-options.cpp index 85bea625957..3c3396becaf 100644 --- a/clang/test/Frontend/warning-options.cpp +++ b/clang/test/Frontend/warning-options.cpp @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -Wmonkey -Wno-monkey -Wno-unused-command-line-arguments \ -// RUN: -Wno-unused-command-line-argument %s 2>&1 | FileCheck %s +// RUN: -Wno-unused-command-line-argument -Wmodule-build -Rmodule-built %s 2>&1 | FileCheck %s // CHECK: unknown warning option '-Wmonkey' // CHECK: unknown warning option '-Wno-monkey' // CHECK: unknown warning option '-Wno-unused-command-line-arguments'; did you mean '-Wno-unused-command-line-argument'? +// CHECK: unknown warning option '-Wmodule-build'; did you mean '-Wmodule-conflict'? +// CHECK: unknown remark option '-Rmodule-built'; did you mean '-Rmodule-build'? diff --git a/clang/test/Modules/Rmodule-build.m b/clang/test/Modules/Rmodule-build.m index 4ac36efe898..b8abc01c2c1 100644 --- a/clang/test/Modules/Rmodule-build.m +++ b/clang/test/Modules/Rmodule-build.m @@ -7,7 +7,7 @@ // RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \ -// RUN: -I %t -Wmodule-build +// RUN: -I %t -Rmodule-build @import A; // expected-remark{{building module 'A' as}} @import B; // expected-remark{{building module 'B' as}} @@ -16,7 +16,19 @@ // RUN: echo ' ' >> %t/B.h // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ -// RUN: -Wmodule-build 2>&1 | FileCheck %s +// RUN: -Rmodule-build 2>&1 | FileCheck %s + +// RUN: echo ' ' >> %t/B.h +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: -Reverything 2>&1 | FileCheck %s + +// RUN: echo ' ' >> %t/B.h +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: 2>&1 | count 0 + +// RUN: echo ' ' >> %t/B.h +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: -Rmodule-build -Rno-everything 2>&1 | count 0 // CHECK-NOT: building module 'A' // CHECK: building module 'B' diff --git a/clang/test/Modules/module_file_info.m b/clang/test/Modules/module_file_info.m index 3c10780f253..2447a747e3d 100644 --- a/clang/test/Modules/module_file_info.m +++ b/clang/test/Modules/module_file_info.m @@ -22,7 +22,7 @@ // CHECK: Diagnostic options: // CHECK: IgnoreWarnings: Yes -// CHECK: Warning options: +// CHECK: Diagnostic flags: // CHECK: -Wunused // CHECK: Header search options: diff --git a/clang/test/Modules/no-stale-modtime.m b/clang/test/Modules/no-stale-modtime.m index 2fb17b763e7..1bff2b017a4 100644 --- a/clang/test/Modules/no-stale-modtime.m +++ b/clang/test/Modules/no-stale-modtime.m @@ -13,18 +13,18 @@ // RUN: echo 'module r { header "r.h" } module t { header "t.h" }' >> %t/module.map // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ -// RUN: -I %t -fsyntax-only %s -Wmodule-build 2>&1 \ +// RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \ // RUN: | FileCheck -check-prefix=REBUILD-ALL %s // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ -// RUN: -I %t -fsyntax-only %s -Wmodule-build -verify +// RUN: -I %t -fsyntax-only %s -Rmodule-build -verify // Add an identifier to ensure everything depending on t is out of date // RUN: echo 'extern int a;' >> %t/t.h // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ -// RUN: -I %t -fsyntax-only %s -Wmodule-build 2>&1 \ +// RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \ // RUN: | FileCheck -check-prefix=REBUILD-ALL %s // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ -// RUN: -I %t -fsyntax-only %s -Wmodule-build -verify +// RUN: -I %t -fsyntax-only %s -Rmodule-build -verify // REBUILD-ALL: building module 'b' // REBUILD-ALL: building module 'l' |

