[clang] [clang-format] Keep the ObjC selector name and `@selector` together (PR #160739)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 19:42:11 PDT 2025
================
@@ -451,10 +451,8 @@ class AnnotatingParser {
}
}
- if (StartsObjCMethodExpr) {
- Contexts.back().ColonIsObjCMethodExpr = true;
----------------
sstwcw wrote:
It was previously used for setting things inside the `@selector()` to the `ObjCMethodExpr` type. Line 1453 was added after this line was added. It covers all the cases the first one is supposed to cover plus some more cases. So this line has not been necessary since the second line was added. My patch requires that the things inside get assigned a new type. Keeping the line keeps the things as the old type. The long token annotator test checks the types of things inside `@selector()`.
https://github.com/llvm/llvm-project/pull/160739
More information about the cfe-commits
mailing list