2014-05-06 00:58:47 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
|
|
|
// RUN: echo '// A' > %t/A.h
|
2014-10-14 10:08:30 +08:00
|
|
|
// RUN: echo '#include "C.h"' > %t/B.h
|
|
|
|
// RUN: echo '// C' > %t/C.h
|
2014-05-06 00:58:47 +08:00
|
|
|
// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
|
|
|
|
// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
|
2014-10-14 10:08:30 +08:00
|
|
|
// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
|
2014-05-06 00:58:47 +08:00
|
|
|
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -verify \
|
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
2014-08-07 08:24:21 +08:00
|
|
|
// RUN: -I %t -Rmodule-build
|
2014-05-06 00:58:47 +08:00
|
|
|
|
2014-10-14 10:08:30 +08:00
|
|
|
@import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}}
|
|
|
|
@import B; // expected-remark{{building module 'B' as}} expected-remark {{finished building module 'B'}}
|
2014-05-06 00:58:47 +08:00
|
|
|
@import A; // no diagnostic
|
|
|
|
@import B; // no diagnostic
|
|
|
|
|
2014-10-14 10:08:30 +08:00
|
|
|
// RUN: echo ' ' >> %t/C.h
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
|
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
2014-08-07 08:24:21 +08:00
|
|
|
// RUN: -Rmodule-build 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
// RUN: echo ' ' >> %t/B.h
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
|
2014-08-08 02:45:21 +08:00
|
|
|
// RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s
|
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
2014-08-07 08:24:21 +08:00
|
|
|
|
|
|
|
// RUN: echo ' ' >> %t/B.h
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \
|
2014-08-08 02:45:21 +08:00
|
|
|
// RUN: -Rmodule-build -Rno-everything 2>&1 | \
|
|
|
|
// RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s
|
2014-05-06 00:58:47 +08:00
|
|
|
|
|
|
|
// CHECK-NOT: building module 'A'
|
|
|
|
// CHECK: building module 'B'
|
2014-10-14 10:08:30 +08:00
|
|
|
// CHECK: building module 'C'
|
|
|
|
// CHECK: finished building module 'C'
|
|
|
|
// CHECK: finished building module 'B'
|
2014-08-08 02:45:21 +08:00
|
|
|
// NO-REMARKS-NOT: building module 'A'
|
|
|
|
// NO-REMARKS-NOT: building module 'B'
|