This revision was automatically updated to reflect the committed changes. Closed by commit rL372888: [clangd] Change constness of parameters to findExplicitRefs (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D68027?vs=221767&id=221782#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68027/new/ https://reviews.llvm.org/D68027 Files: clang-tools-extra/trunk/clangd/FindTarget.cpp clang-tools-extra/trunk/clangd/FindTarget.h Index: clang-tools-extra/trunk/clangd/FindTarget.h =================================================================== --- clang-tools-extra/trunk/clangd/FindTarget.h +++ clang-tools-extra/trunk/clangd/FindTarget.h @@ -101,9 +101,9 @@ /// qualifiers. /// FIXME: currently this does not report references to overloaded operators. /// FIXME: extend to report location information about declaration names too. -void findExplicitReferences(Stmt *S, +void findExplicitReferences(const Stmt *S, llvm::function_ref<void(ReferenceLoc)> Out); -void findExplicitReferences(Decl *D, +void findExplicitReferences(const Decl *D, llvm::function_ref<void(ReferenceLoc)> Out); /// Similar to targetDecl(), however instead of applying a filter, all possible Index: clang-tools-extra/trunk/clangd/FindTarget.cpp =================================================================== --- clang-tools-extra/trunk/clangd/FindTarget.cpp +++ clang-tools-extra/trunk/clangd/FindTarget.cpp @@ -616,15 +616,15 @@ }; } // namespace -void findExplicitReferences(Stmt *S, +void findExplicitReferences(const Stmt *S, llvm::function_ref<void(ReferenceLoc)> Out) { assert(S); - ExplicitReferenceColletor(Out).TraverseStmt(S); + ExplicitReferenceColletor(Out).TraverseStmt(const_cast<Stmt *>(S)); } -void findExplicitReferences(Decl *D, +void findExplicitReferences(const Decl *D, llvm::function_ref<void(ReferenceLoc)> Out) { assert(D); - ExplicitReferenceColletor(Out).TraverseDecl(D); + ExplicitReferenceColletor(Out).TraverseDecl(const_cast<Decl *>(D)); } llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, DeclRelation R) {
Index: clang-tools-extra/trunk/clangd/FindTarget.h =================================================================== --- clang-tools-extra/trunk/clangd/FindTarget.h +++ clang-tools-extra/trunk/clangd/FindTarget.h @@ -101,9 +101,9 @@ /// qualifiers. /// FIXME: currently this does not report references to overloaded operators. /// FIXME: extend to report location information about declaration names too. -void findExplicitReferences(Stmt *S, +void findExplicitReferences(const Stmt *S, llvm::function_ref<void(ReferenceLoc)> Out); -void findExplicitReferences(Decl *D, +void findExplicitReferences(const Decl *D, llvm::function_ref<void(ReferenceLoc)> Out); /// Similar to targetDecl(), however instead of applying a filter, all possible Index: clang-tools-extra/trunk/clangd/FindTarget.cpp =================================================================== --- clang-tools-extra/trunk/clangd/FindTarget.cpp +++ clang-tools-extra/trunk/clangd/FindTarget.cpp @@ -616,15 +616,15 @@ }; } // namespace -void findExplicitReferences(Stmt *S, +void findExplicitReferences(const Stmt *S, llvm::function_ref<void(ReferenceLoc)> Out) { assert(S); - ExplicitReferenceColletor(Out).TraverseStmt(S); + ExplicitReferenceColletor(Out).TraverseStmt(const_cast<Stmt *>(S)); } -void findExplicitReferences(Decl *D, +void findExplicitReferences(const Decl *D, llvm::function_ref<void(ReferenceLoc)> Out) { assert(D); - ExplicitReferenceColletor(Out).TraverseDecl(D); + ExplicitReferenceColletor(Out).TraverseDecl(const_cast<Decl *>(D)); } llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, DeclRelation R) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits