Home
last modified time | relevance | path

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

12

/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
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()
/external/llvm-project/clang/include/clang/AST/
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()
/external/llvm-project/clang/lib/Sema/
DSemaModule.cpp65 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnGlobalModuleFragmentDecl()
77 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnGlobalModuleFragmentDecl()
148 SourceLocation BeginLoc = in ActOnModuleDecl() local
151 : ModuleScopes.back().BeginLoc; in ActOnModuleDecl()
152 if (BeginLoc.isValid()) { in ActOnModuleDecl()
153 Diag(BeginLoc, diag::note_global_module_introducer_missing) in ActOnModuleDecl()
154 << FixItHint::CreateInsertion(BeginLoc, "module;\n"); in ActOnModuleDecl()
229 ModuleScopes.back().BeginLoc = StartLoc; in ActOnModuleDecl()
260 Diag(ModuleScopes.back().BeginLoc, diag::note_previous_definition); in ActOnPrivateModuleFragmentDecl()
269 Diag(ModuleScopes.back().BeginLoc, in ActOnPrivateModuleFragmentDecl()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DArgumentCommentCheck.cpp82 std::pair<FileID, unsigned> BeginLoc = SM.getDecomposedLoc(Range.getBegin()), in getCommentsInRange() local
85 if (BeginLoc.first != EndLoc.first) in getCommentsInRange()
89 StringRef Buffer = SM.getBufferData(BeginLoc.first, &Invalid); in getCommentsInRange()
93 const char *StrData = Buffer.data() + BeginLoc.second; in getCommentsInRange()
95 Lexer TheLexer(SM.getLocForStartOfFile(BeginLoc.first), Ctx->getLangOpts(), in getCommentsInRange()
109 assert(CommentLoc.first == BeginLoc.first); in getCommentsInRange()
/external/llvm-project/clang/unittests/Basic/
DSourceManagerTest.cpp182 auto BeginLoc = SourceMgr.getLocForStartOfFile(MainFileID); in TEST_F() local
189 EXPECT_EQ(BeginLoc.printToString(SourceMgr), "/mainFile.cpp:1:1"); in TEST_F()
195 EXPECT_EQ(SourceRange(BeginLoc, BeginLoc).printToString(SourceMgr), in TEST_F()
197 EXPECT_EQ(SourceRange(BeginLoc, BeginEOLLoc).printToString(SourceMgr), in TEST_F()
199 EXPECT_EQ(SourceRange(BeginLoc, EndLoc).printToString(SourceMgr), in TEST_F()
201 EXPECT_EQ(SourceRange(BeginLoc, HeaderLoc).printToString(SourceMgr), in TEST_F()
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
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()
/external/llvm-project/clang/lib/Tooling/Syntax/
DTokens.cpp148 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() argument
150 assert(BeginLoc.isValid()); in FileRange()
151 assert(BeginLoc.isFileID()); in FileRange()
153 std::tie(File, Begin) = SM.getDecomposedLoc(BeginLoc); in FileRange()
156 FileRange::FileRange(const SourceManager &SM, SourceLocation BeginLoc, in FileRange() argument
158 assert(BeginLoc.isValid()); in FileRange()
159 assert(BeginLoc.isFileID()); in FileRange()
162 assert(SM.getFileID(BeginLoc) == SM.getFileID(EndLoc)); in FileRange()
163 assert(SM.getFileOffset(BeginLoc) <= SM.getFileOffset(EndLoc)); in FileRange()
165 std::tie(File, Begin) = SM.getDecomposedLoc(BeginLoc); in FileRange()
/external/clang/lib/Lex/
DPreprocessingRecord.cpp247 SourceLocation BeginLoc = Entity->getSourceRange().getBegin(); in addPreprocessedEntity() local
252 BeginLoc, in addPreprocessedEntity()
261 !SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
289 if (!SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
300 BeginLoc, in addPreprocessedEntity()
DPragma.cpp1350 SourceLocation BeginLoc = PP.getPragmaARCCFCodeAuditedLoc(); in HandlePragma() local
1357 if (BeginLoc.isValid()) { in HandlePragma()
1359 PP.Diag(BeginLoc, diag::note_pragma_entered_here); in HandlePragma()
1364 if (!BeginLoc.isValid()) { in HandlePragma()
1404 SourceLocation BeginLoc = PP.getPragmaAssumeNonNullLoc(); in HandlePragma() local
1411 if (BeginLoc.isValid()) { in HandlePragma()
1413 PP.Diag(BeginLoc, diag::note_pragma_entered_here); in HandlePragma()
1418 if (!BeginLoc.isValid()) { in HandlePragma()
/external/llvm-project/clang/lib/Lex/
DPreprocessingRecord.cpp254 SourceLocation BeginLoc = Entity->getSourceRange().getBegin(); in addPreprocessedEntity() local
259 BeginLoc, in addPreprocessedEntity()
268 !SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
296 if (!SourceMgr.isBeforeInTranslationUnit(BeginLoc, in addPreprocessedEntity()
306 llvm::upper_bound(PreprocessedEntities, BeginLoc, in addPreprocessedEntity()
DPragma.cpp1592 SourceLocation BeginLoc = Tok.getLocation(); in HandlePragma() local
1634 PP.Diag(BeginLoc, diag::note_pp_module_begin_here) in HandlePragma()
1640 PP.EnterSubmodule(M, BeginLoc, /*ForPragma*/true); in HandlePragma()
1641 PP.EnterAnnotationToken(SourceRange(BeginLoc, ModuleName.back().second), in HandlePragma()
1751 SourceLocation BeginLoc = PP.getPragmaARCCFCodeAuditedInfo().second; in HandlePragma() local
1758 if (BeginLoc.isValid()) { in HandlePragma()
1760 PP.Diag(BeginLoc, diag::note_pragma_entered_here); in HandlePragma()
1765 if (!BeginLoc.isValid()) { in HandlePragma()
1806 SourceLocation BeginLoc = PP.getPragmaAssumeNonNullLoc(); in HandlePragma() local
1814 if (BeginLoc.isValid()) { in HandlePragma()
[all …]
/external/llvm-project/clang/include/clang/Tooling/Refactoring/
DRecursiveSymbolVisitor.h129 bool visit(const NamedDecl *ND, SourceLocation BeginLoc, in visit() argument
132 ND, SourceRange(BeginLoc, EndLoc)); in visit()
/external/llvm-project/clang/lib/Tooling/Refactoring/Rename/
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()
/external/llvm-project/clang/include/clang/Tooling/Syntax/
DTokens.h55 FileRange(const SourceManager &SM, SourceLocation BeginLoc, unsigned Length);
58 FileRange(const SourceManager &SM, SourceLocation BeginLoc,
/external/llvm-project/clang-tools-extra/clang-apply-replacements/lib/Tooling/
DApplyReplacements.cpp207 const SourceLocation BeginLoc = in mergeAndDeduplicate() local
212 FileChange.replace(SM, BeginLoc.getLocWithOffset(R.getOffset()), in mergeAndDeduplicate()
/external/llvm-project/clang-tools-extra/clangd/
DFindSymbols.cpp174 SourceLocation BeginLoc = SM.getSpellingLoc(SM.getFileLoc(ND.getBeginLoc())); in declToSym() local
177 toHalfOpenFileRange(SM, Ctx.getLangOpts(), {BeginLoc, EndLoc}); in declToSym()
DSourceCode.cpp296 static SourceLocation getLocForTokenEnd(SourceLocation BeginLoc, in getLocForTokenEnd() argument
299 unsigned Len = getTokenLengthAtLoc(BeginLoc, SM, LangOpts); in getLocForTokenEnd()
300 return BeginLoc.getLocWithOffset(Len ? Len - 1 : 0); in getLocForTokenEnd()
/external/llvm-project/clang-tools-extra/clang-include-fixer/
DIncludeFixer.cpp258 auto CreateToolingRange = [&QueryString, &SM](SourceLocation BeginLoc) { in CorrectTypo() argument
259 return tooling::Range(SM.getDecomposedLoc(BeginLoc).second, in CorrectTypo()
/external/clang/lib/Parse/
DParser.cpp1479 SourceLocation BeginLoc = NameLoc; in TryAnnotateName() local
1481 BeginLoc = SS.getBeginLoc(); in TryAnnotateName()
1503 Tok.setLocation(BeginLoc); in TryAnnotateName()
1711 SourceLocation BeginLoc = Tok.getLocation(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec() local
1713 BeginLoc = SS.getBeginLoc(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
1736 Tok.setLocation(BeginLoc); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
/external/llvm-project/clang-tools-extra/modularize/
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()
/external/clang/lib/AST/
DStmt.cpp595 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
602 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
631 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
638 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
/external/llvm-project/clang/lib/Parse/
DParser.cpp1698 SourceLocation BeginLoc = NameLoc; in TryAnnotateName() local
1700 BeginLoc = SS.getBeginLoc(); in TryAnnotateName()
1724 Tok.setLocation(BeginLoc); in TryAnnotateName()
1962 SourceLocation BeginLoc = Tok.getLocation(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec() local
1964 BeginLoc = SS.getBeginLoc(); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
1989 Tok.setLocation(BeginLoc); in TryAnnotateTypeOrScopeTokenAfterScopeSpec()
/external/llvm-project/clang/lib/AST/
DStmt.cpp716 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
723 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
752 SourceLocation BeginLoc = getAsmString()->getLocationOfByte( in AnalyzeAsmString() local
759 Pieces.emplace_back(N, std::move(Str), BeginLoc, EndLoc); in AnalyzeAsmString()
/external/llvm-project/clang/lib/Tooling/ASTDiff/
DASTDiff.cpp997 SourceLocation BeginLoc = Range.getBegin(); in getSourceRangeOffsets() local
1002 EndLoc = BeginLoc; in getSourceRangeOffsets()
1004 unsigned Begin = SrcMgr.getFileOffset(SrcMgr.getExpansionLoc(BeginLoc)); in getSourceRangeOffsets()
/external/clang/lib/Sema/
DSemaCast.cpp828 SourceLocation BeginLoc = OpRange.getBegin(); in DiagnoseReinterpretUpDownCast() local
829 Self.Diag(BeginLoc, diag::warn_reinterpret_different_from_static) in DiagnoseReinterpretUpDownCast()
832 Self.Diag(BeginLoc, diag::note_reinterpret_updowncast_use_static) in DiagnoseReinterpretUpDownCast()
834 << FixItHint::CreateReplacement(BeginLoc, "static_cast"); in DiagnoseReinterpretUpDownCast()

12