diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-08-28 11:03:10 +0100 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2020-08-28 11:31:47 +0100 |
commit | 96824abe7d80fc499032dab598968436132fcfb5 (patch) | |
tree | 22753ed1e623d01846689c3d596a9091da91226d /llvm/lib/CodeGen/ReachingDefAnalysis.cpp | |
parent | d304360decefae3fa5c807a8cd0d7d4501a1cc4b (diff) | |
download | llvm-96824abe7d80fc499032dab598968436132fcfb5.zip llvm-96824abe7d80fc499032dab598968436132fcfb5.tar.gz llvm-96824abe7d80fc499032dab598968436132fcfb5.tar.bz2 |
[clang-format] Detect pointer qualifiers in cast expressions
When guessing whether a closing paren is then end of a cast expression also
skip over pointer qualifiers while looking for TT_PointerOrReference.
This prevents some address-of and dereference operators from being parsed
as a binary operator.
Before:
x = (foo *const) * v;
x = (foo *const volatile restrict __attribute__((foo)) _Nonnull _Null_unspecified _Nonnull) & v;
After:
x = (foo *const)*v;
x = (foo *const volatile restrict __attribute__((foo)) _Nonnull _Null_unspecified _Nonnull)&v;
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D86716
Diffstat (limited to 'llvm/lib/CodeGen/ReachingDefAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions