[flang-commits] [clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

via flang-commits flang-commits at lists.llvm.org
Thu Nov 23 09:03:41 PST 2023


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 e5cc3da6a9077548f613eee3aacc5e7b017c81f3 3b0090997023b1b6392bc23d386ace7c7cb796ce -- flang/test/Driver/Inputs/main_dupes.c clang/lib/Driver/ToolChains/CommonArgs.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/test/Driver/Inputs/main_dupes.c b/flang/test/Driver/Inputs/main_dupes.c
index baae10f94e..dd318c0816 100644
--- a/flang/test/Driver/Inputs/main_dupes.c
+++ b/flang/test/Driver/Inputs/main_dupes.c
@@ -1,8 +1,8 @@
 #include <stdio.h>
 
-int main(int argc, char * argv[]) {
-    // Irrelevant what to do in here.
-    // Test is supposed to fail at link time.
-    printf("Hello from C [%s]\n", __FUNCTION__);
-    return 0;
+int main(int argc, char *argv[]) {
+  // Irrelevant what to do in here.
+  // Test is supposed to fail at link time.
+  printf("Hello from C [%s]\n", __FUNCTION__);
+  return 0;
 }

``````````

</details>


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


More information about the flang-commits mailing list