diff options
author | Shilei Tian <i@tianshilei.me> | 2022-10-05 08:43:53 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2022-10-05 08:44:56 -0400 |
commit | 0c623ab1bf2eec76d94b79c147983b24d89944be (patch) | |
tree | 4cc1536920b66ddee81093c9d67843f456cb5e11 /clang/unittests/Basic/SourceManagerTest.cpp | |
parent | d1d7d2235ced0a959bf0d2513f8adc50c0e5efd8 (diff) | |
download | llvm-0c623ab1bf2eec76d94b79c147983b24d89944be.zip llvm-0c623ab1bf2eec76d94b79c147983b24d89944be.tar.gz llvm-0c623ab1bf2eec76d94b79c147983b24d89944be.tar.bz2 |
[Clang][OpenMP] Only check value if the expression is not instantiation dependent
Currently the following case fails:
```
template<typename Ty>
Ty foo(Ty *addr, Ty val) {
Ty v;
#pragma omp atomic compare capture
{
v = *addr;
if (*addr > val)
*addr = val;
}
return v;
}
```
The compiler complains `addr` is not a lvalue. That's because when an expression
is instantiation dependent, we cannot tell if it is lvalue or not.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D135224
Diffstat (limited to 'clang/unittests/Basic/SourceManagerTest.cpp')
0 files changed, 0 insertions, 0 deletions