diff options
author | Daniel Jasper <djasper@google.com> | 2015-01-29 13:11:47 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-01-29 13:11:47 +0000 |
commit | 0955cb41ebc5bb0e12b991d24f94b3628c399b24 (patch) | |
tree | 5ae55d35a75bf296435d7d147e0b81fb128ae7d8 /clang/lib/Format | |
parent | f3be1cc5a9d5d75665a3d3cff54d51a161608c59 (diff) | |
download | bcm5719-llvm-0955cb41ebc5bb0e12b991d24f94b3628c399b24.tar.gz bcm5719-llvm-0955cb41ebc5bb0e12b991d24f94b3628c399b24.zip |
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.
llvm-svn: 227433
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 2a4721f2b3b..128a5a78889 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/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; } |