[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 4 10:56:13 PDT 2024
================
@@ -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(
----------------
erichkeane wrote:
Why the void cast here?
https://github.com/llvm/llvm-project/pull/106321
More information about the cfe-commits
mailing list