Add required cling transactions when performing named lookups#853
Open
aaronj0 wants to merge 2 commits intocompiler-research:mainfrom
Open
Add required cling transactions when performing named lookups#853aaronj0 wants to merge 2 commits intocompiler-research:mainfrom
aaronj0 wants to merge 2 commits intocompiler-research:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #853 +/- ##
==========================================
+ Coverage 79.75% 79.78% +0.03%
==========================================
Files 11 11
Lines 4031 4037 +6
==========================================
+ Hits 3215 3221 +6
Misses 816 816
🚀 New features to boost your workflow:
|
Vipul-Cariappa
approved these changes
Mar 20, 2026
Collaborator
Vipul-Cariappa
left a comment
There was a problem hiding this comment.
Looks good to me. Provided all the tests pass without any regression (the cppyy tests are failing right now...).
vgvassilev
reviewed
Mar 21, 2026
| inline void Named(clang::Sema* S, clang::LookupResult& R, | ||
| const clang::DeclContext* Within = nullptr) { | ||
| if (Within) | ||
| Within->getPrimaryContext()->buildLookup(); |
Contributor
There was a problem hiding this comment.
warning: 'this' argument to member function 'buildLookup' has type 'const DeclContext', but function is not marked const [clang-diagnostic-error]
Within->getPrimaryContext()->buildLookup();
^Additional context
llvm/include/clang/AST/DeclBase.h:2679: 'buildLookup' declared here
StoredDeclsMap *buildLookup();
^acbee94 to
d00028f
Compare
In GetBaseClassOffset, GetVariableOffset, GetFunctionsUsingName, ExistsFunctionTemplate, GetClassTemplatedMethods, LookupDatamember also fold usages of `DeclContext::buildLookup` into `utils::Lookup::Named` to avoid repetition
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
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.
From the ROOT migration
Also folds usages of
DeclContext::buildLookupintoutils::Lookup::Namedto avoid repetition