[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)
Bill Wendling via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 13:34:50 PST 2024
================
@@ -14690,6 +14690,14 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
}
}
+ // The result of __builtin_counted_by_ref cannot be assigned to a variable.
+ // It allows leaking and modification of bounds safety information.
+ if (const auto *CE = dyn_cast_if_present<CallExpr>(VD->getInit());
+ CE && CE->getBuiltinCallee() == Builtin::BI__builtin_counted_by_ref)
----------------
bwendling wrote:
Done.
https://github.com/llvm/llvm-project/pull/116719
More information about the cfe-commits
mailing list