]> granicus.if.org Git - clang/commitdiff
Initialize the "IsCompleteDefinitionRequired" field in the ASTContext ctor
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 13 Jul 2013 22:29:32 +0000 (22:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 13 Jul 2013 22:29:32 +0000 (22:29 +0000)
Introduced in r186262 & found by the hexagon buildbots (but owing to
this being UB, that's random chance - so there's no additional test case
here)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186265 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index cc9a90746b8a00d947eefb3051f25325b37362bd..628d70e15b7be2b452eff2cdfe97855d823d6eed 100644 (file)
@@ -2469,18 +2469,15 @@ private:
   }
 
 protected:
-  TagDecl(Kind DK, TagKind TK, DeclContext *DC,
-          SourceLocation L, IdentifierInfo *Id,
-          TagDecl *PrevDecl, SourceLocation StartL)
-    : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK),
-      TypedefNameDeclOrQualifier((TypedefNameDecl*) 0) {
+  TagDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L,
+          IdentifierInfo *Id, TagDecl *PrevDecl, SourceLocation StartL)
+      : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), TagDeclKind(TK),
+        IsCompleteDefinition(false), IsBeingDefined(false),
+        IsEmbeddedInDeclarator(false), IsFreeStanding(false),
+        IsCompleteDefinitionRequired(false),
+        TypedefNameDeclOrQualifier((TypedefNameDecl *)0) {
     assert((DK != Enum || TK == TTK_Enum) &&
            "EnumDecl not matched with TTK_Enum");
-    TagDeclKind = TK;
-    IsCompleteDefinition = false;
-    IsBeingDefined = false;
-    IsEmbeddedInDeclarator = false;
-    IsFreeStanding = false;
     setPreviousDeclaration(PrevDecl);
   }