[cfe-dev] clang-tidy check: Uninitialised primitive members in constructors
Jonathan Coe
jbcoe at me.com
Fri Feb 13 14:21:50 PST 2015
I have this working well now. Thanks for your input.
I recall seeing a list of checks in development but I can't find it any
more.
How would I go about submitting my new check(s) for inclusion in
clang-tools-extra?
Thanks again,
Jon
On 3 February 2015 at 19:44, Richard <legalize at xmission.com> wrote:
>
> In article <2A81C75A-0E4C-448D-A98E-A538EA32DF27 at gmail.com>,
> Jonathan Coe <jonathanbcoe at gmail.com> writes:
>
> > I'm struggling to see how I can find the location for the replacement
> text.
> > I want the start of the initialisers but I don't see how to get a
> location fo
> r that.
>
> From CXXConstructorDecl::init_begin() you can get the first
> initializer.
>
> From FunctionDecl::parameters() you can get the parameters.
>
> So you should be able to look at the source location of the last
> parameter and the source location of the first initializer. There
> doesn't seem to be any function for explicitly locating the ':' that
> begins the initializer list, but it will be between the above two
> source ranges.
> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
> The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
> The Terminals Wiki <http://terminals.classiccmp.org>
> Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150213/fbffa5b1/attachment.html>
More information about the cfe-dev
mailing list