[PATCH] Fix ExplicitConstructorCheck to warn only on in-class declarations.
Alexander Kornienko
alexfh at google.com
Thu Feb 13 01:15:46 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:
> Daniel Jasper wrote:
> > Using getCanonicalDecl() makes quite a few implicit assumptions. Why not just use "if (!Ctor->isOutOfLine())"?
> I mean without the "!" ;)
Aha, this is what I had been trying to find before I came up with the getCanonicalDecl version ;)
http://llvm-reviews.chandlerc.com/D2756
More information about the cfe-commits
mailing list