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 --
clang/lib/Driver/ToolChains/Flang.cpp flang/lib/Frontend/CompilerInvocation.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/Driver/ToolChains/Flang.cpp
b/clang/lib/Driver/ToolChains/Flang.cpp
index bc65d3926..322491505 100644
--- a/clang/lib/Driver/ToolChains/Flang.cpp
+++ b/clang/lib/Driver/ToolChains/Flang.cpp
@@ -38,7 +38,7 @@ void Flang::addFortranDialectOptions(const ArgList &Args,
ArgStringList &CmdArgs) const {
Args.addAllArgs(CmdArgs, {options::OPT_ffixed_form,
options::OPT_ffree_form,
- options::OPT_Mextend,
+ options::OPT_Mextend,
options::OPT_ffixed_line_length_EQ,
options::OPT_fopenacc,
options::OPT_finput_charset_EQ,
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp
b/flang/lib/Frontend/CompilerInvocation.cpp
index 7046e7eb6..f1ebdf000 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -1553,9 +1553,8 @@ replaceClassicFlangArgs(llvm::ArrayRef<const char *>
CommandLineArgs) {
// Process -mextend -> mapping to -ffixed-line-length=132
if (std::strcmp(Arg, "-Mextend") == 0) {
NewArgs.push_back("-ffixed-line-length=132");
- }
- else {
- NewArgs.push_back(Arg);
+ } else {
+ NewArgs.push_back(Arg);
}
}
return NewArgs;
@@ -1565,8 +1564,7 @@ bool CompilerInvocation::createFromArgs(
CompilerInvocation &invoc, llvm::ArrayRef<const char *> commandLineArgs0,
clang::DiagnosticsEngine &diags, const char *argv0) {
- auto NewCommandLineArgs =
- replaceClassicFlangArgs(commandLineArgs0);
+ auto NewCommandLineArgs = replaceClassicFlangArgs(commandLineArgs0);
llvm::ArrayRef<const char *> commandLineArgs = NewCommandLineArgs;
bool success = true;
``````````
</details>
https://github.com/llvm/llvm-project/pull/173833
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits