Home
last modified time | relevance | path

Searched refs:DeclLoc (Results 1 – 21 of 21) sorted by relevance

/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DDefineInline.cpp99 SourceLocation DeclLoc = D->getLocation(); in checkDeclsAreVisible() local
102 if (!SM.isWrittenInSameFile(DeclLoc, TargetLoc)) in checkDeclsAreVisible()
106 if (SM.isBeforeInTranslationUnit(DeclLoc, TargetLoc)) in checkDeclsAreVisible()
/llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/
H A DTransfer.cpp113 auto *DeclLoc = Env.getStorageLocation(*S->getDecl(), SkipPast::None); in VisitDeclRefExpr() local
114 if (DeclLoc == nullptr) in VisitDeclRefExpr()
118 Env.setStorageLocation(*S, *DeclLoc); in VisitDeclRefExpr()
121 auto &Val = Env.takeOwnership(std::make_unique<ReferenceValue>(*DeclLoc)); in VisitDeclRefExpr()
/llvm-project-15.0.7/clang/lib/Frontend/Rewrite/
H A DRewriteObjC.cpp2205 SourceLocation DeclLoc = ND->getTypeSpecStartLoc(); in RewriteTypeOfDecl() local
3921 SourceLocation DeclLoc = FD->getLocation(); in RewriteBlockPointerFunctionArgs() local
3932 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf); in RewriteBlockPointerFunctionArgs()
3933 assert((DeclLoc.isValid()) && "Invalid DeclLoc"); in RewriteBlockPointerFunctionArgs()
3941 DeclLoc = DeclLoc.getLocWithOffset(argPtr-startArgList); in RewriteBlockPointerFunctionArgs()
3942 ReplaceText(DeclLoc, 1, "*"); in RewriteBlockPointerFunctionArgs()
4022 SourceLocation DeclLoc = ND->getLocation(); in RewriteBlockPointerDecl() local
4061 DeclLoc = ND->getLocation(); in RewriteBlockPointerDecl()
4062 startBuf = SM->getCharacterData(DeclLoc); in RewriteBlockPointerDecl()
4173 if (DeclLoc.isInvalid()) in RewriteByRefVar()
[all …]
H A DRewriteModernObjC.cpp4768 SourceLocation DeclLoc = FD->getLocation(); in RewriteBlockPointerFunctionArgs() local
4779 DeclLoc = DeclLoc.getLocWithOffset(startArgList-startBuf); in RewriteBlockPointerFunctionArgs()
4788 DeclLoc = DeclLoc.getLocWithOffset(argPtr-startArgList); in RewriteBlockPointerFunctionArgs()
4789 ReplaceText(DeclLoc, 1, "*"); in RewriteBlockPointerFunctionArgs()
4869 SourceLocation DeclLoc = ND->getLocation(); in RewriteBlockPointerDecl() local
4908 DeclLoc = ND->getLocation(); in RewriteBlockPointerDecl()
4909 startBuf = SM->getCharacterData(DeclLoc); in RewriteBlockPointerDecl()
5017 if (DeclLoc.isInvalid()) in RewriteByRefVar()
5020 DeclLoc = ND->getLocation(); in RewriteByRefVar()
5116 DeclLoc = ND->getLocation(); in RewriteByRefVar()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DSourceCodeTests.cpp583 auto DeclLoc = [&AST](llvm::StringRef Name) { in TEST() local
587 EXPECT_FALSE(isInsideMainFile(DeclLoc(HeaderDecl), SM)) << HeaderDecl; in TEST()
590 EXPECT_TRUE(isInsideMainFile(DeclLoc(MainDecl), SM)) << MainDecl; in TEST()
593 EXPECT_TRUE(isInsideMainFile(SM.getSpellingLoc(DeclLoc("Main4")), SM)); in TEST()
/llvm-project-15.0.7/clang-tools-extra/clangd/index/
H A DSymbolCollector.cpp759 if (auto DeclLoc = getTokenLocation(DefLoc)) in handleMacroOccurrence() local
760 S.CanonicalDeclaration = *DeclLoc; in handleMacroOccurrence()
899 if (auto DeclLoc = getTokenLocation(Loc)) in addDeclaration() local
900 S.CanonicalDeclaration = *DeclLoc; in addDeclaration()
/llvm-project-15.0.7/clang/tools/libclang/
H A DCXIndexDataConsumer.cpp26 SourceLocation DeclLoc; member in __anond6d661a80111::IndexingDeclVisitor
32 : DataConsumer(dataConsumer), DeclLoc(Loc), LexicalDC(lexicalDC) { } in IndexingDeclVisitor()
95 DataConsumer.handleSynthesizedObjCMethod(D, DeclLoc, LexicalDC); in VisitObjCMethodDecl()
97 DataConsumer.handleObjCMethod(D, DeclLoc); in VisitObjCMethodDecl()
/llvm-project-15.0.7/clang-tools-extra/clang-change-namespace/
H A DChangeNamespace.cpp273 SourceLocation DeclLoc = SM.getSpellingLoc(D->getBeginLoc()); in isDeclVisibleAtLocation() local
275 return SM.isBeforeInTranslationUnit(DeclLoc, Loc) && in isDeclVisibleAtLocation()
276 (SM.getFileID(DeclLoc) == SM.getFileID(Loc) && in isDeclVisibleAtLocation()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DXRefs.cpp319 auto DeclLoc = in findImplementors() local
321 if (!DeclLoc) { in findImplementors()
322 elog("Find overrides: {0}", DeclLoc.takeError()); in findImplementors()
327 Results.back().PreferredDeclaration = *DeclLoc; in findImplementors()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaInit.cpp3953 ResolveConstructorOverload(Sema &S, SourceLocation DeclLoc, in ResolveConstructorOverload() argument
4056 return CandidateSet.BestViableFunction(S, DeclLoc, Best); in ResolveConstructorOverload()
4332 SourceLocation DeclLoc = Initializer->getBeginLoc(); in TryReferenceListInitialization() local
4334 = S.CompareReferenceRelationship(DeclLoc, cv1T1, cv2T2); in TryReferenceListInitialization()
4684 SourceLocation DeclLoc = Initializer->getBeginLoc(); in TryRefInitWithConversionFunction() local
4689 = CandidateSet.BestViableFunction(S, DeclLoc, Best)) in TryRefInitWithConversionFunction()
4720 S.CompareReferenceRelationship(DeclLoc, T1, cv3T3, &RefConv); in TryRefInitWithConversionFunction()
4816 SourceLocation DeclLoc = Initializer->getBeginLoc(); in TryReferenceInitializationCore() local
5308 SourceLocation DeclLoc = Initializer->getBeginLoc(); in TryUserDefinedConversion() local
5316 if (S.isCompleteType(DeclLoc, SourceType)) { in TryUserDefinedConversion()
[all …]
H A DSemaType.cpp1263 SourceLocation DeclLoc = declarator.getIdentifierLoc(); in ConvertDeclSpecToType() local
1264 if (DeclLoc.isInvalid()) in ConvertDeclSpecToType()
1265 DeclLoc = DS.getBeginLoc(); in ConvertDeclSpecToType()
1342 S.Diag(DeclLoc, diag::warn_missing_type_specifier) in ConvertDeclSpecToType()
1351 S.Diag(DeclLoc, diag::err_missing_type_specifier) in ConvertDeclSpecToType()
1360 S.Diag(DeclLoc, diag::err_missing_actual_pipe_type) in ConvertDeclSpecToType()
1366 S.Diag(DeclLoc, diag::ext_missing_type_specifier) in ConvertDeclSpecToType()
1879 QualType Qualified = S.BuildQualifiedType(Result, DeclLoc, TypeQuals, &DS); in ConvertDeclSpecToType()
H A DSemaDeclObjC.cpp4127 SourceLocation DeclLoc(IDecl->getLocation()); in ActOnAtEnd() local
4128 SourceLocation SuperClassLoc(getLocForEndOfToken(DeclLoc)); in ActOnAtEnd()
4129 Diag(DeclLoc, diag::warn_objc_root_class_missing) in ActOnAtEnd()
4135 DeclLoc, LookupOrdinaryName); in ActOnAtEnd()
H A DSemaOverload.cpp4620 QualType DeclType, SourceLocation DeclLoc, in FindConversionForRefInit() argument
4627 DeclLoc, OverloadCandidateSet::CSK_InitByUserDefinedConversion); in FindConversionForRefInit()
4655 DeclLoc, in FindConversionForRefInit()
4688 switch (CandidateSet.BestViableFunction(S, DeclLoc, Best)) { in FindConversionForRefInit()
4737 SourceLocation DeclLoc, in TryReferenceInit() argument
4765 S.CompareReferenceRelationship(DeclLoc, T1, T2, &RefConv); in TryReferenceInit()
4835 S.isCompleteType(DeclLoc, T2) && in TryReferenceInit()
4837 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc, in TryReferenceInit()
4883 T2->isRecordType() && S.isCompleteType(DeclLoc, T2) && in TryReferenceInit()
4884 FindConversionForRefInit(S, ICS, DeclType, DeclLoc, in TryReferenceInit()
H A DSemaLookup.cpp5684 SourceLocation DeclLoc, in diagnoseMissingImport() argument
5693 Diag(DeclLoc, diag::note_unreachable_entity) << (int)MIK; in diagnoseMissingImport()
5709 PP.getHeaderToIncludeForDiagnostics(UseLoc, DeclLoc)) { in diagnoseMissingImport()
H A DSemaTemplate.cpp3112 SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, in MatchTemplateParametersToScopeSpecifier() argument
3224 Diag(DeclLoc, diag::err_specialize_member_of_template) in MatchTemplateParametersToScopeSpecifier()
3247 Diag(DeclLoc, diag::err_template_spec_needs_header) in MatchTemplateParametersToScopeSpecifier()
3394 Diag(DeclLoc, diag::err_template_spec_needs_template_parameters) in MatchTemplateParametersToScopeSpecifier()
H A DSemaDecl.cpp17848 void Sema::ActOnLastBitfield(SourceLocation DeclLoc, in ActOnLastBitfield() argument
17870 Expr * BW = IntegerLiteral::Create(Context, Zero, Context.IntTy, DeclLoc); in ActOnLastBitfield()
17873 DeclLoc, DeclLoc, nullptr, in ActOnLastBitfield()
17876 DeclLoc), in ActOnLastBitfield()
/llvm-project-15.0.7/clang/lib/AST/
H A DASTContext.cpp183 const SourceLocation DeclLoc = D->getLocation(); in getDeclLocForCommentSearch() local
184 if (DeclLoc.isMacroID()) { in getDeclLocForCommentSearch()
198 if (SourceMgr.isMacroArgExpansion(DeclLoc) && TD->isCompleteDefinition()) in getDeclLocForCommentSearch()
199 return SourceMgr.getExpansionLoc(DeclLoc); in getDeclLocForCommentSearch()
203 return DeclLoc; in getDeclLocForCommentSearch()
285 const SourceLocation DeclLoc = getDeclLocForCommentSearch(D, SourceMgr); in getRawCommentForDeclNoCache() local
289 if (DeclLoc.isInvalid() || !DeclLoc.isFileID()) in getRawCommentForDeclNoCache()
300 const FileID File = SourceMgr.getDecomposedLoc(DeclLoc).first; in getRawCommentForDeclNoCache()
305 return getRawCommentForDeclNoCacheImpl(D, DeclLoc, *CommentsInThisFile); in getRawCommentForDeclNoCache()
520 const SourceLocation DeclLoc = getDeclLocForCommentSearch(D, SourceMgr); in attachCommentsToJustParsedDecls() local
[all …]
H A DExprConstant.cpp15159 SourceLocation DeclLoc = VD->getLocation(); in EvaluateAsInitializer() local
15182 return CheckConstantExpression(Info, DeclLoc, DeclTy, Value, in EvaluateAsInitializer()
/llvm-project-15.0.7/clang/lib/Parse/
H A DParseExprCXX.cpp215 SourceLocation DeclLoc = Tok.getLocation(); in ParseOptionalCXXScopeSpecifier() local
223 AnnotateExistingDecltypeSpecifier(DS, DeclLoc, EndLoc); in ParseOptionalCXXScopeSpecifier()
228 SS.SetInvalid(SourceRange(DeclLoc, CCLoc)); in ParseOptionalCXXScopeSpecifier()
/llvm-project-15.0.7/clang/lib/Serialization/
H A DASTReaderDecl.cpp3536 SourceLocation DeclLoc; in ReadDeclRecord() local
3537 RecordLocation Loc = DeclCursorForID(ID, DeclLoc); in ReadDeclRecord()
3556 ASTDeclReader Reader(*this, Record, Loc, ID, DeclLoc); in ReadDeclRecord()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DSema.h3164 SourceLocation DeclLoc, ArrayRef<Module *> Modules,
7897 SourceLocation DeclStartLoc, SourceLocation DeclLoc,