| Issue |
181176
|
| Summary |
MutableArrayRef don't ignores constant pointer
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Devjiu
|
With constructor added in https://github.com/llvm/llvm-project/commit/e8f85cf51fb9583767cd8ec23cc7eaeacbe2be35
Following code:
```cpp
namespace {
void foo(llvm::MutableArrayRef<int64_t> ref) {
ref[0] += 1;
}
}
void bar(const llvm::SmallVector<int64_t>& vec) {
foo(vec);
}
```
can be successfully compiled and executed. So MutableArrayRef ignores if the passed vector ref is constant and modifies it.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs