Objective C supports lightweight generics in categories. This patch
adds support for that in clang-format.
Details
Diff Detail
- Build Status
Buildable 9680 Build 9680: arc lint + arc unit
Event Timeline
Looks good.
lib/Format/UnwrappedLineParser.cpp | ||
---|---|---|
2099 | nit: Seems like this comment would fit on one line. |
Is that really the way we want to recommend formatting that, with the generics clause separated from the class name but not separated from the category clause? I'd expect the opposite: write the generics clause with no separation after the class name but with separation from the category clause, e.g. NSHashTable<ObjectType> (MYFoundation).
It looks like your clang-format review does not contain any unit tests, please try to ensure all code changes have a unit test (unless this is an NFC or refactoring, adding documentation etc..)
Add your unit tests in clang/unittests/Format and you can build with ninja FormatTests. We recommend using the verifyFormat(xxx) format of unit tests rather than EXPECT_EQ as this will ensure you change is tolerant to random whitespace changes (see FormatTest.cpp as an example)
For situations where your change is altering the TokenAnnotator.cpp which can happen if you are trying to improve the annotation phase to ensure we are correctly identifying the type of a token, please add a token annotator test in TokenAnnotatorTest.cpp
nit: Seems like this comment would fit on one line.