[clang] [clang][ssaf] Integrate source-edit-generation (PR #208590)

Jan Korous via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 10:45:56 PDT 2026


================
@@ -214,6 +215,12 @@ CreateFrontendAction(CompilerInstance &CI) {
     Act = std::make_unique<ssaf::TUSummaryExtractorFrontendAction>(
         std::move(Act));
   }
+  if (!CI.getSSAFOpts().SourceTransformation.empty() ||
+      !CI.getSSAFOpts().SrcEditFile.empty() ||
+      !CI.getSSAFOpts().TransformationReportFile.empty()) {
+    Act = std::make_unique<ssaf::SourceTransformationFrontendAction>(
----------------
jkorous-apple wrote:

The reason for checking non-emptiness of the other options ones is that we want to diagnose missing `--ssaf-source-transformation` option.

I looked into moving these diagnostics to `ParseSSAFArgs` in `CompilerInvocation.cpp` but that doesn't work because we need the diagnostics to not abort the compilation. Apparently the diagnostics system is not fully bootstrapped when we interact with it in `ParseSSAFArgs` so the only kind of diagnostics we can produce at that point are errors. The `-Wno-...` suppression mechanism also isn't enabled at that point.

https://github.com/llvm/llvm-project/pull/208590


More information about the cfe-commits mailing list