[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 2 02:12:03 PST 2016
djasper added inline comments.
================
Comment at: lib/Format/Format.cpp:1521
+// tokens and returns an offset after the sequence.
+unsigned getOffsetAfterTokenSequence(
+ StringRef FileName, StringRef Code, const FormatStyle &Style,
----------------
I am somewhat hesitant to put more and more code here. Can we move some of this to a separate file? Is there a reasonable separation?
================
Comment at: lib/Format/Format.cpp:1601
+
+// Returns the offset of the last #include directive after which a new
+// #include can be inserted. If no such #include in the code, this returns the
----------------
I might be useful to precisely describe (here or elsewhere) what is determined here, not from an implementation standpoint, but from what a user can expect.
https://reviews.llvm.org/D26909
More information about the cfe-commits
mailing list