-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a backup plan if we fail to delay the handling of declarations. #877
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #877 +/- ##
==========================================
- Coverage 94.82% 94.77% -0.05%
==========================================
Files 52 52
Lines 7703 7714 +11
==========================================
+ Hits 7304 7311 +7
- Misses 399 403 +4
|
clang-tidy review says "All clean, LGTM! 👍" |
13f0e86
to
c529893
Compare
clang-tidy review says "All clean, LGTM! 👍" |
I am not sure if we can test this patch - it will need to have either cling or some sort of cling-like infrastructure which is probably not worth maintaining in a long run. |
// We could not delay the process due to some strange way of | ||
// initialization, inform the consumers now. | ||
if (!m_Multiplexer) | ||
m_CI.getASTConsumer().HandleTopLevelDecl(DCI.m_DGR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are not delaying the call, do we still want to add it to AppendDelayed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d think so. That’d give us some uniform debugging capabilities for both cases….
This patch enhances the work done in #766 where we assumed the clients are going to be well-behaved such as clang or clang-repl. However, we can have clients which connect the clang components in a non-standard way and we should provide a reasonable fallback. This patch detects if the setup is non-standard and teaches clad to handle requests as they come, pretty much the same way as before #766 was implemented. Of course this comes with a cost when we try to differentiate declarations that are defined later in the translation unit. We expect such setups to be rare and mostly in the cases of incremental processing and old repls such as Cling.
c529893
to
ebe60e0
Compare
clang-tidy review says "All clean, LGTM! 👍" |
This patch enhances the work done in #766 where we assumed the clients are going to be well-behaved such as clang or clang-repl. However, we can have clients which connect the clang components in a non-standard way and we should provide a reasonable fallback.
This patch detects if the setup is non-standard and teaches clad to handle requests as they come, pretty much the same way as before #766 was implemented. Of course this comes with a cost when we try to differentiate declarations that are defined later in the translation unit. We expect such setups to be rare and mostly in the cases of incremental processing and old repls such as Cling.
Depends on #876.