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

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 16:32:00 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")));
----------------
MaskRay wrote:

Created #88593   

But I don't think a TODO applies. Clang's behavior is probably desired. So this just records a difference.

This difference probably doesn't make a difference because people rarely use `alias` for C++ code.

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


More information about the cfe-commits mailing list