File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14692,11 +14692,10 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
1469214692
1469314693 // The result of __builtin_counted_by_ref cannot be assigned to a variable.
1469414694 // It allows leaking and modification of bounds safety information.
14695- if (const auto *CE = dyn_cast_if_present<CallExpr>(VD->getInit());
14696- CE && CE->getBuiltinCallee() == Builtin::BI__builtin_counted_by_ref)
14697- Diag(CE->getExprLoc(),
14695+ if (IsBuiltinCountedByRef(VD->getInit()))
14696+ Diag(VD->getInit()->getExprLoc(),
1469814697 diag::err_builtin_counted_by_ref_cannot_leak_reference)
14699- << CE ->getSourceRange();
14698+ << VD->getInit() ->getSourceRange();
1470014699
1470114700 checkAttributesAfterMerging(*this, *VD);
1470214701
You can’t perform that action at this time.
0 commit comments