]> granicus.if.org Git - clang/commitdiff
Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 8 Jul 2009 02:17:42 +0000 (02:17 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 8 Jul 2009 02:17:42 +0000 (02:17 +0000)
It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.

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

include/clang/AST/PrettyPrinter.h

index a0545224233ba9ad1da500b4f38b266db991bf3f..0a13d3fd4e0047fcf9c261ad9d1e2a6dc92cf168 100644 (file)
@@ -36,7 +36,8 @@ struct PrintingPolicy {
   /// \brief Create a default printing policy for C.
   PrintingPolicy(const LangOptions &LO) 
     : Indentation(2), LangOpts(LO), SuppressSpecifiers(false),
-      SuppressTag(false), SuppressTagKind(false), Dump(false) { }
+      SuppressTag(false), SuppressTagKind(false), Dump(false),
+      ConstantArraySizeAsWritten(false) { }
 
   /// \brief The number of spaces to use to indent each line.
   unsigned Indentation : 8;