]> granicus.if.org Git - clang/commitdiff
NFC: CodeCompletionResult's constructor should take const NamedDecl
authorAlex Lorenz <arphaman@gmail.com>
Wed, 12 Oct 2016 15:33:35 +0000 (15:33 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 12 Oct 2016 15:33:35 +0000 (15:33 +0000)
CodeCompletionResult's Declaration field is a const pointer to the
NamedDecl, and thus the constructor should take a const pointer as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284019 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/CodeCompleteConsumer.h

index 4ad1b0170325861bdd81efda45fbd37afd57a4ae..2ef6f107c7d9b8a4181938b8f3ba3db681cd388b 100644 (file)
@@ -737,7 +737,7 @@ public:
 
   /// \brief Build a result that refers to a pattern with an associated
   /// declaration.
-  CodeCompletionResult(CodeCompletionString *Pattern, NamedDecl *D,
+  CodeCompletionResult(CodeCompletionString *Pattern, const NamedDecl *D,
                        unsigned Priority)
     : Declaration(D), Pattern(Pattern), Priority(Priority), StartParameter(0),
       Kind(RK_Pattern), Availability(CXAvailability_Available), Hidden(false),