Skip to content

[C++20] [Modules] Identify the tag redecl through Using - #221147

Open
ChuanqiXu9 wants to merge 1 commit into
llvm:mainfrom
ChuanqiXu9:RedeclTagThroughUsingDecl
Open

[C++20] [Modules] Identify the tag redecl through Using#221147
ChuanqiXu9 wants to merge 1 commit into
llvm:mainfrom
ChuanqiXu9:RedeclTagThroughUsingDecl

Conversation

@ChuanqiXu9

Copy link
Copy Markdown
Member

Close #96423

We've already have some logics to merge the redecls. But if the previous decls are found through using decl, we can't merge them right now. As the reproducer shows. The using decl is common in modules as a common method to wrap headers into a module.

The fix is simple too. If the existing check fails, we'll check if the found one is a using decl, if yes, we will reuse the existing check with the target decl for using decl.

Close llvm#96423

We've already have some logics to merge the redecls. But if the
previous decls are found through using decl, we can't merge them
right now. As the reproducer shows. The using decl is common in
modules as a common method to wrap headers into a module.

The fix is simple too. If the existing check fails, we'll check
if the found one is a using decl, if yes, we will reuse the existing
check with the target decl for using decl.
@ChuanqiXu9 ChuanqiXu9 self-assigned this Sep 4, 2026
@ChuanqiXu9 ChuanqiXu9 added clang:modules C++20 modules and Clang Header Modules skip-precommit-approval PR for CI feedback, not intended for review labels Sep 4, 2026
@llvmorg-github-actions llvmorg-github-actions Bot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

using namespace std before include causes ambiguous reference error

1 participant