Skip to content

Commit d8ffadc

Browse files
committed
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. llvm-svn: 74989
1 parent 1496576 commit d8ffadc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/include/clang/AST/PrettyPrinter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ struct PrintingPolicy {
3636
/// \brief Create a default printing policy for C.
3737
PrintingPolicy(const LangOptions &LO)
3838
: Indentation(2), LangOpts(LO), SuppressSpecifiers(false),
39-
SuppressTag(false), SuppressTagKind(false), Dump(false) { }
39+
SuppressTag(false), SuppressTagKind(false), Dump(false),
40+
ConstantArraySizeAsWritten(false) { }
4041

4142
/// \brief The number of spaces to use to indent each line.
4243
unsigned Indentation : 8;

0 commit comments

Comments
 (0)