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