r208367 - Switch Wmodule-build to a remark

Ben Langmuir blangmuir at apple.com
Thu May 8 15:36:03 PDT 2014


Author: benlangmuir
Date: Thu May  8 17:36:02 2014
New Revision: 208367

URL: http://llvm.org/viewvc/llvm-project?rev=208367&view=rev
Log:
Switch Wmodule-build to a remark

On reflection, this is better despite the missing command-line handling
bits for remarks.  Making this a remark makes it much clearer that
this is purely informational and avoids the negative connotations of a
'warning'.

Added:
    cfe/trunk/test/Modules/Rmodule-build.m
      - copied, changed from r208345, cfe/trunk/test/Modules/Wmodule-build.m
Removed:
    cfe/trunk/test/Modules/Wmodule-build.m
Modified:
    cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
    cfe/trunk/lib/Frontend/CompilerInstance.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=208367&r1=208366&r2=208367&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Thu May  8 17:36:02 2014
@@ -169,7 +169,7 @@ def warn_module_config_macro_undef : War
   InGroup<ConfigMacros>;
 def note_module_def_undef_here : Note<
   "macro was %select{defined|#undef'd}0 here">;
-def warn_module_build : Warning<"building module '%0' as '%1'">,
+def remark_module_build : Remark<"building module '%0' as '%1'">,
   InGroup<DiagGroup<"module-build">>, DefaultIgnore;
 
 def err_missing_vfs_overlay_file : Error<

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=208367&r1=208366&r2=208367&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu May  8 17:36:02 2014
@@ -1212,7 +1212,7 @@ CompilerInstance::loadModule(SourceLocat
         return ModuleLoadResult();
       }
 
-      getDiagnostics().Report(ImportLoc, diag::warn_module_build)
+      getDiagnostics().Report(ImportLoc, diag::remark_module_build)
           << ModuleName << ModuleFileName;
 
       // Check whether we have already attempted to build this module (but

Copied: cfe/trunk/test/Modules/Rmodule-build.m (from r208345, cfe/trunk/test/Modules/Wmodule-build.m)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Rmodule-build.m?p2=cfe/trunk/test/Modules/Rmodule-build.m&p1=cfe/trunk/test/Modules/Wmodule-build.m&r1=208345&r2=208367&rev=208367&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Wmodule-build.m (original)
+++ cfe/trunk/test/Modules/Rmodule-build.m Thu May  8 17:36:02 2014
@@ -9,8 +9,8 @@
 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
 // RUN:            -I %t -Wmodule-build
 
- at import A; // expected-warning{{building module 'A' as}}
- at import B; // expected-warning{{building module 'B' as}}
+ at import A; // expected-remark{{building module 'A' as}}
+ at import B; // expected-remark{{building module 'B' as}}
 @import A; // no diagnostic
 @import B; // no diagnostic
 

Removed: cfe/trunk/test/Modules/Wmodule-build.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Wmodule-build.m?rev=208366&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Wmodule-build.m (original)
+++ cfe/trunk/test/Modules/Wmodule-build.m (removed)
@@ -1,22 +0,0 @@
-// REQUIRES: shell
-// RUN: rm -rf %t
-// RUN: mkdir %t
-// RUN: echo '// A' > %t/A.h
-// RUN: echo '// B' > %t/B.h
-// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
-// 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
-
- at import A; // expected-warning{{building module 'A' as}}
- at import B; // expected-warning{{building module 'B' as}}
- at import A; // no diagnostic
- at import B; // no diagnostic
-
-// 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
-
-// CHECK-NOT: building module 'A'
-// CHECK: building module 'B'





More information about the cfe-commits mailing list