https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/246865

This patch adds an IWYU export pragma for NestedNameSpecifierBase.h in
NestedNameSpecifier.h.  Without this patch, clang-include-cleaner
treats transitive includes of NestedNameSpecifierBase.h as sufficient
for NestedNameSpecifier uses and flags NestedNameSpecifier.h as unused.

Note that #159154 already added the same pragma to Type.h for
TypeBase.h.

Assisted-by: Antigravity


>From bdaccfdaa8252b50842799c39de80b258e172e25 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <[email protected]>
Date: Sat, 28 Nov 2026 08:54:23 -0800
Subject: [PATCH] [clang] Add IWYU export pragma to NestedNameSpecifier.h (NFC)

This patch adds an IWYU export pragma for NestedNameSpecifierBase.h in
NestedNameSpecifier.h.  Without this patch, clang-include-cleaner
treats transitive includes of NestedNameSpecifierBase.h as sufficient
for NestedNameSpecifier uses and flags NestedNameSpecifier.h as unused.

Note that #159154 already added the same pragma to Type.h for
TypeBase.h.

Assisted-by: Antigravity
---
 clang/include/clang/AST/NestedNameSpecifier.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/include/clang/AST/NestedNameSpecifier.h 
b/clang/include/clang/AST/NestedNameSpecifier.h
index f13351f0d5d3e2..760a3f26f435ed 100644
--- a/clang/include/clang/AST/NestedNameSpecifier.h
+++ b/clang/include/clang/AST/NestedNameSpecifier.h
@@ -14,7 +14,7 @@
 #define LLVM_CLANG_AST_NESTEDNAMESPECIFIER_H
 
 #include "clang/AST/Decl.h"
-#include "clang/AST/NestedNameSpecifierBase.h"
+#include "clang/AST/NestedNameSpecifierBase.h" // IWYU pragma: export
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeLoc.h"
 #include "llvm/ADT/DenseMapInfo.h"

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to