[all-commits] [llvm/llvm-project] 81739c: [Modules] Fix an identifier hiding a function-like...
Volodymyr Sapsai via All-commits
all-commits at lists.llvm.org
Wed Apr 16 10:14:27 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 81739c39db11b7f9a4f3528c1c66b552e57b47e4
https://github.com/llvm/llvm-project/commit/81739c39db11b7f9a4f3528c1c66b552e57b47e4
Author: Volodymyr Sapsai <vsapsai at apple.com>
Date: 2025-04-16 (Wed, 16 Apr 2025)
Changed paths:
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTReaderInternals.h
M clang/lib/Serialization/ASTWriter.cpp
A clang/test/Modules/macro-identifier-hiding.c
Log Message:
-----------
[Modules] Fix an identifier hiding a function-like macro definition. (#135471)
We emit a macro definition only in a module defining it. But it means
that if another module has an identifier with the same name as the
macro, the users of such module won't be able to use the macro anymore.
Fix by storing that an identifier has a macro definition that's not in a
current module (`MacroDirectivesOffset == 0`). This way
`IdentifierLookupVisitor` knows not to stop at the first module with an
identifier but to keep checking included modules for the actual macro
definition.
Fixes issue #32040.
rdar://30258278
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