whisperity added inline comments.
================ Comment at: test/clang-tidy/bugprone-sizeof-expression.cpp:196 typedef const MyStruct TMyStruct; + typedef const MyStruct *PMyStruct; ---------------- While I trust Clang and the matchers to unroll the type and still match, I'd prefer also adding a test case for ``` typedef TMyStruct* PMyStruct2; ``` or somesuch. And perhaps a "copy" of these cases where they come from template arguments, in case the checker can also warn for that? ================ Comment at: test/clang-tidy/bugprone-sizeof-expression.cpp:231 + sum += sizeof(MyStruct*); + // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate + sum += sizeof(PMyStruct); ---------------- Why is this printed at `sizeof(A*)`? Do we not print the name of the actual type used in the expression? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61260/new/ https://reviews.llvm.org/D61260 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits