[all-commits] [llvm/llvm-project] f0311f: [ADT] Remove a constructor (NFC) (#146010)
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Fri Jun 27 07:39:54 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0311f447a2351248d6dfe8b14fb4af5080659e0
https://github.com/llvm/llvm-project/commit/f0311f447a2351248d6dfe8b14fb4af5080659e0
Author: Kazu Hirata <kazu at google.com>
Date: 2025-06-27 (Fri, 27 Jun 2025)
Changed paths:
M clang/include/clang/Basic/Module.h
M llvm/include/llvm/ADT/ArrayRef.h
Log Message:
-----------
[ADT] Remove a constructor (NFC) (#146010)
ArrayRef now has a new constructor that takes a parameter whose type
has data() and size() methods. Since the new constructor subsumes
another constructor that takes std::array, this patch removes that
constructor. Note that std::array also comes with data() and size()
methods.
The only problem is that ASTFileSignature in the clang frontend does
not work with the new ArrayRef constructor because it overrides size,
blocking access to std::array<uint8_t, 20>::size(). This patch adds
an implicit cast operator to ArrayRef. Note that ASTFileSignature is
defined as:
struct ASTFileSignature : std::array<uint8_t, 20> {
using BaseT = std::array<uint8_t, 20>;
static constexpr size_t size = std::tuple_size<BaseT>::value;
:
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