[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 10:37:30 PDT 2024


================
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+static int f(void) { return 42; }
+int g(void) __attribute__((alias("f")));
----------------
nickdesaulniers wrote:

> Improving GCC consistency is not the goal of this PR. This PR intends to make clangSema and clangCodeGen consistent.

Is there a bug on file wrt to this inconsistency? I would like to link to it from the test, sources, and public docs on the function attribute if we don't fix this inconsistency BEFORE landing this PR.

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


More information about the cfe-commits mailing list