Skip to content

Conversation

@ilya-biryukov
Copy link
Contributor

This helps to get well-formed output if Clang crashes after that point.

This helps to get well-formed output if Clang crashes after that point.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 31, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2025

@llvm/pr-subscribers-clang

Author: Ilya Biryukov (ilya-biryukov)

Changes

This helps to get well-formed output if Clang crashes after that point.


Full diff: https://github.com/llvm/llvm-project/pull/151522.diff

1 Files Affected:

  • (modified) clang/lib/Frontend/FrontendAction.cpp (+2)
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 1d82fc775b28a..cf081830c95bb 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -226,6 +226,8 @@ class DeserializedDeclsSourceRangePrinter : public ASTConsumer,
     }
     *OS << "  ]\n";
     *OS << "}\n";
+
+    OS->flush();
   }
 };
 

Copy link
Contributor

@emaxx-google emaxx-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Contributor

@VitaNuo VitaNuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ilya-biryukov ilya-biryukov merged commit 1c5e619 into llvm:main Aug 1, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants