diff options
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index 2a8da3260a..a196bf9ec5 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -121,7 +121,7 @@ SimplifiedTypeClass getSimplifiedTypeClass(CanQualType T); /// \brief Determine the type that this declaration will have if it is used /// as a type or in an expression. -QualType getDeclUsageType(ASTContext &C, NamedDecl *ND); +QualType getDeclUsageType(ASTContext &C, const NamedDecl *ND); /// \brief Determine the priority to be given to a macro code completion result /// with the given name. @@ -530,7 +530,7 @@ class GlobalCodeCompletionAllocator }; class CodeCompletionTUInfo { - llvm::DenseMap<DeclContext *, StringRef> ParentNames; + llvm::DenseMap<const DeclContext *, StringRef> ParentNames; IntrusiveRefCntPtr<GlobalCodeCompletionAllocator> AllocatorRef; public: @@ -546,7 +546,7 @@ public: return *AllocatorRef; } - StringRef getParentName(DeclContext *DC); + StringRef getParentName(const DeclContext *DC); }; } // end namespace clang @@ -629,7 +629,7 @@ public: void AddAnnotation(const char *A) { Annotations.push_back(A); } /// \brief Add the parent context information to this code completion. - void addParentContext(DeclContext *DC); + void addParentContext(const DeclContext *DC); void addBriefComment(StringRef Comment); @@ -649,7 +649,7 @@ public: /// \brief When Kind == RK_Declaration or RK_Pattern, the declaration we are /// referring to. In the latter case, the declaration might be NULL. - NamedDecl *Declaration; + const NamedDecl *Declaration; union { /// \brief When Kind == RK_Keyword, the string representing the keyword @@ -704,7 +704,7 @@ public: NestedNameSpecifier *Qualifier; /// \brief Build a result that refers to a declaration. - CodeCompletionResult(NamedDecl *Declaration, + CodeCompletionResult(const NamedDecl *Declaration, NestedNameSpecifier *Qualifier = 0, bool QualifierIsInformative = false, bool Accessible = true) @@ -764,7 +764,7 @@ public: } /// \brief Retrieve the declaration stored in this result. - NamedDecl *getDeclaration() const { + const NamedDecl *getDeclaration() const { assert(Kind == RK_Declaration && "Not a declaration result"); return Declaration; } @@ -793,7 +793,7 @@ public: bool IncludeBriefComments); /// \brief Determine a base priority for the given declaration. - static unsigned getPriorityFromDecl(NamedDecl *ND); + static unsigned getPriorityFromDecl(const NamedDecl *ND); private: void computeCursorKindAndAvailability(bool Accessible = true); |