[clang] [clang] Add IWYU export pragma to NestedNameSpecifier.h (NFC) (PR #246865)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 28 09:41:32 PST 2026
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/246865
>From bdaccfdaa8252b50842799c39de80b258e172e25 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 28 Nov 2026 08:54:23 -0800
Subject: [PATCH 1/2] [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"
>From 8ec3249fcc7863f97f599a8c15c734dbbdbcec0a Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 28 Nov 2026 09:41:17 -0800
Subject: [PATCH 2/2] Empty commit
More information about the cfe-commits
mailing list