]> granicus.if.org Git - clang/commit
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)
commit471f985ae04817e0e8198a925fc7d74eaacaf962
tree68b7b32c7c3e63d9ffb745c21492ccafc94d11fa
parent08f0c53175bba899e7af6c6cc2cab25caf64ef2a
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164131 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/uninitialized.cpp