[all-commits] [llvm/llvm-project] 47518d: [clang-tidy] Improving bugprone-sizeof-expr check.
Balázs Kéri via All-commits
all-commits at lists.llvm.org
Thu Nov 19 01:20:40 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 47518d6a0aed7ec3607aeacfa511dedda2cd67cb
https://github.com/llvm/llvm-project/commit/47518d6a0aed7ec3607aeacfa511dedda2cd67cb
Author: Balázs Kéri <1.int32 at gmail.com>
Date: 2020-11-19 (Thu, 19 Nov 2020)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp
Log Message:
-----------
[clang-tidy] Improving bugprone-sizeof-expr check.
Do not warn for "pointer to aggregate" in a `sizeof(A) / sizeof(A[0])`
expression if `A` is an array of pointers. This is the usual way of
calculating the array length even if the array is of pointers.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D91543
More information about the All-commits
mailing list