[clang] [clang-repl] Extend the C support. (PR #89804)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri May 17 06:51:10 PDT 2024
================
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) {
// Remove this name from our lexical scope, and warn on it if we haven't
// already.
- IdResolver.RemoveDecl(D);
+ if (!PP.isIncrementalProcessingEnabled())
+ IdResolver.RemoveDecl(D);
----------------
AaronBallman wrote:
so in incremental processing mode, we never remove declarations from the id resolver, so they always stay available? e.g.,
```
{
int i = 12;
}
printf("%d", i); // Fine?
```
https://github.com/llvm/llvm-project/pull/89804
More information about the cfe-commits
mailing list