[cfe-commits] [Patch] Warn about self references in in-class initializers
Hans Wennborg
hans at chromium.org
Tue Sep 18 07:26:52 PDT 2012
Hi all,
The attached patch makes Clang warn about self references in in-class
initializers, for example:
struct S {
int a = a + 42;
};
The patch basically just moves UninitializedFieldVisitor up a bit in
the file, and adds a call to it from ActOnCXXInClassMemberInitializer.
Please take a look. Also, these warnings just say "field is
unitialized when used here". Would anyone be opposed to changing it to
"field 'a' is unitiailized when used here"?
- Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: in_class_self_init.patch
Type: application/octet-stream
Size: 9047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120918/fba070d0/attachment.obj>
More information about the cfe-commits
mailing list