Skip to content

ExprMutAnalyzer considers all NoOp-casts for Arguments as 'adding const' and not treating them as mutation #51098

@JonasToth

Description

@JonasToth
Bugzilla Link 51756
Version unspecified
OS All

Extended Description

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 ').
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'

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillaclang:toolingLibToolingconfirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions