]> granicus.if.org Git - clang/commit
[clang-format] Make parseUnaryOperator non-recursive, NFCI
authorKrasimir Georgiev <krasimir@google.com>
Wed, 1 Nov 2017 18:20:41 +0000 (18:20 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Wed, 1 Nov 2017 18:20:41 +0000 (18:20 +0000)
commitba0893fc83cd0f03803ca0799d7b6f10bc13d128
tree696659a375a5783937d791eeb091c52f2bef3dee
parent3789ad4283ec09df1ed8411abbb227d76e7ef8cb
[clang-format] Make parseUnaryOperator non-recursive, NFCI

Summary:
This patch makes the implementation of parseUnaryOperator non-recursive. We had
a problem with a file starting with tens of thousands of +'es and -'es which
caused clang-format to stack overflow.

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D39498

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