Commit 100582e
authored
Pass std::initializer_list by value to ArrayRef constructor. (llvm#113590)
The std::initializer_list is a lightweight object, it is passed by value
in general.
This would also avoid a false positive when adding the lifetimebound
annotation (llvm#113547)
```
ArrayRef<int> foo(std::initializer_list<int> list) {
return ArrayRef<int>(list);
}
```1 parent e2e7d56 commit 100582e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments