[clang] fixup! [clang][analyzer] Forward CTU-import failure conditions (PR #190145)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 03:20:49 PDT 2026
https://github.com/necto created https://github.com/llvm/llvm-project/pull/190145
Fix the Sphinx build failure introduced in #189064 by using a dedicated group for CTU remarks.
>From dd8872a0c058775cc3198b6afbae46aac21225cd Mon Sep 17 00:00:00 2001
From: Arseniy Zaostrovnykh <necto.ne at gmail.com>
Date: Thu, 2 Apr 2026 11:59:23 +0200
Subject: [PATCH] fixup! [clang][analyzer] Forward CTU-import failure
conditions
---
clang/include/clang/Basic/DiagnosticCrossTUKinds.td | 2 +-
clang/include/clang/Basic/DiagnosticGroups.td | 1 +
clang/test/Analysis/ctu/diag/load-threshold.cpp | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/clang/include/clang/Basic/DiagnosticCrossTUKinds.td b/clang/include/clang/Basic/DiagnosticCrossTUKinds.td
index 7785751651dfb..13498a7f16ac8 100644
--- a/clang/include/clang/Basic/DiagnosticCrossTUKinds.td
+++ b/clang/include/clang/Basic/DiagnosticCrossTUKinds.td
@@ -41,7 +41,7 @@ def err_ctu_import_failure: Error<
def remark_ctu_import_threshold_reached: Remark<
"reached a the CTU-import threshold before trying to import definition">,
- InGroup<CrossTU>;
+ InGroup<CrossTURemarks>;
def warn_ctu_incompat_lang : Warning<
"imported AST from '%0' had been generated for a different language, "
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 6e82203d858f5..dc7280c66ea79 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -1800,6 +1800,7 @@ def BoundsSafetyCountedByEltTyUnknownSize :
// A group for cross translation unit static analysis related warnings.
def CrossTU : DiagGroup<"ctu">;
+def CrossTURemarks : DiagGroup<"ctu-remarks">;
def CTADMaybeUnsupported : DiagGroup<"ctad-maybe-unsupported">;
diff --git a/clang/test/Analysis/ctu/diag/load-threshold.cpp b/clang/test/Analysis/ctu/diag/load-threshold.cpp
index 4353dab60d0cd..222dac6b98b78 100644
--- a/clang/test/Analysis/ctu/diag/load-threshold.cpp
+++ b/clang/test/Analysis/ctu/diag/load-threshold.cpp
@@ -25,7 +25,7 @@
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
// RUN: -analyzer-config ctu-dir=%t \
// RUN: -analyzer-config ctu-import-cpp-threshold=1 \
-// RUN: -Rctu \
+// RUN: -Rctu-remarks \
// RUN: -verify %s
// foo is loaded successfully (first load, within threshold).
More information about the cfe-commits
mailing list