ArnaudBienner added a comment.
Giving this a second thought, I feel like the initial check:
if (!ArgExpr->getType()->isAnyPointerType() ||
!ArgExpr->getType()->getPointeeType()->isAnyCharacterType())
is better than the new one. To me it reads like "expr type is a pointer and it
points to character type" which is more understandable IMHO.
If you're worried about the expression being a bit long, I could move type to a
temp variable:
if (const QualType type = ArgExpr->getType();
!type->isAnyPointerType() ||
!type->getPointeeType()->isAnyCharacterType())
Though I'm not sure this is really more readable.
What do you think?
Any other suggestion/comment about this patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150430/new/
https://reviews.llvm.org/D150430
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits