[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type
Sergei Barannikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 30 01:15:15 PDT 2023
barannikov88 added inline comments.
================
Comment at: clang/lib/Sema/SemaChecking.cpp:7986
+
+ if (!firstArgType->isAnyPointerType()) {
+ QualType expectedType = Context.getPointerType(firstArgType);
----------------
barannikov88 wrote:
> Instead of directly checking for the pointer type, it is better to call `checkBuiltinArgument`, which will handle many corner cases.
> See the uses of this function in this file.
>
It looks like this whole block can be replaced by a single function call.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149514/new/
https://reviews.llvm.org/D149514
More information about the cfe-commits
mailing list