https://bugs.llvm.org/show_bug.cgi?id=51756
Bug ID: 51756
Summary: ExprMutAnalyzer considers all NoOp-casts for Arguments
as 'adding const' and not treating them as mutation
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Tooling
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
During testing of https://reviews.llvm.org/D54943 a new false positive in the
'ExprMutAnalyzer' was spotted.
Reproducer: https://godbolt.org/z/8EvsM3Eqe
Variables that are passed as arguments to a function are not considered to be
mutated, if there is an implicit cast, that is 'NoOp' (in the assumption that
this is a cast to 'const <ARGTYPE>').
Applying the '__unaligned' attribute introduces such a cast.
This results in the false analysis that this variable is not modified, where in
fact it is.
'ExprMutAnalyzer.cpp, Line 295'
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs