nemanjai requested changes to this revision.
nemanjai added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:7329
+ // and false if it is not valid.
+ auto IsValidType = [ArgType, ExpectedType]() {
+ if (ExpectedType->isVoidPointerType() && !ArgType->isPointerType())
----------------
I am not in favour of the "single use lambda" idiom. We don't really need a
lambda here. Also, this will handle `restrict`, but it won't handle
`const/volatile` which also shouldn't be a problem for the loads.
I think we should do the following:
- Change the signatures in the .def file to specify all allowed
`const/volatile/restrict` qualifiers
- Add the qualifiers in `DecodePPCMMATypeFromStr()`
- Ensure that the expected and arg types match with `hasSameUnqualifiedType()`
- Ensure that the actual type is not more qualified than the expected type (for
example, if the expected type doesn't have `const/restrict/volatile` and the
actual type does, we have a type mismatch).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106550/new/
https://reviews.llvm.org/D106550
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits