Home | History | Annotate | Download | only in Inclusions

Lines Matching refs:Code

37 // GetOffsetAfterSequence, from the start of the code.
41 StringRef FileName, StringRef Code, const IncludeStyle &Style,
44 SourceManagerForFile VirtualSM(FileName, Code);
79 // header guard is present in the code, this will return the offset after
80 // skipping all comments from the start of the code.
82 StringRef Code,
91 FileName, Code, Style,
147 // in the beginning of a file to avoid inserting headers into code sections
149 // These code sections include:
155 // offset after skipping all comments from the start of the code.
156 // Inserting after an #include is not allowed if it comes after code that is not
158 unsigned getMaxHeaderInsertionOffset(StringRef FileName, StringRef Code,
161 FileName, Code, Style,
268 HeaderIncludes::HeaderIncludes(StringRef FileName, StringRef Code,
270 : FileName(FileName), Code(Code), FirstIncludeOffset(-1),
272 getOffsetAfterHeaderGuardsAndComments(FileName, Code, Style)),
275 FileName, Code.drop_front(MinInsertOffset), Style)),
284 Code.drop_front(MinInsertOffset).split(Lines, "\n");
290 NextLineOffset = std::min(Code.size(), Offset + Line.size() + 1);
297 Offset, std::min(Line.size() + 1, Code.size() - Offset))),
345 // If a <header> ("header") already exists in code, "header" (<header>) with
371 assert(InsertOffset <= Code.size());
374 // When inserting headers at end of the code, also append '\n' to the code
376 // FIXME: when inserting multiple #includes at the end of code, only one
378 if (InsertOffset == Code.size() && (!Code.empty() && Code.back() != '\n'))