[clang] [compiler-rt] Reland "[Clang][CodeGen] Report when an alias points to an incompatible target" (PR #195550)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 06:33:09 PDT 2026
================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++17 -emit-llvm-only -verify %s
+// expected-no-diagnostics
+
+// Note: this mimics how interceptor functions are defined in the compiler-rt
+// libraries. Despite a declaration in the system header having an exception
+// specification, redeclaring it in the user code does not produce the "missing
+// exception specification" error. Consequently, there should be no warnings
+// about type mismatches for the alias and its aliasee.
----------------
AaronBallman wrote:
This seems incorrect to me; since C++17 the exception specification is part of the function type and so I would expect a type mismatch diagnostic here. However, the `extern "C"` does muddy the waters a little bit.
CC @zygoloid @vitalybuka @ramosian-glider for additional opinions
https://github.com/llvm/llvm-project/pull/195550
More information about the cfe-commits
mailing list