[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 09:43:29 PST 2025
================
@@ -13559,6 +13562,27 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS,
QualType LHSType = LHSExpr->getType();
QualType RHSType = CompoundType.isNull() ? RHS.get()->getType() :
CompoundType;
+
+ if (RHS.isUsable()) {
+ // Even if this check fails don't return early to allow the best
+ // possible error recovery and to allow any subsequent diagnostics to
+ // work.
+ (void)BoundsSafetyCheckAssignmentToCountAttrPtr(
----------------
AaronBallman wrote:
Instead of removing the `void` cast, should the return type from that function be changed to `void` given that the only call to it ignores the value?
https://github.com/llvm/llvm-project/pull/106321
More information about the cfe-commits
mailing list