[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 20 10:33:28 PST 2021


njames93 added a comment.

What happens when TBase is an explicit specialization. In that situation a warning for the explicit specialization may be useful.

  template <> struct TBase<float> {
    virtual void tfunt(T t);
  };



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-virtual-near-miss.cpp:49
-  // CHECK-MESSAGES: :[[@LINE-3]]:3: warning: method 'TDerived<int>::tfunk' has {{.*}} 'TBase<int>::tfunc'
-  // CHECK-FIXES: virtual void tfunk(T t);
 };
----------------
Can this be left in to show no fix was applied.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96224



More information about the cfe-commits mailing list