aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM!



================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:317
+  sum = sizeof(PtrArray) / sizeof(PtrArray1[0]);
+  // There is no warning for 'sizeof(T*)/sizeof(Q)' case.
+  sum += sizeof(PtrArray) / sizeof(A[0]);
----------------
balazske wrote:
> aaron.ballman wrote:
> > Thanks for the new test case, can you also add one for `array[1]` (with the 
> > incorrect index) and add a FIXME to the comment so it's clear that we know 
> > we don't handle these cases currently but might like to someday?
> The test for `array[1]` is not the same that is inserted on line 245?
> 
Weirdly, I didn't see the test cases added around line 245 until this review. 
Huh, very odd -- but yes, that test covers it nicely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91543/new/

https://reviews.llvm.org/D91543

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to