[clang] [clang][bytecode] Reapply "Use tailcalls via `[[clang::musttail]]`" (PR #188419)
Lukas Sommer via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 06:15:01 PDT 2026
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/188419 at github.com>
sommerlukas wrote:
> Yeah, that should be `__has_feature`.
Yes, that works:
```diff
diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index 3578ef9da820..41a9cf371947 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -38,7 +38,9 @@
// preserve_none is supported on aarch64, but causes problems when asan is
// enabled. See https://github.com/llvm/llvm-project/issues/177519.
+// preserve_none also causes problems on clang <= 19 if asan is enabled.
#if !defined(__aarch64__) && !defined(__i386__) && \
+ !(defined(__clang_major__) && __clang_major__ <= 19 && __has_feature(address_sanitizer)) && \
__has_cpp_attribute(clang::preserve_none)
#define PRESERVE_NONE [[clang::preserve_none]]
#else
```
https://github.com/llvm/llvm-project/pull/188419
More information about the cfe-commits
mailing list