Do not insert whitespace preceding the "!" postfix operator. This is an
incomplete fix, but should cover common usage.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
2127 ↗ | (On Diff #60242) | From a quick look at our codebase, I think you need to also rule out the following for Right.Next:
|
Comment Actions
- invert check to whitelist known tokens that can precede a non-null assertion.
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
2127 ↗ | (On Diff #60242) | Actually, I think inverting the condition and "whitelisting" preceding tokens makes more sense and is probably a lot more robust. PTAL, now checking left for identifier, r_paren, r_square, literal. |
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
2128 ↗ | (On Diff #60308) | Can you add a test for each of these? Also, how can a literal be null? |
Comment Actions
- more tests
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
2128 ↗ | (On Diff #60311) | Tests added. A literal cannot really be null, but the operator is allowed after any kind of expression, and it's straight forward to test for it here. |