[all-commits] [llvm/llvm-project] 2cd778: [clangd] Replay macro definitions from preamble fo...
Qixi via All-commits
all-commits at lists.llvm.org
Wed Jun 17 01:00:33 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2cd778c2064c98980215f4a93c3036b7fe3722a3
https://github.com/llvm/llvm-project/commit/2cd778c2064c98980215f4a93c3036b7fe3722a3
Author: Qixi <tjx2361869673 at gmail.com>
Date: 2026-06-17 (Wed, 17 Jun 2026)
Changed paths:
M clang-tools-extra/clangd/ParsedAST.cpp
M clang-tools-extra/clangd/unittests/ReplayPeambleTests.cpp
Log Message:
-----------
[clangd] Replay macro definitions from preamble for clang-tidy checks (#202495)
Clang-tidy checkers observe preprocessor events via PPCallbacks. When
using a preamble, macro definitions in the preamble region of the main
file are not replayed during the main-file build, causing checkers like
bugprone-reserved-identifier to miss them.
This patch extends ReplayPreamble::replay() to also replay MacroDefined
events for macros defined directly in the preamble region of the open
file, similar to how InclusionDirective events are already replayed.
Fixes: https://github.com/clangd/clangd/issues/2501
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list