• Home
  • Raw
  • Download

Lines Matching refs:SM

54                                               const SourceManager &SM) {  in validateEditRange()  argument
63 if (SM.isInSystemHeader(Range.getBegin()) || in validateEditRange()
64 SM.isInSystemHeader(Range.getEnd())) in validateEditRange()
68 std::pair<FileID, unsigned> BeginInfo = SM.getDecomposedLoc(Range.getBegin()); in validateEditRange()
69 std::pair<FileID, unsigned> EndInfo = SM.getDecomposedLoc(Range.getEnd()); in validateEditRange()
83 const SourceManager &SM, in getRangeForEdit() argument
96 CharSourceRange Range = Lexer::makeFileCharRange(EditRange, SM, LangOpts); in getRangeForEdit()
97 bool IsInvalid = llvm::errorToBool(validateEditRange(Range, SM)); in getRangeForEdit()
104 static bool startsWithNewline(const SourceManager &SM, const Token &Tok) { in startsWithNewline() argument
105 return isVerticalWhitespace(SM.getCharacterData(Tok.getLocation())[0]); in startsWithNewline()
122 getEntityEndLoc(const SourceManager &SM, SourceLocation EntityLast, in getEntityEndLoc() argument
132 CharSourceRange ExpansionRange = SM.getExpansionRange(EntityLast); in getEntityEndLoc()
137 auto FileOffset = SM.getDecomposedLoc(ExpansionRange.getEnd()); in getEntityEndLoc()
138 llvm::StringRef File = SM.getBufferData(FileOffset.first, &Invalid); in getEntityEndLoc()
141 SM.getLocForStartOfFile(FileOffset.first), LangOpts, File.begin(), in getEntityEndLoc()
202 if (startsWithNewline(SM, Tok)) in getEntityEndLoc()
220 if (startsWithNewline(SM, Tok)) in getEntityEndLoc()
267 static SourceLocation skipWhitespaceAndNewline(const SourceManager &SM, in skipWhitespaceAndNewline() argument
270 const char *LocChars = SM.getCharacterData(Loc); in skipWhitespaceAndNewline()
283 static bool atOrBeforeSeparation(const SourceManager &SM, SourceLocation Loc, in atOrBeforeSeparation() argument
291 SM.getCharacterData(Loc.getLocWithOffset(-1), &Invalid); in atOrBeforeSeparation()
302 bool Failed = Lexer::getRawToken(Loc, Tok, SM, LangOpts, in atOrBeforeSeparation()
321 const SourceManager &SM = Context.getSourceManager(); in getAssociatedRange() local
328 if (SM.isBeforeInTranslationUnit(T->getBeginLoc(), Range.getBegin())) in getAssociatedRange()
332 if (SM.isBeforeInTranslationUnit(T->getBeginLoc(), Range.getBegin())) in getAssociatedRange()
339 getEntityEndLoc(SM, Decl.getEndLoc(), getTerminators(Decl), LangOpts)); in getAssociatedRange()
353 if (SM.isBeforeInTranslationUnit(Comment->getBeginLoc(), in getAssociatedRange()
356 SM, skipWhitespaceAndNewline(SM, Comment->getEndLoc(), LangOpts), in getAssociatedRange()
358 atOrBeforeSeparation(SM, Range.getEnd(), LangOpts)) { in getAssociatedRange()
359 const StringRef CommentText = Comment->getRawText(SM); in getAssociatedRange()
367 !SM.isBeforeInTranslationUnit(Attr->getLocation(), Range.getBegin())) in getAssociatedRange()
375 SM.getBufferData(SM.getFileID(Range.getBegin()), &Invalid); in getAssociatedRange()
379 Source.substr(0, SM.getFileOffset(Range.getBegin())); in getAssociatedRange()
400 return Lexer::makeFileCharRange(Range, SM, LangOpts); in getAssociatedRange()