congliu marked 20 inline comments as done. ================ Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:59 @@ +58,3 @@ +bool VirtualNearMissCheck::isOverrideMethod(const CXXMethodDecl *MD){ + return MD->size_overridden_methods() > 0 || MD->hasAttr<OverrideAttr>(); +} ---------------- alexfh wrote: > Why is the `hasAttr<OverrideAttr>()` part needed? Do you have an example of > code that results in `size_overridden_methods() == 0` and > `hasAttr<OverrideAttr>() == true`? I tried some cases, but haven't found an example for that case. I saw the same code in [[ https://cs.corp.google.com/#piper///depot/google3/third_party/llvm/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h&l=3500 | AST_MATCHER(CXXMethodDecl, isOverride) ]]. I'm not sure why there is a "hasAttr".
http://reviews.llvm.org/D15823 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits