]> granicus.if.org Git - clang/commit
clang-format: Fix bug in understanding string-label&value analysis.
authorDaniel Jasper <djasper@google.com>
Tue, 20 Dec 2016 15:27:46 +0000 (15:27 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 20 Dec 2016 15:27:46 +0000 (15:27 +0000)
commit4aeb870bf4b2e0ea0cd0a926b4ed741e72e606ef
tree253d1e98ae9194174c2be477796f313d9b8e0639
parent49d944aa259dae5ee57ee43f76e455361a7d33fb
clang-format: Fix bug in understanding string-label&value analysis.

While for <<-operators often used in log statments, a single key value
pair is always on the second operator, e.g.

  llvm::errs() << "aaaaa=" << aaaaa;

It is on the first operator for plus- or comma-concatenated strings:

  string s = "aaaaaaaaaa: " + aaaaaaaa;

(the "=" not counting because that's a different operator precedence)

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