[all-commits] [llvm/llvm-project] 6a37ce: Fix for a clang-repl crash when passing non-existe...

asudarsa-qti via All-commits all-commits at lists.llvm.org
Fri Sep 25 23:14:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a37cee09997b28c6cc708dd36b283bbd5bd7147
      https://github.com/llvm/llvm-project/commit/6a37cee09997b28c6cc708dd36b283bbd5bd7147
  Author: asudarsa-qti <asudarsa at qti.qualcomm.com>
  Date:   2026-09-26 (Sat, 26 Sep 2026)

  Changed paths:
    M clang/lib/Interpreter/IncrementalAction.cpp
    A clang/test/Interpreter/nonexistent-xcc-file.cpp

  Log Message:
  -----------
  Fix for a clang-repl crash when passing non-existent file to --Xcc (#225861)

Problem: When clang-repl fails to initialize because an --Xcc file does
not exist, Interpreter::create() destroys the partially initialized
Interpreter. Its destructor unconditionally calls FinalizeAction(),
which invokes FrontendAction::EndSourceFile() without a registered
CompilerInstance and triggers an assertion.
Fix: Track whether interpreter initialization completed successfully and
only finalize the frontend action for successfully initialized
interpreters.
Test: Add a regression test covering a nonexistent --Xcc file.

This change resolves https://github.com/llvm/llvm-project/issues/225429

Assisted by gpt-5.6-luna

---------

Co-authored-by: Anutosh Bhat <andersonbhat491 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list