benhamilton added inline comments.
Comment at: clang-tidy/utils/IncludeSorter.cpp:116
bool IsAngled) {
+ std::string IncludeDirective = LangOpts->ObjC ? "#import " : "#include ";
std::string IncludeStmt =
hokein added a comment.
Please add a unittest for it, you can add it in
`unittests/clang-tidy/IncludeInserterTest.cpp`.
Comment at: clang-tidy/utils/IncludeSorter.cpp:116
bool IsAngled) {
+ std::string IncludeDirectiv
compositeprimes created this revision.
compositeprimes added reviewers: klimek, alexfh.
Herald added a subscriber: cfe-commits.
The change infers whether a source file is Objective-C using LangOpts, and if
it detects Objective-C, it uses "#import" instead of "#include" for all
inserted imports.