Repository navigation
[cpyrt] Stop the using-directive search at a cycle - #169
Open
conrade-ctc wants to merge 1 commit into
Open
conrade-ctc wants to merge 1 commit into
conrade-ctc wants to merge 1 commit into
Conversation
Mutual using-directives are valid C++ ([namespace.qual]/3). The attribute lookup recursed through them until the stack overflowed. Search each namespace at most once for each lookup. Co-developed-with-the-help-of: Claude Code (Opus 5.5, human in the loop)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mutual using-directives are valid C++: [namespace.qual]/3 (Example 3) searches each namespace at most once. Clang and GCC accept this code:
In cppjit, the lookup of a name that neither namespace has (
cppjit.gbl.a.nothere) recursed betweenaandpuntil the stack overflowed. The attribute lookup now searches each namespace at most once per lookup.test32_using_directive_cyclecovers names found through the cycle and a missing name.🤖 Done with the help of Claude Code (Opus 5.5, human in the loop)