[clang] [clang][bytecode] Avoid a macro redefinition (PR #188052)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 08:28:34 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

Fixes:

```
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/lib/AST/ByteCode/Interp.cpp:46:9: error: 'MUSTTAIL' macro redefined [-Werror,-Wmacro-redefined]
   46 | #define MUSTTAIL
      |         ^
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/lib/AST/ByteCode/Interp.cpp:32:9: note: previous definition is here
   32 | #define MUSTTAIL [[clang::musttail]]
      |         ^
1 error generated.
```

---
Full diff: https://github.com/llvm/llvm-project/pull/188052.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Interp.cpp (+1) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index e2c9b01f4c7ea..ecaf979e4b33e 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -43,6 +43,7 @@ using namespace clang::interp;
 // aarch64 seems to have problems too, at least with sanitizers enabled.
 #if defined(_MSC_VER) || defined(_ARCH_PPC) || defined(__aarch64__) ||         \
     !defined(MUSTTAIL)
+#undef MUSTTAIL
 #define MUSTTAIL
 #define USE_TAILCALLS 0
 #else

``````````

</details>


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


More information about the cfe-commits mailing list