diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-14 13:53:30 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-02-14 13:53:30 +0000 |
commit | 68a932d416c52cef609e2c6c79ae99cbf4b9acd6 (patch) | |
tree | f4743ddae97ea8424552047b2d934f3531c7902a /lib/Sema/SemaCodeComplete.cpp | |
parent | 65303900ea1c0d44a0673f02f92faf8d73cc1b18 (diff) |
Remove a const_cast by propagating constness to called functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 738e31ac57..e145d3ff66 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -315,7 +315,7 @@ namespace { void ExitScope(); /// \brief Ignore this declaration, if it is seen again. - void Ignore(Decl *D) { AllDeclsFound.insert(D->getCanonicalDecl()); } + void Ignore(const Decl *D) { AllDeclsFound.insert(D->getCanonicalDecl()); } /// \name Name lookup predicates /// @@ -3094,7 +3094,7 @@ static void MaybeAddOverrideCalls(Sema &S, DeclContext *InContext, M != MEnd; ++M) { CodeCompletionBuilder Builder(Results.getAllocator(), Results.getCodeCompletionTUInfo()); - CXXMethodDecl *Overridden = const_cast<CXXMethodDecl *>(*M); + const CXXMethodDecl *Overridden = *M; if (Overridden->getCanonicalDecl() == Method->getCanonicalDecl()) continue; |