Commit e168691
committed
[ADT] Remove a constructor (NFC)
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;
:1 parent 96ec1c2 commit e168691
File tree
2 files changed
+5
-5
lines changed- clang/include/clang/Basic
- llvm/include/llvm/ADT
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
| |||
0 commit comments