This is an archive of the discontinued LLVM Phabricator instance.

[Format] Improve ObjC header guessing heuristic
ClosedPublic

Authored by benhamilton on Jan 16 2018, 2:46 PM.

Details

Summary

This improves upon the previous Objective-C header guessing heuristic
from rC320479.

Now, we run the lexer on C++ header files and look for Objective-C
keywords and syntax. We also look for Foundation types.

Test Plan: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Diff Detail

Repository
rL LLVM

Event Timeline

benhamilton created this revision.Jan 16 2018, 2:46 PM
  • Move tests to FormatTestObjC.cpp
  • Last cleanup for tests
  • Remove unused variable.
jolesiak accepted this revision.Jan 17 2018, 9:10 AM
This revision is now accepted and ready to land.Jan 17 2018, 9:10 AM

Use unordered_set, consolidate at-token checks

This revision was automatically updated to reflect the committed changes.