aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/CodeCompleteConsumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h30
1 files changed, 7 insertions, 23 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index 5e46a84128d5..f7d073f48bfb 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -1,9 +1,8 @@
//===- CodeCompleteConsumer.h - Code Completion Interface -------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -381,6 +380,7 @@ public:
/// if the expression is a variable initializer or a function argument, the
/// type of the corresponding variable or function parameter.
QualType getPreferredType() const { return PreferredType; }
+ void setPreferredType(QualType T) { PreferredType = T; }
/// Retrieve the type of the base object in a member-access
/// expression.
@@ -656,14 +656,6 @@ public:
} // namespace clang
-namespace llvm {
-
-template <> struct isPodLike<clang::CodeCompletionString::Chunk> {
- static const bool value = true;
-};
-
-} // namespace llvm
-
namespace clang {
/// A builder class used to construct new code-completion strings.
@@ -1000,10 +992,6 @@ class CodeCompleteConsumer {
protected:
const CodeCompleteOptions CodeCompleteOpts;
- /// Whether the output format for the code-completion consumer is
- /// binary.
- bool OutputIsBinary;
-
public:
class OverloadCandidate {
public:
@@ -1074,9 +1062,8 @@ public:
bool IncludeBriefComments) const;
};
- CodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts,
- bool OutputIsBinary)
- : CodeCompleteOpts(CodeCompleteOpts), OutputIsBinary(OutputIsBinary) {}
+ CodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts)
+ : CodeCompleteOpts(CodeCompleteOpts) {}
/// Whether the code-completion consumer wants to see macros.
bool includeMacros() const {
@@ -1114,9 +1101,6 @@ public:
return CodeCompleteOpts.LoadExternal;
}
- /// Determine whether the output of this consumer is binary.
- bool isOutputBinary() const { return OutputIsBinary; }
-
/// Deregisters and destroys this code-completion consumer.
virtual ~CodeCompleteConsumer();
@@ -1189,7 +1173,7 @@ public:
/// results to the given raw output stream.
PrintingCodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts,
raw_ostream &OS)
- : CodeCompleteConsumer(CodeCompleteOpts, false), OS(OS),
+ : CodeCompleteConsumer(CodeCompleteOpts), OS(OS),
CCTUInfo(std::make_shared<GlobalCodeCompletionAllocator>()) {}
/// Prints the finalized code-completion results.