Lines Matching refs:Loc
181 /// \param Loc If specified, is the location that invalid file diagnostics
187 SourceLocation Loc = SourceLocation(),
803 SourceLocation createMacroArgExpansionLoc(SourceLocation Loc,
810 SourceLocation createExpansionLoc(SourceLocation Loc,
872 llvm::MemoryBuffer *getBuffer(FileID FID, SourceLocation Loc,
883 return Entry.getFile().getContentCache()->getBuffer(Diag, *this, Loc,
1020 getModuleImportLoc(SourceLocation Loc) const {
1021 FileID FID = getFileID(Loc);
1031 /// \brief Given a SourceLocation object \p Loc, return the expansion
1033 SourceLocation getExpansionLoc(SourceLocation Loc) const {
1036 if (Loc.isFileID()) return Loc;
1037 return getExpansionLocSlowCase(Loc);
1040 /// \brief Given \p Loc, if it is a macro location return the expansion
1043 SourceLocation getFileLoc(SourceLocation Loc) const {
1044 if (Loc.isFileID()) return Loc;
1045 return getFileLocSlowCase(Loc);
1051 /// \pre \p Loc is required to be an expansion location.
1053 getImmediateExpansionRange(SourceLocation Loc) const;
1058 getExpansionRange(SourceLocation Loc) const;
1066 SourceLocation getSpellingLoc(SourceLocation Loc) const {
1069 if (Loc.isFileID()) return Loc;
1070 return getSpellingLocSlowCase(Loc);
1079 SourceLocation getImmediateSpellingLoc(SourceLocation Loc) const;
1085 std::pair<FileID, unsigned> getDecomposedLoc(SourceLocation Loc) const {
1086 FileID FID = getFileID(Loc);
1091 return std::make_pair(FID, Loc.getOffset()-E.getOffset());
1099 getDecomposedExpansionLoc(SourceLocation Loc) const {
1100 FileID FID = getFileID(Loc);
1106 unsigned Offset = Loc.getOffset()-E->getOffset();
1107 if (Loc.isFileID())
1118 getDecomposedSpellingLoc(SourceLocation Loc) const {
1119 FileID FID = getFileID(Loc);
1125 unsigned Offset = Loc.getOffset()-E->getOffset();
1126 if (Loc.isFileID())
1149 bool isMacroArgExpansion(SourceLocation Loc) const;
1156 bool isMacroBodyExpansion(SourceLocation Loc) const;
1163 bool isAtStartOfImmediateMacroExpansion(SourceLocation Loc,
1172 isAtEndOfImmediateMacroExpansion(SourceLocation Loc,
1175 /// \brief Returns true if \p Loc is inside the [\p Start, +\p Length)
1179 /// relative offset of \p Loc inside the chunk.
1180 bool isInSLocAddrSpace(SourceLocation Loc,
1188 unsigned LocOffs = Loc.getOffset();
1239 unsigned getSpellingColumnNumber(SourceLocation Loc,
1241 unsigned getExpansionColumnNumber(SourceLocation Loc,
1243 unsigned getPresumedColumnNumber(SourceLocation Loc,
1253 unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
1254 unsigned getExpansionLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
1255 unsigned getPresumedLineNumber(SourceLocation Loc, bool *Invalid = nullptr) const;
1262 const char *getBufferName(SourceLocation Loc, bool *Invalid = nullptr) const;
1274 SrcMgr::CharacteristicKind getFileCharacteristic(SourceLocation Loc) const;
1286 /// presumed location cannot be calculated (e.g., because \p Loc is invalid
1287 /// or the file containing \p Loc has changed on disk), returns an invalid
1289 PresumedLoc getPresumedLoc(SourceLocation Loc,
1299 bool isInMainFile(SourceLocation Loc) const;
1313 bool isWrittenInMainFile(SourceLocation Loc) const {
1314 return getFileID(Loc) == getMainFileID();
1318 bool isInSystemHeader(SourceLocation Loc) const {
1319 return getFileCharacteristic(Loc) != SrcMgr::C_User;
1323 bool isInExternCSystemHeader(SourceLocation Loc) const {
1324 return getFileCharacteristic(Loc) == SrcMgr::C_ExternCSystem;
1327 /// \brief Returns whether \p Loc is expanded from a macro in a system header.
1335 /// \brief Given a specific FileID, returns true if \p Loc is inside that
1336 /// FileID chunk and sets relative offset (offset of \p Loc from beginning
1338 bool isInFileID(SourceLocation Loc, FileID FID,
1340 unsigned Offs = Loc.getOffset();
1359 /// specified by Loc.
1362 void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID);
1363 void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID,
1421 /// \brief If \p Loc points inside a function macro argument, the returned
1430 SourceLocation getMacroArgExpandedLocation(SourceLocation Loc) const;
1518 /// \brief Returns true if \p Loc came from a PCH/Module.
1519 bool isLoadedSourceLocation(SourceLocation Loc) const {
1520 return Loc.getOffset() >= CurrentLoadedOffset;
1523 /// \brief Returns true if \p Loc did not come from a PCH/Module.
1524 bool isLocalSourceLocation(SourceLocation Loc) const {
1525 return Loc.getOffset() < NextLocalOffset;
1541 SourceLocation getImmediateMacroCallerLoc(SourceLocation Loc) const {
1542 if (!Loc.isMacroID()) return Loc;
1547 if (isMacroArgExpansion(Loc))
1548 return getImmediateSpellingLoc(Loc);
1552 return getImmediateExpansionRange(Loc).first;
1632 SourceLocation getExpansionLocSlowCase(SourceLocation Loc) const;
1633 SourceLocation getSpellingLocSlowCase(SourceLocation Loc) const;
1634 SourceLocation getFileLocSlowCase(SourceLocation Loc) const;