aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorsstwcw <su3e8a96kzlver@posteo.net>2025-10-03 20:40:48 +0000
committerGitHub <noreply@github.com>2025-10-03 20:40:48 +0000
commit2a059042882ed5108478c635322e4e94439386f5 (patch)
treef081dbc90e6db55dd7912f8cb76b5c6581c8353e /clang/lib/Frontend/CompilerInstance.cpp
parent36dc2a941f531d6b5662f2ad2c11e7264e5d9622 (diff)
downloadllvm-2a059042882ed5108478c635322e4e94439386f5.zip
llvm-2a059042882ed5108478c635322e4e94439386f5.tar.gz
llvm-2a059042882ed5108478c635322e4e94439386f5.tar.bz2
[clang-format] Keep the ObjC selector name and `@selector` together (#160739)
Fixes #36459. after ```Objective-C - (void)test { if ([object respondsToSelector:@selector( selectorNameThatIsReallyLong:param1:param2:)]) return; } ``` before ```Objective-C - (void)test { if ([object respondsToSelector:@selector (selectorNameThatIsReallyLong:param1:param2:)]) return; } ``` Before this patch, the `ObjCMethodExpr` type was assigned to many kinds of tokens. The rule for allowing breaking the line before the colon on line TokenAnnotator.cpp:6289 was intended for method declarations and calls. It matched the parenthesis following `@selector` by mistake. To fix the problem, this patch adds a new type for `@selector`. Most of the special things in the code related to the old type is intended for other constructs. So most of the code related to the old type is not changed in this patch.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions