[PATCH] D139653: [clang] Set ShowInSystemHeader for module-build and module-import remarks

Dave Lee via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 15:55:19 PDT 2023


kastiglione updated this revision to Diff 510141.
kastiglione added a comment.

minor cleanup of test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139653/new/

https://reviews.llvm.org/D139653

Files:
  clang/include/clang/Basic/DiagnosticFrontendKinds.td
  clang/include/clang/Basic/DiagnosticSerializationKinds.td
  clang/test/Modules/system-Rmodule-build.m


Index: clang/test/Modules/system-Rmodule-build.m
===================================================================
--- /dev/null
+++ clang/test/Modules/system-Rmodule-build.m
@@ -0,0 +1,16 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/sys
+// RUN: echo '#include <B.h>' > %t/sys/A.h
+// RUN: echo '' > %t/sys/B.h
+// RUN: echo 'module A { header "A.h" }' > %t/sys/module.modulemap
+// RUN: echo 'module B { header "B.h" }' >> %t/sys/module.modulemap
+
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s \
+// RUN:            -isystem %t/sys -Rmodule-build 2>&1 | FileCheck %s
+
+ at import A;
+
+// CHECK: building module 'A' as
+// CHECK: building module 'B' as
+// CHECK: finished building module 'B'
+// CHECK: finished building module 'A'
Index: clang/include/clang/Basic/DiagnosticSerializationKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -75,6 +75,7 @@
 
 def remark_module_import : Remark<
   "importing module '%0'%select{| into '%3'}2 from '%1'">,
+  ShowInSystemHeader,
   InGroup<ModuleImport>;
 
 def err_imported_module_not_found : Error<
Index: clang/include/clang/Basic/DiagnosticFrontendKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -241,8 +241,10 @@
 def note_module_def_undef_here : Note<
   "macro was %select{defined|#undef'd}0 here">;
 def remark_module_build : Remark<"building module '%0' as '%1'">,
+  ShowInSystemHeader,
   InGroup<ModuleBuild>;
 def remark_module_build_done : Remark<"finished building module '%0'">,
+  ShowInSystemHeader,
   InGroup<ModuleBuild>;
 def remark_module_lock : Remark<"locking '%0' to build module '%1'">,
   InGroup<ModuleLock>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139653.510141.patch
Type: text/x-patch
Size: 1933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230331/4c1cf86c/attachment.bin>


More information about the cfe-commits mailing list