We suggest inserting the method with an empty body at the end
of the implementation decl.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks, this looks good!
clang/lib/Sema/SemaDeclObjC.cpp | ||
---|---|---|
2237 | Str -> FixitStr The comment is IMO too verbose, maybe just "// Add an empty definition at the end of @implementation". | |
2239 | No need to copy the policy, just refer to it directly? | |
2241 | nit: mixing string & output stream modifications is a bit confusing | |
2241 | I think this should probably only have one inside and one at the end. Fixits aren't really in the business of formatting the code to be further modified. One newline between empty braces seems to be LLVM's style for objc. (For C++ it's zero newlines) | |
clang/test/FixIt/fixit-objc-missing-method-impl.m | ||
2 | Can you also include a -verify run to show the error being fixed? This seems to be common in other tests, and it makes it much easier to understand what's being tested. |
clang/lib/Sema/SemaDeclObjC.cpp | ||
---|---|---|
2241 | I changed it to be one newline between the braces but 2 before the @end so you get - (void)something { } @end since I think that's more common |
Str -> FixitStr
The comment is IMO too verbose, maybe just "// Add an empty definition at the end of @implementation".
(The future idea doesn't seem either specific or critical)