summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-02-14 13:53:30 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-02-14 13:53:30 +0000
commit6cfb1537b62470b424fae8a9b64ddfa85092359a (patch)
tree119f7a791e97cd28dfa3e9d85e3831e67d73befc /clang/lib/Sema/SemaCodeComplete.cpp
parent60e92e55ccf62ba4cd40fa69845215c6ab067250 (diff)
downloadbcm5719-llvm-6cfb1537b62470b424fae8a9b64ddfa85092359a.tar.gz
bcm5719-llvm-6cfb1537b62470b424fae8a9b64ddfa85092359a.zip
Remove a const_cast by propagating constness to called functions
llvm-svn: 175161
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 738e31ac57c..e145d3ff66d 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud