[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 26 01:58:48 PST 2025
================
@@ -178,8 +178,8 @@ void IncrementalParser::CleanUpPTU(TranslationUnitDecl *MostRecentTU) {
if (!ND)
continue;
// Check if we need to clean up the IdResolver chain.
- if (ND->getDeclName().getFETokenInfo() && !D->getLangOpts().ObjC &&
- !D->getLangOpts().CPlusPlus)
+ if (!ND->getDeclName().isEmpty() && ND->getDeclName().getFETokenInfo() &&
----------------
vgvassilev wrote:
The `ND->getDeclName().isEmpty() ` needs to go in the `continue` clause.
https://github.com/llvm/llvm-project/pull/127467
More information about the cfe-commits
mailing list