Skip to content

misc-redundant-expression reports results in decltype expression #35857

Closed
@LegalizeAdulthood

Description

@LegalizeAdulthood
Bugzilla Link 36509
Version unspecified
OS All
CC @BatmanAoD,@EugeneZelenko,@Xazax-hun

Extended Description

The misc-redundant-expression check reports a warning for the following use of decltype:

int x;
int y;
decltype(x + y - (x + y)) z = 10;

It's unclear whether or not misc-redundant-expression should return results for expressions inside a decltype specifier.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorbugzillaIssues migrated from bugzillaclang-tidy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions