https://github.com/akash-manna-sky created https://github.com/llvm/llvm-project/pull/246711
Fixes #120083 `BuiltinAtomicOverloaded` found the size-specific builtin it rewrites a `__sync_*` call to by name lookup. A program may declare `static int __sync_lock_test_and_set_4(volatile int *, int);` without redeclaring the builtin, so the lookup returned that function, the call was rewritten to it and CodeGen asserted on the argument types. The declaration now comes from `Sema::getBuiltinFunctionDecl`, which keeps the lookup result only if it is the builtin and otherwise declares the builtin outside any scope. `BuildBuiltinCallExpr` had the same lookup and uses it too. Assisted-by: LLMs. The server is unavailable at this time. Please wait a few minutes before you try again. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
