[libcxx-commits] [PATCH] D157741: [libc++][CI] Fixes error messages.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 17 09:09:47 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c629eb5087a: [libc++][CI] Fixes error messages. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157741

Files:
  libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp


Index: libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
===================================================================
--- libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
+++ libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
@@ -38,15 +38,18 @@
       filename_(Options.get("Filename", "")),
       file_type_(Options.get("FileType", header_exportable_declarations::FileType::Unknown)),
       extra_header_(Options.get("ExtraHeader", "")) {
-  if (filename_.empty())
-    llvm::errs() << "No filename is provided.\n";
-
   switch (file_type_) {
   case header_exportable_declarations::FileType::Header:
-    /* DO NOTHING */
+    if (filename_.empty())
+      llvm::errs() << "No filename is provided.\n";
+    if (extra_header_.empty())
+      extra_header_ = "$^"; // Use a never matching regex to silence an error message.
     break;
-  case header_exportable_declarations::FileType::Module:
   case header_exportable_declarations::FileType::ModulePartition:
+    if (filename_.empty())
+      llvm::errs() << "No filename is provided.\n";
+    [[fallthrough]];
+  case header_exportable_declarations::FileType::Module:
     if (!extra_header_.empty())
       llvm::errs() << "Extra headers are not allowed for modules.\n";
     if (Options.get("SkipDeclarations"))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157741.551169.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230817/190e492a/attachment.bin>


More information about the libcxx-commits mailing list