compnerd marked an inline comment as done.
compnerd added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/readability-container-data-pointer.cpp:104
+  // CHECK-MESSAGES-NOT: :[[@LINE-1]]:5: warning: 'data' should be used for 
accessing the data pointer instead of taking the address of the 0-th element 
[readability-container-data-pointer]
+}
----------------
aaron.ballman wrote:
> Can you add one more test for how this behaves on uninstantiated templates?
> ```
> template <typename Ty>
> void func(const std::vector<Ty> &Vec) {
>   const Ty *Ptr = &Vec[0]; // Should diagnose and provide a fix-it despite 
> not instantiating func()
> }
> ```
Absolutely!  Thanks for the additional test case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108893

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

Reply via email to