================
@@ -34,7 +34,7 @@ class ContainerDataPointerCheck : public ClangTidyCheck {
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 
   std::optional<TraversalKind> getCheckTraversalKind() const override {
-    return TK_IgnoreUnlessSpelledInSource;
+    return TK_AsIs;
----------------
vbvictor wrote:

Can we make the check work without introducing `TK_AsIs`?
I understand that it was needed for templates but we had previously working 
templates in
```
template <typename T>
void m(const std::vector<T> &v) {
  return &v[0];
  // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: 'data' should be used for 
accessing the data pointer instead of taking the address of the 0-th element 
[readability-container-data-pointer]
  // CHECK-FIXES: return v.data();
}
```

https://github.com/llvm/llvm-project/pull/165636
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to