[all-commits] [llvm/llvm-project] 91f251: [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-b...

Daniil Kovalev via All-commits all-commits at lists.llvm.org
Mon Apr 29 07:57:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91f251c31fbbc9b9d8ce69fce4fb50faa0179ef4
      https://github.com/llvm/llvm-project/commit/91f251c31fbbc9b9d8ce69fce4fb50faa0179ef4
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M clang/include/clang/AST/Type.h

  Log Message:
  -----------
  [clang] Fix `remove{CVR|Fast}Qualifiers` with 64-bit `Qualifiers::Mask` (#90329)

After #84384, `Qualifiers::Mask` becomes 64-bit. So, operations like
`Mask &= ~U32` where `U32` is `unsigned` produce undesirable results
since higher 32 bits of `Mask` become zeroed while they should be
preserved. Fix that by explicitly casting `unsigned` values to
`uint64_t` in such operations. Signatures of fixed functions are
intentionally left intact instead of changing the argument itself to
`uint64_t` to keep things consistent with other functions working with
the same qualifiers and to emphasize that 64-bit masks should not be
used for these types of qualifiers.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list