Home
last modified time | relevance | path

Searched refs:SourceMgr (Results 1 – 25 of 182) sorted by relevance

12345678

/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Support/
H A DSourceMgr.h31 class SourceMgr {
96 SourceMgr() = default;
97 SourceMgr(const SourceMgr &) = delete;
98 SourceMgr &operator=(const SourceMgr &) = delete;
99 SourceMgr(SourceMgr &&) = default;
100 SourceMgr &operator=(SourceMgr &&) = default;
101 ~SourceMgr() = default;
252 const SourceMgr *SM = nullptr;
257 SourceMgr::DiagKind Kind = SourceMgr::DK_Error;
266 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/FileCheck/
H A DFileCheckImpl.h104 const SourceMgr &SM) const;
193 getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
341 getImplicitFormat(const SourceMgr &SM) const override { in getImplicitFormat()
382 getImplicitFormat(const SourceMgr &SM) const override;
506 SourceMgr &SM);
557 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg,
560 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg), Range);
563 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { in get()
710 const SourceMgr &SM);
724 FileCheckPatternContext *Context, const SourceMgr &SM);
[all …]
H A DFileCheck.cpp129 const SourceMgr &SM) const { in valueFromStringRepr()
392 BinaryOperation::getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
440 Pattern::parseVariable(StringRef &Str, const SourceMgr &SM) { in parseVariable()
484 const SourceMgr &SM) { in parseNumericVariableDefinition()
522 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericVariableUse()
558 const SourceMgr &SM) { in parseNumericOperand()
615 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseParenExpr()
650 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseBinop()
694 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseCallExpr()
770 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericSubstitutionBlock()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/TableGen/
H A DError.cpp24 SourceMgr SrcMgr;
27 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
31 if (Kind == SourceMgr::DK_Error) in PrintMessage()
39 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
50 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote()
92 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
96 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
104 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
108 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
114 PrintMessage(Rec->getLoc(), SourceMgr::DK_Error, Msg); in PrintError()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/Format/
H A DUsingDeclarationsSorter.cpp116 const SourceManager &SourceMgr, tooling::Replacements *Fixes) { in endUsingDeclarationBlock() argument
145 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, "")); in endUsingDeclarationBlock()
159 StringRef Text(SourceMgr.getCharacterData(SortedBegin), in endUsingDeclarationBlock()
160 SourceMgr.getCharacterData(SortedEnd) - in endUsingDeclarationBlock()
161 SourceMgr.getCharacterData(SortedBegin)); in endUsingDeclarationBlock()
163 StringRef OldText(SourceMgr.getCharacterData(Begin), in endUsingDeclarationBlock()
164 SourceMgr.getCharacterData(End) - in endUsingDeclarationBlock()
165 SourceMgr.getCharacterData(Begin)); in endUsingDeclarationBlock()
169 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, Text)); in endUsingDeclarationBlock()
187 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local
[all …]
H A DWhitespaceManager.h40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager()
93 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile()
97 const SourceManager &SourceMgr;
226 const SourceManager &SourceMgr; variable
H A DAffectedRangeManager.h27 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument
29 : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {} in AffectedRangeManager()
58 const SourceManager &SourceMgr; variable
H A DUnwrappedLineFormatter.h34 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument
37 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter()
69 const SourceManager &SourceMgr; variable
H A DNamespaceEndCommentsFixer.cpp144 const SourceManager &SourceMgr, in addEndComment() argument
148 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, EndCommentText)); in addEndComment()
156 const SourceManager &SourceMgr, in updateEndComment() argument
162 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, EndCommentText)); in updateEndComment()
203 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local
257 updateEndComment(EndCommentPrevTok, std::string(), SourceMgr, &Fixes); in analyze()
284 addEndComment(EndCommentPrevTok, EndCommentText, SourceMgr, &Fixes); in analyze()
287 updateEndComment(EndCommentPrevTok, EndCommentText, SourceMgr, &Fixes); in analyze()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Support/
H A DSourceMgr.cpp40 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
61 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
92 unsigned SourceMgr::SrcBuffer::getLineNumberSpecialized(const char *Ptr) const { in getLineNumberSpecialized()
110 unsigned SourceMgr::SrcBuffer::getLineNumber(const char *Ptr) const { in getLineNumber()
123 const char *SourceMgr::SrcBuffer::getPointerForLineNumberSpecialized( in getPointerForLineNumberSpecialized()
146 SourceMgr::SrcBuffer::getPointerForLineNumber(unsigned LineNo) const { in getPointerForLineNumber()
158 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer()
164 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer()
180 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
204 std::string SourceMgr::getFormattedLocationNoOffset(SMLoc Loc, in getFormattedLocationNoOffset()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/AST/
H A DRawCommentList.cpp109 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument
115 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment()
129 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment()
133 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment()
152 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
159 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
160 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
170 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
284 SourceMgr.getDecomposedLoc(RC.getBeginLoc()); in addComment()
316 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/include/clang/AST/
H A DRawCommentList.h47 RawComment(const SourceManager &SourceMgr, SourceRange SR,
98 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument
102 RawText = getRawTextSlow(SourceMgr); in getRawText()
139 std::string getFormattedText(const SourceManager &SourceMgr,
171 StringRef getRawTextSlow(const SourceManager &SourceMgr) const;
182 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument
198 SourceManager &SourceMgr;
/netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-mca/
H A DCodeRegion.cpp19 CodeRegions::CodeRegions(llvm::SourceMgr &S) : SM(S), FoundErrors(false) { in CodeRegions()
47 SM.PrintMessage(Loc, SourceMgr::DK_Error, in beginRegion()
49 SM.PrintMessage(R.startLoc(), SourceMgr::DK_Note, in beginRegion()
55 SM.PrintMessage(Loc, SourceMgr::DK_Error, in beginRegion()
57 SM.PrintMessage(R.startLoc(), SourceMgr::DK_Note, in beginRegion()
97 SM.PrintMessage(Loc, SourceMgr::DK_Error, in endRegion()
100 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion()
103 SM.PrintMessage(Loc, SourceMgr::DK_Note, in endRegion()
/netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-ml/
H A DDisassembler.cpp34 SourceMgr &SM, raw_ostream &Out, MCStreamer &Streamer, in PrintInsts()
50 SourceMgr::DK_Warning, "invalid instruction encoding"); in PrintInsts()
62 SourceMgr::DK_Warning, in PrintInsts()
96 SourceMgr &SM) { in ByteArrayFromString()
110 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
128 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble()
170 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
197 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-mc/
H A DDisassembler.cpp36 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
53 SourceMgr::DK_Warning, in PrintInsts()
66 SourceMgr::DK_Warning, in PrintInsts()
102 SourceMgr &SM) { in ByteArrayFromString()
116 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
134 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble()
174 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
183 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
201 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Lex/
H A DPPConditionalDirectiveRecord.cpp19 : SourceMgr(SM) { in PPConditionalDirectiveRecord()
29 CondDirectiveLocs, Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective()
33 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective()
38 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective()
53 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc()
58 CondDirectiveLocs, Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc()
66 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc()
70 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
H A DPreprocessingRecord.cpp54 PreprocessingRecord::PreprocessingRecord(SourceManager &SM) : SourceMgr(SM) {} in PreprocessingRecord()
110 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
123 FID, SourceMgr); in isEntityInFileID()
131 FID, SourceMgr); in isEntityInFileID()
139 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow()
145 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow()
171 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange()
212 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity()
229 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity()
243 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity()
[all …]
H A DScratchBuffer.cpp24 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer()
40 SourceMgr.getSLocEntry(SourceMgr.getFileID(BufferStartLoc)) in getToken()
80 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer()
81 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
H A DPPLexerChange.cpp79 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
81 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile()
86 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile()
87 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
115 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer()
267 const FileID &File = SourceMgr.translateFile(UmbrellaHeader.Entry); in diagnoseMissingHeaderInUmbrellaDir()
268 SourceLocation ExpectedHeadersLoc = SourceMgr.getLocForEndOfFile(File); in diagnoseMissingHeaderInUmbrellaDir()
406 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile()
419 (SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid() || in HandleEndOfFile()
426 SourceMgr.local_sloc_entry_size() - in HandleEndOfFile()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/Rewrite/
H A DRewriter.cpp170 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
203 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
209 Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
220 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
234 std::pair<FileID, unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
247 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
263 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
265 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
267 &SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
340 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/Edit/
H A DEditedSource.cpp37 assert(SourceMgr.isMacroArgExpansion(Loc)); in deconstructMacroArgLoc()
39 SourceMgr.getImmediateExpansionRange(Loc).getBegin(); in deconstructMacroArgLoc()
41 SourceMgr.getImmediateExpansionRange(DefArgLoc).getBegin(); in deconstructMacroArgLoc()
43 while (SourceMgr.isMacroBodyExpansion(ExpansionLoc)) in deconstructMacroArgLoc()
45 SourceMgr.getImmediateExpansionRange(ExpansionLoc).getBegin(); in deconstructMacroArgLoc()
47 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc()
48 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc()
52 SourceMgr.getSpellingLoc(DefArgLoc)}; in deconstructMacroArgLoc()
81 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset()
119 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert()
[all …]
H A DCommit.cpp44 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit()
232 const SourceManager &SM = SourceMgr; in canInsert()
255 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken()
256 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken()
262 const SourceManager &SM = SourceMgr; in canInsertAfterToken()
272 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken()
298 const SourceManager &SM = SourceMgr; in canRemoveRange()
332 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText()
342 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
347 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Tooling/Refactoring/Rename/
H A DUSRFindingAction.cpp237 bool FindSymbol(ASTContext &Context, const SourceManager &SourceMgr, in FindSymbol() argument
240 const FileID MainFileID = SourceMgr.getMainFileID(); in FindSymbol()
242 if (SymbolOffset >= SourceMgr.getFileIDSize(MainFileID)) { in FindSymbol()
248 << SourceMgr.getFileEntryForID(MainFileID)->getName() << SymbolOffset; in FindSymbol()
252 const SourceLocation Point = SourceMgr.getLocForStartOfFile(MainFileID) in FindSymbol()
260 FullSourceLoc FullLoc(Point, SourceMgr); in FindSymbol()
290 const SourceManager &SourceMgr = Context.getSourceManager(); in HandleTranslationUnit() local
292 if (!FindSymbol(Context, SourceMgr, Offset, "")) in HandleTranslationUnit()
296 if (!FindSymbol(Context, SourceMgr, 0, QualifiedName)) in HandleTranslationUnit()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/AsmParser/
H A DParser.cpp29 SourceMgr SM; in parseAssemblyInto()
67 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFile()
109 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFileWithIndex()
147 SourceMgr SM; in parseSummaryIndexAssemblyInto()
174 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseSummaryIndexAssemblyFile()
184 SourceMgr SM; in parseConstantValue()
201 SourceMgr SM; in parseType()
205 SourceMgr::DK_Error, "expected end of string"); in parseType()
213 SourceMgr SM; in parseTypeAtBeginning()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Frontend/
H A DVerifyDiagnosticConsumer.cpp861 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument
870 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected()
874 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected()
875 SourceMgr->getFileID(I->first))) in PrintUnexpected()
877 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected()
890 SourceManager &SourceMgr, in PrintExpected() argument
901 OS << "\n File " << SourceMgr.getFilename(D->DiagnosticLoc); in PrintExpected()
905 OS << " Line " << SourceMgr.getPresumedLineNumber(D->DiagnosticLoc); in PrintExpected()
908 << SourceMgr.getFilename(D->DirectiveLoc) << ':' in PrintExpected()
909 << SourceMgr.getPresumedLineNumber(D->DirectiveLoc) << ')'; in PrintExpected()
[all …]

12345678