]> granicus.if.org Git - clang/commitdiff
SemaDeclCXX.cpp: UninitializedFieldVisitor: Avoid member initializers to appease...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Oct 2014 23:46:34 +0000 (23:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Oct 2014 23:46:34 +0000 (23:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220111 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index f5a399a2a1a1c970ea84d8fad4a3119395ab968e..1d87abb33f3a7679ecbfe1a4a90a976935d4cbcf 100644 (file)
@@ -2216,19 +2216,20 @@ namespace {
     // nodes.  These Decls may have been initialized in the prior initializer.
     llvm::SmallVector<ValueDecl*, 4> DeclsToRemove;
     // If non-null, add a note to the warning pointing back to the constructor.
-    const CXXConstructorDecl *Constructor = nullptr;
+    const CXXConstructorDecl *Constructor;
     // Variables to hold state when processing an initializer list.  When
     // InitList is true, special case initialization of FieldDecls matching
     // InitListFieldDecl.
-    bool InitList = false;
-    FieldDecl *InitListFieldDecl = nullptr;
+    bool InitList;
+    FieldDecl *InitListFieldDecl;
     llvm::SmallVector<unsigned, 4> InitFieldIndex;
 
   public:
     typedef EvaluatedExprVisitor<UninitializedFieldVisitor> Inherited;
     UninitializedFieldVisitor(Sema &S,
                               llvm::SmallPtrSetImpl<ValueDecl*> &Decls)
-      : Inherited(S.Context), S(S), Decls(Decls) { }
+      : Inherited(S.Context), S(S), Decls(Decls), Constructor(nullptr),
+        InitList(false), InitListFieldDecl(nullptr) {}
 
     // Returns true if the use of ME is not an uninitialized use.
     bool IsInitListMemberExprInitialized(MemberExpr *ME,