Warn about self references in in-class initializers.
authorHans Wennborg <hans@hanshq.net>
Tue, 18 Sep 2012 15:58:06 +0000 (15:58 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 18 Sep 2012 15:58:06 +0000 (15:58 +0000)
commit44fd70a3ad43b8e7b27af79f8011c7f5b90c841f
tree3167e7fabeb747e20a4f5210bb092983d8acfad2
parenteb2c8f0fc69d09f0318cdcef7398f867402eaecd
Warn about self references in in-class initializers.

This makes Clang warn about self references in in-class initializers,
for example:

  struct S {
    int a = a + 42;
  };

This basically just moves UninitializedFieldVisitor up a bit in
SemaDeclCXX.cpp, and adds a call to it from ActOnCXXInClassMemberInitializer.

llvm-svn: 164131
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaCXX/uninitialized.cpp