12 #include "clang/Lex/Preprocessor.h" 13 #include "llvm/Support/Regex.h" 16 namespace find_all_symbols {
18 const char IWYUPragma[] =
"// IWYU pragma: private, include ";
23 Lexer::getSourceText(CharSourceRange::getCharRange(Range),
24 PP.getSourceManager(), PP.getLangOpts());
25 size_t Pos = Text.find(IWYUPragma);
26 if (Pos == StringRef::npos)
28 StringRef RemappingFilePath = Text.substr(Pos + std::strlen(IWYUPragma));
30 PP.getSourceManager().getFilename(Range.getBegin()),
31 RemappingFilePath.trim(
"\"<>"));
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
CharSourceRange Range
SourceRange for the file name.