clang 24.0.0git
CommentOptions.h
Go to the documentation of this file.
1//===- CommentOptions.h - Options for parsing comments ----------*- C++ -*-===//
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//
9/// \file
10/// Defines the clang::CommentOptions interface.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_BASIC_COMMENTOPTIONS_H
15#define LLVM_CLANG_BASIC_COMMENTOPTIONS_H
16
17#include <string>
18#include <vector>
19
20namespace clang {
21
22/// Options for controlling comment parsing.
24 using BlockCommandNamesTy = std::vector<std::string>;
25
26 /// Command names to treat as block commands in comments.
27 /// Should not include the leading backslash.
29
30 /// Treat ordinary comments as documentation comments.
31 bool ParseAllComments = false;
32
33 /// Force the front end to retain all documentation comments in the AST, even
34 /// when no comment consuming diagnostic or language option is enabled. Tools
35 /// that query comments after parsing set this.
36 bool RetainComments = false;
37
38 /// Retain documentation comments from system headers in the AST.
40
41 CommentOptions() = default;
42};
43
44} // namespace clang
45
46#endif // LLVM_CLANG_BASIC_COMMENTOPTIONS_H
Top level wrappers for InstallAPI frontend operations.
bool RetainCommentsFromSystemHeaders
Retain documentation comments from system headers in the AST.
bool RetainComments
Force the front end to retain all documentation comments in the AST, even when no comment consuming d...
bool ParseAllComments
Treat ordinary comments as documentation comments.
BlockCommandNamesTy BlockCommandNames
Command names to treat as block commands in comments.
std::vector< std::string > BlockCommandNamesTy