aaron.ballman added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:16695
+  TheCall->setArg(1, B.get());
+  TheCall->setType(TyB);
+  return false;
----------------
I think you want to set this to `Res`, because that's the common type between 
`TyB` and `TyA`, right? That will also ensure that qualifiers are stripped, I 
believe. e.g.,
```
const int a = 2;
int b = 1;
static_assert(!std::is_const_v<decltype(__builtin_elementwise_max(a, b))>);
static_assert(!std::is_const_v<decltype(__builtin_elementwise_max(b, a))>);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111985/new/

https://reviews.llvm.org/D111985

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to