| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | UseUncaughtExceptionsCheck.cpp | 52 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 D | Availability.h | 39 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 D | DeclarationName.h | 745 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 D | SemaModule.cpp | 82 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 D | AvoidCStyleCastsCheck.cpp | 78 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 D | ArgumentCommentCheck.cpp | 86 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 D | QualifiedAutoCheck.cpp | 41 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 D | SourceManagerTest.cpp | 249 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 D | SarifTest.cpp | 75 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 D | PreprocessingRecord.cpp | 255 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 D | Pragma.cpp | 1676 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 D | Tokens.cpp | 243 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 D | RecursiveSymbolVisitor.h | 140 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 D | USRLocFinder.cpp | 89 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 D | Tokens.h | 55 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 D | ApplyReplacements.cpp | 212 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 D | ClangTidy.cpp | 286 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 D | IncludeFixer.cpp | 258 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 D | PreprocessorTracker.cpp | 304 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 D | SymbolGraphSerializer.cpp | 127 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 D | Parser.cpp | 1758 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 D | Stmt.cpp | 728 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 D | FindSymbols.cpp | 225 SourceLocation BeginLoc = SM.getSpellingLoc(SM.getFileLoc(ND.getBeginLoc())); in declToSym() local 228 toHalfOpenFileRange(SM, Ctx.getLangOpts(), {BeginLoc, EndLoc}); in declToSym()
|
| H A D | SourceCode.cpp | 293 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 D | ASTDiff.cpp | 997 SourceLocation BeginLoc = Range.getBegin(); in getSourceRangeOffsets() local 1002 EndLoc = BeginLoc; in getSourceRangeOffsets() 1004 unsigned Begin = SrcMgr.getFileOffset(SrcMgr.getExpansionLoc(BeginLoc)); in getSourceRangeOffsets()
|