[PATCH] D24192: [clang-refactor] introducing clang-refactor

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 19 02:53:01 PDT 2016


ioeric added inline comments.

================
Comment at: clang-refactor/driver/ModuleManager.h:14-20
@@ +13,9 @@
+#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/StringRef.h"
+
+#include <string>
+#include <unordered_map>
+#include <vector>
+
+#include "core/RefactoringModule.h"
+
----------------
curdeius wrote:
> I thought that idea behind sorting includes using clang-format is to avoid handling groups and order manually.
> I don't think that there is any policy prohibiting separating includes into groups, but AFAIK, there is one that says that STL includes should be the last (you should include in order from the most specific to the most generic, i.e. subproject, clang, llvm, STL).
Fortunately, clang-format is smart enough to categorize #include groups (e.g. LLVM includes, STL includes, main header etc). We actually encourage people to combine #includes groups into one block and let clang-format handle the categorization (fyi: clang-format only sort includes within a block). The point is to free you from worrying about the formatting.


https://reviews.llvm.org/D24192





More information about the cfe-commits mailing list