[PATCH] Fix ExplicitConstructorCheck to warn only on in-class declarations.
Daniel Jasper
djasper at google.com
Thu Feb 13 00:47:44 PST 2014
================
Comment at: clang-tidy/google/GoogleTidyModule.cpp:35
@@ -34,1 +34,3 @@
Result.Nodes.getNodeAs<CXXConstructorDecl>("construct");
+ if (Ctor != Ctor->getCanonicalDecl())
+ return;
----------------
Daniel Jasper wrote:
> Using getCanonicalDecl() makes quite a few implicit assumptions. Why not just use "if (!Ctor->isOutOfLine())"?
I mean without the "!" ;)
http://llvm-reviews.chandlerc.com/D2756
More information about the cfe-commits
mailing list