diff options
author | Hans Wennborg <hans@chromium.org> | 2020-03-25 17:20:06 +0100 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2020-05-07 11:06:57 -0700 |
commit | 7ae6db9cf0c0b11a6f753cb1cf8dabb512e70f6f (patch) | |
tree | 8b5ec32369ca2cb491c6dbc50050d65e3d0a4507 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | db810b69f805e078b73c23fcc98f271fb05265bc (diff) | |
download | bcm5719-llvm-7ae6db9cf0c0b11a6f753cb1cf8dabb512e70f6f.tar.gz bcm5719-llvm-7ae6db9cf0c0b11a6f753cb1cf8dabb512e70f6f.zip |
clang-format: Fix pointer alignment for overloaded operators (PR45107)
This fixes a regression from D69573 which broke the following example:
$ echo 'operator C<T>*();' | bin/clang-format --style=Chromium
operator C<T> *();
(There should be no space before the asterisk.)
It seems the problem is in TokenAnnotator::spaceRequiredBetween(),
which only looked at the token to the left of the * to see if it was a
type or not. That code only handled simple types or identifiers, not
templates or qualified types. This patch addresses that.
Differential revision: https://reviews.llvm.org/D76850
(cherry picked from commit eb85e90350e93a64279139e7eca9ca40c8fbf5eb)
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions