summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 7e51ef50100..88d9a208553 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -353,10 +353,10 @@ DeclContext *Decl::castToDeclContext(const Decl *D) {
// DeclContext Implementation
//===----------------------------------------------------------------------===//
-DeclContext *DeclContext::getParent() {
- if (ScopedDecl *SD = dyn_cast<ScopedDecl>(this))
+const DeclContext *DeclContext::getParent() const {
+ if (const ScopedDecl *SD = dyn_cast<ScopedDecl>(this))
return SD->getDeclContext();
- else if (BlockDecl *BD = dyn_cast<BlockDecl>(this))
+ else if (const BlockDecl *BD = dyn_cast<BlockDecl>(this))
return BD->getParentContext();
else
return NULL;
OpenPOWER on IntegriCloud