This fixes a bug where namespace scopes were being searched before template parameter scopes.
Delay searching namespace/file scopes in Sema::CppLookupName until all local scopes are searched.
Paths
| Differential D147283
[Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup Needs ReviewPublic Authored by ahatanak on Mar 30 2023, 3:57 PM.
Details
Summary This fixes a bug where namespace scopes were being searched before template parameter scopes. Delay searching namespace/file scopes in Sema::CppLookupName until all local scopes are searched.
Diff Detail
Event TimelineComment Actions
Revision Contents
Diff 542165 clang/lib/Sema/SemaLookup.cpp
clang/test/SemaCXX/namespace.cpp
|
This isn't needed as InnermostFileScope is set at the beginning of the loop.