[clang] [clang] Add missing readonly/readnone annotations (PR #158424)
Mikael Holmen via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 7 01:57:31 PDT 2025
================
@@ -3011,6 +3016,27 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
}
assert(ArgNo == FI.arg_size());
+ ArgNo = 0;
+ if (AddedPotentialArgAccess && MemAttrForPtrArgs) {
+ llvm::FunctionType *FunctionType = FunctionType =
----------------
mikaelholmen wrote:
Hi @qchateau
gcc warns on the extra ```FunctionType =``` here that I suppose should be removed:
```
../llvm-project/clang/lib/CodeGen/CGCall.cpp:3021:53: warning: operation on 'FunctionType' may be undefined [-Wsequence-point]
3021 | llvm::FunctionType *FunctionType = FunctionType =
| ~~~~~~~~~~~~~^
3022 | getTypes().GetFunctionType(FI);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
https://github.com/llvm/llvm-project/pull/158424
More information about the cfe-commits
mailing list