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"
28#include "clang/Sema/SemaBase.h"
29#include "llvm/ADT/StringRef.h"
30#include <optional>
31
32namespace clang {
33class DeclGroupRef;
34class MacroInfo;
35class Scope;
36class TemplateName;
37
39public:
40 SemaCodeCompletion(Sema &S, CodeCompleteConsumer *CompletionConsumer);
41
44
45 /// Code-completion consumer.
48
49 /// Describes the context in which code completion occurs.
51 /// Code completion occurs at top-level or namespace context.
53 /// Code completion occurs within a class, struct, or union.
55 /// Code completion occurs within an Objective-C interface, protocol,
56 /// or category.
58 /// Code completion occurs within an Objective-C implementation or
59 /// category implementation
61 /// Code completion occurs within the list of instance variables
62 /// in an Objective-C interface, protocol, category, or implementation.
64 /// Code completion occurs following one or more template
65 /// headers.
67 /// Code completion occurs following one or more template
68 /// headers within a class.
70 /// Code completion occurs within an expression.