clang 20.0.0git
SemaCodeCompletion.h
Go to the documentation of this file.
1//===----- SemaCodeCompletion.h ------ Code completion support ------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// This file declares facilities that support code completion.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_SEMA_SEMACODECOMPLETION_H
14#define LLVM_CLANG_SEMA_SEMACODECOMPLETION_H
15
16#include "clang/AST/ASTFwd.h"
17#include "clang/AST/Type.h"
20#include "clang/Basic/LLVM.h"
24#include "clang/Sema/DeclSpec.h"
27#include "clang/Sema/SemaBase.h"
28#include "llvm/ADT/StringRef.h"
29#include <optional>
30
31namespace clang {
32class DeclGroupRef;
33class MacroInfo;
34class Scope;
35class TemplateName;
36
38public:
39 SemaCodeCompletion(Sema &S, CodeCompleteConsumer *CompletionConsumer);
40
43
44 /// Code-completion consumer.
46
47 /// Describes the context in which code completion occurs.
49 /// Code completion occurs at top-level or namespace context.
51 /// Code completion occurs within a class, struct, or union.
53 /// Code completion occurs within an Objective-C interface, protocol,
54 /// or category.
56 /// Code completion occurs within an Objective-C implementation or
57 /// category implementation
59 /// Code completion occurs within the list of instance variables
60 /// in an Objective-C interface, protocol, category, or implementation.
62 /// Code completion occurs following one or more template
63 /// headers.
65 /// Code completion occurs following one or more template
66 /// headers within a class.
68 /// Code completion occurs within an expression.
70 /// Code completion occurs within a statement, which may
71 /// also be an expression or a declaration.