[Clang] [NFC] Add single quotes around __builtin_bit_cast (#116120)

Fixes #116118
This commit is contained in:
Oleksandr T. 2024-11-19 11:16:47 +02:00 committed by GitHub
parent 0775088234
commit 6aa80f0057
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -12366,7 +12366,7 @@ def err_preserve_enum_value_not_const: Error<
"__builtin_preserve_enum_value argument %0 not a constant">;
def err_bit_cast_non_trivially_copyable : Error<
"__builtin_bit_cast %select{source|destination}0 type must be trivially copyable">;
"'__builtin_bit_cast' %select{source|destination}0 type must be trivially copyable">;
def err_bit_cast_type_size_mismatch : Error<
"size of '__builtin_bit_cast' source type %0 does not match destination type %1 (%2 vs %3 bytes)">;

View File

@ -32,10 +32,10 @@ struct not_trivially_copyable {
virtual void foo() {}
};
// expected-error@+1{{__builtin_bit_cast source type must be trivially copyable}}
// expected-error@+1{{'__builtin_bit_cast' source type must be trivially copyable}}
constexpr unsigned long ul = __builtin_bit_cast(unsigned long, not_trivially_copyable{});
// expected-error@+1 {{__builtin_bit_cast destination type must be trivially copyable}}
// expected-error@+1 {{'__builtin_bit_cast' destination type must be trivially copyable}}
constexpr long us = __builtin_bit_cast(unsigned long &, 0L);
namespace PR42936 {