[clang] [clang][ssaf] Integrate source-edit-generation (PR #208590)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 16 16:59:54 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/include/clang/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.h clang/lib/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.cpp clang/test/Analysis/Scalable/source-edit-generation/Plugins/TestTransformationPlugin/TestTransformation.cpp clang/test/Analysis/Scalable/source-edit-generation/cli-errors.cpp clang/test/Analysis/Scalable/source-edit-generation/coexistence.cpp clang/test/Analysis/Scalable/source-edit-generation/downgradable-errors.cpp clang/test/Analysis/Scalable/source-edit-generation/happy-path.cpp clang/test/Analysis/Scalable/source-edit-generation/write-failure.cpp clang/include/clang/Basic/DiagnosticIDs.h clang/include/clang/Frontend/SSAFOptions.h clang/lib/Driver/ToolChains/Clang.cpp clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp clang/test/Analysis/Scalable/help.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 379309fb0..9638b5fd8 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -218,8 +218,8 @@ CreateFrontendAction(CompilerInstance &CI) {
// Enter the source-transformation action when the transformation option is
// set, and also when only an output option (--ssaf-src-edit-file= /
// --ssaf-transformation-report-file=) is set — the action's
- // reportOrphanOptionMisuse then diagnoses that as a reverse orphan rather than
- // silently ignoring the option.
+ // reportOrphanOptionMisuse then diagnoses that as a reverse orphan rather
+ // than silently ignoring the option.
if (!CI.getSSAFOpts().SourceTransformation.empty() ||
!CI.getSSAFOpts().SrcEditFile.empty() ||
!CI.getSSAFOpts().TransformationReportFile.empty()) {
diff --git a/clang/lib/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.cpp b/clang/lib/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.cpp
index 5f2201394..b7886af72 100644
--- a/clang/lib/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.cpp
+++ b/clang/lib/ScalableStaticAnalysis/Frontend/SourceTransformationFrontendAction.cpp
@@ -90,7 +90,8 @@ static std::optional<StringRef> bareExtension(StringRef Path) {
}
/// Companion options required by `--ssaf-source-transformation=`. Values must
-/// match the `%select` branch order in `warn_ssaf_source_transformation_requires`.
+/// match the `%select` branch order in
+/// `warn_ssaf_source_transformation_requires`.
enum SourceTransformationCompanion {
STCompanion_WPAFile, // --ssaf-global-scope-analysis-result=
STCompanion_EditFile, // --ssaf-src-edit-file=
@@ -98,8 +99,8 @@ enum SourceTransformationCompanion {
STCompanion_CompilationUnitId, // --ssaf-compilation-unit-id=
};
-/// Options that depend on `--ssaf-source-transformation=` being set. Values must
-/// match the `%select` branch order in
+/// Options that depend on `--ssaf-source-transformation=` being set. Values
+/// must match the `%select` branch order in
/// `warn_ssaf_option_ignored_without_source_transformation`.
enum SourceTransformationDependent {
STDependent_EditFile, // --ssaf-src-edit-file=
``````````
</details>
https://github.com/llvm/llvm-project/pull/208590
More information about the cfe-commits
mailing list