[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 7 12:16:14 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(
----------------
delcypher wrote:
@AaronBallman The return value isn't always ignored in our fork. See [here](https://github.com/swiftlang/llvm-project/blob/b0bbd7e8a003990aff9ce373bc6b83407630b5f5/clang/lib/Sema/SemaBoundsSafety.cpp#L645)
https://github.com/llvm/llvm-project/pull/106321
More information about the cfe-commits
mailing list