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)
commitf789f05ee2e39b5fee20b7dd1d0bd5141bbf662f
treed155cb0e03949c1ae68749757062e51cf471a7b3
parente3f35e4db67f08c14521fc1e4e8f360260bf34bb
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)

llvm-svn: 290177
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp