Skip to content

Commit 6aa80f0

Browse files
authored
[Clang] [NFC] Add single quotes around __builtin_bit_cast (llvm#116120)
Fixes llvm#116118
1 parent 0775088 commit 6aa80f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -12366,7 +12366,7 @@ def err_preserve_enum_value_not_const: Error<
1236612366
"__builtin_preserve_enum_value argument %0 not a constant">;
1236712367

1236812368
def err_bit_cast_non_trivially_copyable : Error<
12369-
"__builtin_bit_cast %select{source|destination}0 type must be trivially copyable">;
12369+
"'__builtin_bit_cast' %select{source|destination}0 type must be trivially copyable">;
1237012370
def err_bit_cast_type_size_mismatch : Error<
1237112371
"size of '__builtin_bit_cast' source type %0 does not match destination type %1 (%2 vs %3 bytes)">;
1237212372

clang/test/SemaCXX/builtin-bit-cast.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ struct not_trivially_copyable {
3232
virtual void foo() {}
3333
};
3434

35-
// expected-error@+1{{__builtin_bit_cast source type must be trivially copyable}}
35+
// expected-error@+1{{'__builtin_bit_cast' source type must be trivially copyable}}
3636
constexpr unsigned long ul = __builtin_bit_cast(unsigned long, not_trivially_copyable{});
3737

38-
// expected-error@+1 {{__builtin_bit_cast destination type must be trivially copyable}}
38+
// expected-error@+1 {{'__builtin_bit_cast' destination type must be trivially copyable}}
3939
constexpr long us = __builtin_bit_cast(unsigned long &, 0L);
4040

4141
namespace PR42936 {

0 commit comments

Comments
 (0)