aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CursorVisitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CursorVisitor.h')
-rw-r--r--tools/libclang/CursorVisitor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/libclang/CursorVisitor.h b/tools/libclang/CursorVisitor.h
index fa978b7647..563081e1cd 100644
--- a/tools/libclang/CursorVisitor.h
+++ b/tools/libclang/CursorVisitor.h
@@ -69,7 +69,7 @@ private:
/// \brief The declaration that serves at the parent of any statement or
/// expression nodes.
- Decl *StmtParent;
+ const Decl *StmtParent;
/// \brief The visitor function.
CXCursorVisitor Visitor;
@@ -119,11 +119,12 @@ private:
class SetParentRAII {
CXCursor &Parent;
- Decl *&StmtParent;
+ const Decl *&StmtParent;
CXCursor OldParent;
public:
- SetParentRAII(CXCursor &Parent, Decl *&StmtParent, CXCursor NewParent)
+ SetParentRAII(CXCursor &Parent, const Decl *&StmtParent,
+ CXCursor NewParent)
: Parent(Parent), StmtParent(StmtParent), OldParent(Parent)
{
Parent = NewParent;