[clang] [clang] Bind the __builtin_bit_cast operand as std::bit_cast binds its parameter (PR #231830)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 18 15:53:17 PDT 2026
================
@@ -47,10 +47,10 @@ void h() {
// CHECK-NEXT: | `-DeclRefExpr {{.+}} 'std::nullptr_t ()' lvalue Function {{.+}} 'g' 'std::nullptr_t ()'
// CHECK-NEXT: `-ImplicitCastExpr {{.+}} 'void *' <NullToPointer>
// CHECK-NEXT: `-BuiltinBitCastExpr {{.+}} 'std::nullptr_t' <LValueToRValueBitCast>
-// CHECK-NEXT: `-MaterializeTemporaryExpr {{.+}} 'void *' xvalue
-// CHECK-NEXT: `-CXXStaticCastExpr {{.+}} 'void *' static_cast<void *> <NoOp>
-// CHECK-NEXT: `-ImplicitCastExpr {{.+}} 'void *' <BitCast> part_of_explicit_cast
-// CHECK-NEXT: `-UnaryOperator {{.+}} 'int *' prefix '&' cannot overflow
-// CHECK-NEXT: `-DeclRefExpr {{.+}} 'int' lvalue Var {{.+}} 'i' 'int'
+// CHECK-NEXT: `-MaterializeTemporaryExpr {{.+}} 'void *const' lvalue
+// CHECK: `-CXXStaticCastExpr {{.+}} 'void *' static_cast<void *> <NoOp>
----------------
Nemi26 wrote:
No: from C++17 on, the binding adds a NoOp cast to `void *const`, which C++11/14 don't have. That node is now checked under a `SINCE-CXX17` prefix, with `-NEXT` throughout.
https://github.com/llvm/llvm-project/pull/231830
More information about the cfe-commits
mailing list