From bbb3128b449b6c5e7822e8b781445e348a9117dc Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 8 Jul 2009 02:17:42 +0000 Subject: [PATCH] Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clang/AST/PrettyPrinter.h b/include/clang/AST/PrettyPrinter.h index a054522423..0a13d3fd4e 100644 --- a/include/clang/AST/PrettyPrinter.h +++ b/include/clang/AST/PrettyPrinter.h @@ -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; -- 2.40.0