From 2f18b37792d3e17787568331bc187e551c86775f Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 29 Jan 2015 13:11:47 +0000 Subject: [PATCH] clang-format: FIXME that led to access of uninitialized memory. I have so far not succeeded in finding a nicely reduced test case or an observable difference which could help me create a test failure without msan. Committing without test to unblock kcc's further fuzzing progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227433 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/Format.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 2a4721f2b3..128a5a7888 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -845,8 +845,8 @@ private: FormatToken *getNextToken() { if (GreaterStashed) { // Create a synthesized second '>' token. - // FIXME: Increment Column and set OriginalColumn. Token Greater = FormatTok->Tok; + unsigned OriginalColumn = FormatTok->OriginalColumn; FormatTok = new (Allocator.Allocate()) FormatToken; FormatTok->Tok = Greater; SourceLocation GreaterLocation = @@ -855,6 +855,7 @@ private: SourceRange(GreaterLocation, GreaterLocation); FormatTok->TokenText = ">"; FormatTok->ColumnWidth = 1; + FormatTok->OriginalColumn = OriginalColumn; GreaterStashed = false; return FormatTok; } -- 2.50.1