summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-10-19 01:36:09 +0000
committerNico Weber <nicolasweber@gmx.de>2015-10-19 01:36:09 +0000
commitafa62fae1e143f9fa2b8ff5db30bc36fc63af993 (patch)
tree632e70e2f452736ef976e2581ee6fa3261643688 /clang/lib/Format
parent7f66d75832479ec7ee6b4903a95b9fb66289f543 (diff)
downloadbcm5719-llvm-afa62fae1e143f9fa2b8ff5db30bc36fc63af993.tar.gz
bcm5719-llvm-afa62fae1e143f9fa2b8ff5db30bc36fc63af993.zip
clang-format: Extend main header include sorting heuristic to Objective-C files.
llvm-svn: 250675
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/Format.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 674af7ac531..2595a666699 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1747,7 +1747,9 @@ tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code,
FileName.endswith(".cc") ||
FileName.endswith(".cpp")||
FileName.endswith(".c++")||
- FileName.endswith(".cxx");
+ FileName.endswith(".cxx") ||
+ FileName.endswith(".m")||
+ FileName.endswith(".mm");
// Create pre-compiled regular expressions for the #include categories.
SmallVector<llvm::Regex, 4> CategoryRegexs;
OpenPOWER on IntegriCloud