Home | History | Annotate | Download | only in Basic

Lines Matching defs:Loc

83                                                   SourceLocation Loc,
119 Diag.Report(Loc, diag::err_cannot_open_file)
135 Diag.Report(Loc, diag::err_file_modified)
161 Diag.Report(Loc, diag::err_unsupported_bom)
240 // Get the include loc of the last entries' include loc as our include loc.
288 /// specified by Loc. If FilenameID is -1, it is considered to be
290 void SourceManager::AddLineNote(SourceLocation Loc, unsigned LineNo,
292 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
310 void SourceManager::AddLineNote(SourceLocation Loc, unsigned LineNo,
319 return AddLineNote(Loc, LineNo, FilenameID);
322 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
654 // Neither loc prunes our search.
786 getInstantiationLocSlowCase(SourceLocation Loc) const {
788 // Note: If Loc indicates an offset into a token that came from a macro
792 // with. This is unlike when we get the spelling loc, because the offset
794 Loc = getSLocEntry(getFileID(Loc)).getInstantiation()
796 } while (!Loc.isFileID());
798 return Loc;
801 SourceLocation SourceManager::getSpellingLocSlowCase(SourceLocation Loc) const {
803 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
804 Loc = getSLocEntry(LocInfo.first).getInstantiation().getSpellingLoc();
805 Loc = Loc.getFileLocWithOffset(LocInfo.second);
806 } while (!Loc.isFileID());
807 return Loc;
817 SourceLocation Loc;
820 Loc = E->getInstantiation().getInstantiationLocStart();
822 FID = getFileID(Loc);
824 Offset = Loc.getOffset()-E->getOffset();
825 } while (!Loc.isFileID());
836 SourceLocation Loc;
838 Loc = E->getInstantiation().getSpellingLoc();
840 FID = getFileID(Loc);
842 Offset += Loc.getOffset()-E->getOffset();
843 } while (!Loc.isFileID());
852 Loc) const{
853 if (Loc.isFileID()) return Loc;
854 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
855 Loc = getSLocEntry(LocInfo.first).getInstantiation().getSpellingLoc();
856 return Loc.getFileLocWithOffset(LocInfo.second);
860 /// getImmediateInstantiationRange - Loc is required to be an instantiation
863 SourceManager::getImmediateInstantiationRange(SourceLocation Loc) const {
864 assert(Loc.isMacroID() && "Not an instantiation loc!");
865 const InstantiationInfo &II = getSLocEntry(getFileID(Loc)).getInstantiation();
872 SourceManager::getInstantiationRange(SourceLocation Loc) const {
873 if (Loc.isFileID()) return std::make_pair(Loc, Loc);
876 getImmediateInstantiationRange(Loc);
887 bool SourceManager::isMacroArgInstantiation(SourceLocation Loc) const {
888 if (!Loc.isMacroID()) return false;
890 FileID FID = getFileID(Loc);
945 // isInvalid - Return the result of calling loc.isInvalid(), and
947 static bool isInvalid(SourceLocation Loc, bool *Invalid) {
948 bool MyInvalid = Loc.isInvalid();
954 unsigned SourceManager::getSpellingColumnNumber(SourceLocation Loc,
956 if (isInvalid(Loc, Invalid)) return 0;
957 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
961 unsigned SourceManager::getInstantiationColumnNumber(SourceLocation Loc,
963 if (isInvalid(Loc, Invalid)) return 0;
964 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
968 unsigned SourceManager::getPresumedColumnNumber(SourceLocation Loc,
970 if (isInvalid(Loc, Invalid)) return 0;
971 return getPresumedLoc(Loc).getColumn();
1150 unsigned SourceManager::getSpellingLineNumber(SourceLocation Loc,
1152 if (isInvalid(Loc, Invalid)) return 0;
1153 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
1156 unsigned SourceManager::getInstantiationLineNumber(SourceLocation Loc,
1158 if (isInvalid(Loc, Invalid)) return 0;
1159 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
1162 unsigned SourceManager::getPresumedLineNumber(SourceLocation Loc,
1164 if (isInvalid(Loc, Invalid)) return 0;
1165 return getPresumedLoc(Loc).getLine();
1177 SourceManager::getFileCharacteristic(SourceLocation Loc) const {
1178 assert(!Loc.isInvalid() && "Can't get file characteristic of invalid loc!");
1179 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
1207 const char *SourceManager::getBufferName(SourceLocation Loc,
1209 if (isInvalid(Loc, Invalid)) return "<invalid loc>";
1211 return getBuffer(getFileID(Loc), Invalid)->getBufferIdentifier();
1222 PresumedLoc SourceManager::getPresumedLoc(SourceLocation Loc) const {
1223 if (Loc.isInvalid()) return PresumedLoc();
1226 std::pair<FileID, unsigned> LocInfo = getDecomposedInstantiationLoc(Loc);
1461 /// decomposed version of the parent in Loc and return false. If Loc is the
1463 static bool MoveUpIncludeHierarchy(std::pair<FileID, unsigned> &Loc,
1466 const SrcMgr::SLocEntry &Entry = SM.getSLocEntry(Loc.first);
1475 Loc = SM.getDecomposedLoc(UpperLoc);