diff options
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' |