Home
last modified time | relevance | path

Searched refs:BeginLoc (Results 1 – 25 of 41) sorted by relevance

12

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DUseUncaughtExceptionsCheck.cpp52 SourceLocation BeginLoc; in check() local
58 BeginLoc = C->getBeginLoc(); in check()
61 BeginLoc = E->getBeginLoc(); in check()
65 BeginLoc = D->getBeginLoc(); in check()
71 BeginLoc = U->getNameInfo().getBeginLoc(); in check()
75 auto Diag = diag(BeginLoc, "'std::uncaught_exception' is deprecated, use " in check()
78 if (!BeginLoc.isMacroID()) { in check()
80 Lexer::getSourceText(CharSourceRange::getTokenRange(BeginLoc, EndLoc), in check()
91 Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), in check()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DAvailability.h39 SourceLocation BeginLoc, EndLoc; variable
43 SourceLocation BeginLoc, SourceLocation EndLoc) in AvailabilitySpec() argument
44 : Version(Version), Platform(Platform), BeginLoc(BeginLoc), in AvailabilitySpec()
49 : BeginLoc(StarLoc), EndLoc(StarLoc) {} in AvailabilitySpec()
53 SourceLocation getBeginLoc() const { return BeginLoc; } in getBeginLoc()
H A DDeclarationName.h745 static DeclarationNameLoc makeCXXOperatorNameLoc(SourceLocation BeginLoc, in makeCXXOperatorNameLoc() argument
747 return makeCXXOperatorNameLoc(SourceRange(BeginLoc, EndLoc)); in makeCXXOperatorNameLoc()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaModule.cpp82 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnGlobalModuleFragmentDecl()
134 ModuleScopes.back().BeginLoc = StartOfTU; in HandleStartOfHeaderUnit()
232 SourceLocation BeginLoc = in ActOnModuleDecl() local
235 : ModuleScopes.back().BeginLoc; in ActOnModuleDecl()
236 if (BeginLoc.isValid()) { in ActOnModuleDecl()
328 ModuleScopes.back().BeginLoc = StartLoc; in ActOnModuleDecl()
388 Diag(ModuleScopes.back().BeginLoc, in ActOnPrivateModuleFragmentDecl()
410 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnPrivateModuleFragmentDecl()
726 Diag(ModuleScopes.back().BeginLoc, in ActOnStartExportDecl()
927 BeginLoc, getCurrentModule()); in PushGlobalModuleFragment()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/
H A DAvoidCStyleCastsCheck.cpp78 SourceLocation BeginLoc; in getDestTypeString() local
82 BeginLoc = CastExpr->getLParenLoc().getLocWithOffset(1); in getDestTypeString()
85 BeginLoc = CastExpr->getBeginLoc(); in getDestTypeString()
90 return Lexer::getSourceText(CharSourceRange::getTokenRange(BeginLoc, EndLoc), in getDestTypeString()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DArgumentCommentCheck.cpp86 std::pair<FileID, unsigned> BeginLoc = SM.getDecomposedLoc(Range.getBegin()), in getCommentsInRange() local
89 if (BeginLoc.first != EndLoc.first) in getCommentsInRange()
93 StringRef Buffer = SM.getBufferData(BeginLoc.first, &Invalid); in getCommentsInRange()
97 const char *StrData = Buffer.data() + BeginLoc.second; in getCommentsInRange()
99 Lexer TheLexer(SM.getLocForStartOfFile(BeginLoc.first), Ctx->getLangOpts(), in getCommentsInRange()
113 assert(CommentLoc.first == BeginLoc.first); in getCommentsInRange()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DQualifiedAutoCheck.cpp41 SourceLocation BeginLoc = Decl->getQualifierLoc().getBeginLoc(); in findQualToken() local
42 if (BeginLoc.isInvalid()) in findQualToken()
43 BeginLoc = Decl->getBeginLoc(); in findQualToken()
47 CharSourceRange::getCharRange(BeginLoc, EndLoc), *Result.SourceManager, in findQualToken()
/llvm-project-15.0.7/clang/unittests/Basic/
H A DSourceManagerTest.cpp249 auto BeginLoc = SourceMgr.getLocForStartOfFile(MainFileID); in TEST_F() local
256 EXPECT_EQ(BeginLoc.printToString(SourceMgr), "/mainFile.cpp:1:1"); in TEST_F()
262 EXPECT_EQ(SourceRange(BeginLoc, BeginLoc).printToString(SourceMgr), in TEST_F()
264 EXPECT_EQ(SourceRange(BeginLoc, BeginEOLLoc).printToString(SourceMgr), in TEST_F()
266 EXPECT_EQ(SourceRange(BeginLoc, EndLoc).printToString(SourceMgr), in TEST_F()
268 EXPECT_EQ(SourceRange(BeginLoc, HeaderLoc).printToString(SourceMgr), in TEST_F()
H A DSarifTest.cpp75 auto BeginLoc = SourceMgr.translateLineCol(FID, Begin.first, Begin.second); in getFakeCharSourceRange() local
77 return CharSourceRange{SourceRange{BeginLoc, EndLoc}, /* ITR = */ false}; in getFakeCharSourceRange()
/llvm-project-15.0.7/clang/lib/Lex/
H A DPreprocessingRecord.cpp255 SourceLocation BeginLoc = Entity->getSourceRange().getBegin(); in addPreprocessedEntity() local
260 BeginLoc, in addPreprocessedEntity()
269 !SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
297 if (!SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
307 llvm::upper_bound(PreprocessedEntities, BeginLoc, in addPreprocessedEntity()
H A DPragma.cpp1676 SourceLocation BeginLoc = Tok.getLocation(); in HandlePragma() local
1718 PP.Diag(BeginLoc, diag::note_pp_module_begin_here) in HandlePragma()
1724 PP.EnterSubmodule(M, BeginLoc, /*ForPragma*/true); in HandlePragma()
1835 SourceLocation BeginLoc = PP.getPragmaARCCFCodeAuditedInfo().second; in HandlePragma() local
1842 if (BeginLoc.isValid()) { in HandlePragma()
1844 PP.Diag(BeginLoc, diag::note_pragma_entered_here); in HandlePragma()
1849 if (!BeginLoc.isValid()) { in HandlePragma()
1890 SourceLocation BeginLoc = PP.getPragmaAssumeNonNullLoc(); in HandlePragma() local
1898 if (BeginLoc.isValid()) { in HandlePragma()
1900 PP.Diag(BeginLoc, diag::note_pragma_entered_here); in HandlePragma()
[all …]
/llvm-project-15.0.7/clang/lib/Tooling/Syntax/
H A DTokens.cpp243 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() argument
245 assert(BeginLoc.isValid()); in FileRange()
246 assert(BeginLoc.isFileID()); in FileRange()
248 std::tie(File, Begin) = SM.getDecomposedLoc(BeginLoc); in FileRange()
251 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() argument
253 assert(BeginLoc.isValid()); in FileRange()
254 assert(BeginLoc.isFileID()); in FileRange()
257 assert(SM.getFileID(BeginLoc) == SM.getFileID(EndLoc)); in FileRange()
258 assert(SM.getFileOffset(BeginLoc) <= SM.getFileOffset(EndLoc)); in FileRange()
260 std::tie(File, Begin) = SM.getDecomposedLoc(BeginLoc); in FileRange()
/llvm-project-15.0.7/clang/include/clang/Tooling/Refactoring/
H A DRecursiveSymbolVisitor.h140 bool visit(const NamedDecl *ND, SourceLocation BeginLoc, in visit() argument
143 ND, SourceRange(BeginLoc, EndLoc)); in visit()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRLocFinder.cpp89 const SourceLocation BeginLoc = Loc; in checkAndAddLocation() local
91 BeginLoc, 0, Context.getSourceManager(), Context.getLangOpts()); in checkAndAddLocation()
93 Lexer::getSourceText(CharSourceRange::getTokenRange(BeginLoc, EndLoc), in checkAndAddLocation()
101 BeginLoc.getLocWithOffset(Offset)); in checkAndAddLocation()
/llvm-project-15.0.7/clang/include/clang/Tooling/Syntax/
H A DTokens.h55 FileRange(const SourceManager &SM, SourceLocation BeginLoc, unsigned Length);
58 FileRange(const SourceManager &SM, SourceLocation BeginLoc,
/llvm-project-15.0.7/clang-tools-extra/clang-apply-replacements/lib/Tooling/
H A DApplyReplacements.cpp212 const SourceLocation BeginLoc = in mergeAndDeduplicate() local
217 FileChange.replace(SM, BeginLoc.getLocWithOffset(R.getOffset()), in mergeAndDeduplicate()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/
H A DClangTidy.cpp286 SourceLocation BeginLoc = getLocation(AbsoluteFilePath, Range.FileOffset); in getRange() local
287 SourceLocation EndLoc = BeginLoc.getLocWithOffset(Range.Length); in getRange()
291 return CharSourceRange::getCharRange(BeginLoc, EndLoc); in getRange()
/llvm-project-15.0.7/clang-tools-extra/clang-include-fixer/
H A DIncludeFixer.cpp258 auto CreateToolingRange = [&QueryString, &SM](SourceLocation BeginLoc) { in CorrectTypo() argument
259 return tooling::Range(SM.getDecomposedLoc(BeginLoc).second, in CorrectTypo()
/llvm-project-15.0.7/clang-tools-extra/modularize/
H A DPreprocessorTracker.cpp304 clang::SourceLocation BeginLoc = Range.getBegin(); in getSourceString() local
306 const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc); in getSourceString()
381 clang::SourceLocation BeginLoc(Range.getBegin()); in getMacroUnexpandedString() local
382 const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc); in getMacroUnexpandedString()
/llvm-project-15.0.7/clang/lib/ExtractAPI/Serialization/
H A DSymbolGraphSerializer.cpp127 Object serializeSourceRange(const PresumedLoc &BeginLoc, in serializeSourceRange() argument
130 serializeObject(SourceRange, "start", serializeSourcePosition(BeginLoc)); in serializeSourceRange()
/llvm-project-15.0.7/clang/lib/Parse/
H A DParser.cpp1758 SourceLocation BeginLoc = NameLoc; in TryAnnotateName() local
1760 BeginLoc = SS.getBeginLoc(); in TryAnnotateName()
1784 Tok.setLocation(BeginLoc); in TryAnnotateName()
2027 SourceLocation BeginLoc = Tok.getLocation(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec() local
2029 BeginLoc = SS.getBeginLoc(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
2054 Tok.setLocation(BeginLoc); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
/llvm-project-15.0.7/clang/lib/AST/
H A DStmt.cpp728 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
735 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
764 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
771 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DFindSymbols.cpp225 SourceLocation BeginLoc = SM.getSpellingLoc(SM.getFileLoc(ND.getBeginLoc())); in declToSym() local
228 toHalfOpenFileRange(SM, Ctx.getLangOpts(), {BeginLoc, EndLoc}); in declToSym()
H A DSourceCode.cpp293 static SourceLocation getLocForTokenEnd(SourceLocation BeginLoc, in getLocForTokenEnd() argument
296 unsigned Len = getTokenLengthAtLoc(BeginLoc, SM, LangOpts); in getLocForTokenEnd()
297 return BeginLoc.getLocWithOffset(Len ? Len - 1 : 0); in getLocForTokenEnd()
/llvm-project-15.0.7/clang/lib/Tooling/ASTDiff/
H A DASTDiff.cpp997 SourceLocation BeginLoc = Range.getBegin(); in getSourceRangeOffsets() local
1002 EndLoc = BeginLoc; in getSourceRangeOffsets()
1004 unsigned Begin = SrcMgr.getFileOffset(SrcMgr.getExpansionLoc(BeginLoc)); in getSourceRangeOffsets()

12