Skip to content

Commit

Permalink
[Clang] [NFC] Add single quotes around __builtin_bit_cast (llvm#116120)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk authored Nov 19, 2024
1 parent 0775088 commit 6aa80f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -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)">;

Expand Down
4 changes: 2 additions & 2 deletions clang/test/SemaCXX/builtin-bit-cast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6aa80f0

Please sign in to comment.