]> granicus.if.org Git - clang/commit
Fix crash in clang-format.
authorManuel Klimek <klimek@google.com>
Thu, 11 Jun 2015 10:14:13 +0000 (10:14 +0000)
committerManuel Klimek <klimek@google.com>
Thu, 11 Jun 2015 10:14:13 +0000 (10:14 +0000)
commit5f4ac97702b99d425844240611eecaa650b42429
tree3ce12cc42ef1a3a7deb727ac9f08d95b068ce8ec
parent5596c4ee940e79b152eea89707a7ae096569543d
Fix crash in clang-format.

The following example used to crash clang-format.
 #define a\
  /**/}

Adjusting the indentation level cache for the line starting with the
comment would lead to an out-of-bounds array read.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239521 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/UnwrappedLineFormatter.cpp
unittests/Format/FormatTest.cpp