Commit c1dc914a authored by Piotr Zegar's avatar Piotr Zegar
Browse files

[clang-tidy] Correct sizeof/alignas handling in misc-redundant-expression

Fixed issue with the comparison of UnaryExprOrTypeTraitExpr
objects in which only the argument type was checked, without
considering the kind of expression. This led to false positives when
using sizeof(x) and alignof(x) expressions, as only the
comparison x = x was performed without checking if sizeof
was equal to alignof.

Fixes: https://github.com/llvm/llvm-project/issues/63096

Reviewed By: Izaron

Differential Revision: https://reviews.llvm.org/D152713
parent 81ad5a5c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment