diff options
author | Ben Hamilton <benhamilton@google.com> | 2019-07-16 21:29:40 +0000 |
---|---|---|
committer | Ben Hamilton <benhamilton@google.com> | 2019-07-16 21:29:40 +0000 |
commit | f4c2d57f767d870b4787c86b543ded8076fe108b (patch) | |
tree | c3fa93f9438db781908a1ff9b6692a35553016ea /lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py | |
parent | fdc61bce9470ca7e80125b54d6dfbf24a3cc68c5 (diff) | |
download | bcm5719-llvm-f4c2d57f767d870b4787c86b543ded8076fe108b.tar.gz bcm5719-llvm-f4c2d57f767d870b4787c86b543ded8076fe108b.zip |
[clang-format] Don't detect call to ObjC class method as C++11 attribute specifier
Summary:
Previously, clang-format detected something like the following as a C++11 attribute specifier.
@[[NSArray class]]
instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails.
To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.)
Contributed by rkgibson2.
Reviewers: benhamilton
Reviewed By: benhamilton
Subscribers: aaron.ballman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64632
llvm-svn: 366267
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py')
0 files changed, 0 insertions, 0 deletions