FormatToken.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. //===--- FormatToken.h - Format C++ code ------------------------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. ///
  10. /// \file
  11. /// \brief This file contains the declaration of the FormatToken, a wrapper
  12. /// around Token with additional information related to formatting.
  13. ///
  14. //===----------------------------------------------------------------------===//
  15. #ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKEN_H
  16. #define LLVM_CLANG_LIB_FORMAT_FORMATTOKEN_H
  17. #include "clang/Basic/IdentifierTable.h"
  18. #include "clang/Basic/OperatorPrecedence.h"
  19. #include "clang/Format/Format.h"
  20. #include "clang/Lex/Lexer.h"
  21. #include <memory>
  22. namespace clang {
  23. namespace format {
  24. #define LIST_TOKEN_TYPES \
  25. TYPE(ArrayInitializerLSquare) \
  26. TYPE(ArraySubscriptLSquare) \
  27. TYPE(AttributeParen) \
  28. TYPE(BinaryOperator) \
  29. TYPE(BitFieldColon) \
  30. TYPE(BlockComment) \
  31. TYPE(CastRParen) \
  32. TYPE(ConditionalExpr) \
  33. TYPE(ConflictAlternative) \
  34. TYPE(ConflictEnd) \
  35. TYPE(ConflictStart) \
  36. TYPE(CtorInitializerColon) \
  37. TYPE(CtorInitializerComma) \
  38. TYPE(DesignatedInitializerPeriod) \
  39. TYPE(DictLiteral) \
  40. TYPE(ForEachMacro) \
  41. TYPE(FunctionAnnotationRParen) \
  42. TYPE(FunctionDeclarationName) \
  43. TYPE(FunctionLBrace) \
  44. TYPE(FunctionTypeLParen) \
  45. TYPE(ImplicitStringLiteral) \
  46. TYPE(InheritanceColon) \
  47. TYPE(InlineASMBrace) \
  48. TYPE(InlineASMColon) \
  49. TYPE(JavaAnnotation) \
  50. TYPE(JsComputedPropertyName) \
  51. TYPE(JsFatArrow) \
  52. TYPE(JsTypeColon) \
  53. TYPE(JsTypeOptionalQuestion) \
  54. TYPE(LambdaArrow) \
  55. TYPE(LambdaLSquare) \
  56. TYPE(LeadingJavaAnnotation) \
  57. TYPE(LineComment) \
  58. TYPE(MacroBlockBegin) \
  59. TYPE(MacroBlockEnd) \
  60. TYPE(ObjCBlockLBrace) \
  61. TYPE(ObjCBlockLParen) \
  62. TYPE(ObjCDecl) \
  63. TYPE(ObjCForIn) \
  64. TYPE(ObjCMethodExpr) \
  65. TYPE(ObjCMethodSpecifier) \
  66. TYPE(ObjCProperty) \
  67. TYPE(ObjCStringLiteral) \
  68. TYPE(OverloadedOperator) \
  69. TYPE(OverloadedOperatorLParen) \
  70. TYPE(PointerOrReference) \
  71. TYPE(PureVirtualSpecifier) \
  72. TYPE(RangeBasedForLoopColon) \
  73. TYPE(RegexLiteral) \
  74. TYPE(SelectorName) \
  75. TYPE(StartOfName) \
  76. TYPE(TemplateCloser) \
  77. TYPE(TemplateOpener) \
  78. TYPE(TemplateString) \
  79. TYPE(TrailingAnnotation) \
  80. TYPE(TrailingReturnArrow) \
  81. TYPE(TrailingUnaryOperator) \
  82. TYPE(UnaryOperator) \
  83. TYPE(Unknown)
  84. enum TokenType {
  85. #define TYPE(X) TT_##X,
  86. LIST_TOKEN_TYPES
  87. #undef TYPE
  88. NUM_TOKEN_TYPES
  89. };
  90. /// \brief Determines the name of a token type.
  91. const char *getTokenTypeName(TokenType Type);
  92. // Represents what type of block a set of braces open.
  93. enum BraceBlockKind { BK_Unknown, BK_Block, BK_BracedInit };
  94. // The packing kind of a function's parameters.
  95. enum ParameterPackingKind { PPK_BinPacked, PPK_OnePerLine, PPK_Inconclusive };
  96. enum FormatDecision { FD_Unformatted, FD_Continue, FD_Break };
  97. class TokenRole;
  98. class AnnotatedLine;
  99. /// \brief A wrapper around a \c Token storing information about the
  100. /// whitespace characters preceding it.
  101. struct FormatToken {
  102. FormatToken() {}
  103. /// \brief The \c Token.
  104. Token Tok;
  105. /// \brief The number of newlines immediately before the \c Token.
  106. ///
  107. /// This can be used to determine what the user wrote in the original code
  108. /// and thereby e.g. leave an empty line between two function definitions.
  109. unsigned NewlinesBefore = 0;
  110. /// \brief Whether there is at least one unescaped newline before the \c
  111. /// Token.
  112. bool HasUnescapedNewline = false;
  113. /// \brief The range of the whitespace immediately preceding the \c Token.
  114. SourceRange WhitespaceRange;
  115. /// \brief The offset just past the last '\n' in this token's leading
  116. /// whitespace (relative to \c WhiteSpaceStart). 0 if there is no '\n'.
  117. unsigned LastNewlineOffset = 0;
  118. /// \brief The width of the non-whitespace parts of the token (or its first
  119. /// line for multi-line tokens) in columns.
  120. /// We need this to correctly measure number of columns a token spans.
  121. unsigned ColumnWidth = 0;
  122. /// \brief Contains the width in columns of the last line of a multi-line
  123. /// token.
  124. unsigned LastLineColumnWidth = 0;
  125. /// \brief Whether the token text contains newlines (escaped or not).
  126. bool IsMultiline = false;
  127. /// \brief Indicates that this is the first token.
  128. bool IsFirst = false;
  129. /// \brief Whether there must be a line break before this token.
  130. ///
  131. /// This happens for example when a preprocessor directive ended directly
  132. /// before the token.
  133. bool MustBreakBefore = false;
  134. /// \brief The raw text of the token.
  135. ///
  136. /// Contains the raw token text without leading whitespace and without leading
  137. /// escaped newlines.
  138. StringRef TokenText;
  139. /// \brief Set to \c true if this token is an unterminated literal.
  140. bool IsUnterminatedLiteral = 0;
  141. /// \brief Contains the kind of block if this token is a brace.
  142. BraceBlockKind BlockKind = BK_Unknown;
  143. TokenType Type = TT_Unknown;
  144. /// \brief The number of spaces that should be inserted before this token.
  145. unsigned SpacesRequiredBefore = 0;
  146. /// \brief \c true if it is allowed to break before this token.
  147. bool CanBreakBefore = false;
  148. /// \brief \c true if this is the ">" of "template<..>".
  149. bool ClosesTemplateDeclaration = false;
  150. /// \brief Number of parameters, if this is "(", "[" or "<".
  151. ///
  152. /// This is initialized to 1 as we don't need to distinguish functions with
  153. /// 0 parameters from functions with 1 parameter. Thus, we can simply count
  154. /// the number of commas.
  155. unsigned ParameterCount = 0;
  156. /// \brief Number of parameters that are nested blocks,
  157. /// if this is "(", "[" or "<".
  158. unsigned BlockParameterCount = 0;
  159. /// \brief If this is a bracket ("<", "(", "[" or "{"), contains the kind of
  160. /// the surrounding bracket.
  161. tok::TokenKind ParentBracket = tok::unknown;
  162. /// \brief A token can have a special role that can carry extra information
  163. /// about the token's formatting.
  164. std::unique_ptr<TokenRole> Role;
  165. /// \brief If this is an opening parenthesis, how are the parameters packed?
  166. ParameterPackingKind PackingKind = PPK_Inconclusive;
  167. /// \brief The total length of the unwrapped line up to and including this
  168. /// token.
  169. unsigned TotalLength = 0;
  170. /// \brief The original 0-based column of this token, including expanded tabs.
  171. /// The configured TabWidth is used as tab width.
  172. unsigned OriginalColumn = 0;
  173. /// \brief The length of following tokens until the next natural split point,
  174. /// or the next token that can be broken.
  175. unsigned UnbreakableTailLength = 0;
  176. // FIXME: Come up with a 'cleaner' concept.
  177. /// \brief The binding strength of a token. This is a combined value of
  178. /// operator precedence, parenthesis nesting, etc.
  179. unsigned BindingStrength = 0;
  180. /// \brief The nesting level of this token, i.e. the number of surrounding (),
  181. /// [], {} or <>.
  182. unsigned NestingLevel = 0;
  183. /// \brief Penalty for inserting a line break before this token.
  184. unsigned SplitPenalty = 0;
  185. /// \brief If this is the first ObjC selector name in an ObjC method
  186. /// definition or call, this contains the length of the longest name.
  187. ///
  188. /// This being set to 0 means that the selectors should not be colon-aligned,
  189. /// e.g. because several of them are block-type.
  190. unsigned LongestObjCSelectorName = 0;
  191. /// \brief Stores the number of required fake parentheses and the
  192. /// corresponding operator precedence.
  193. ///
  194. /// If multiple fake parentheses start at a token, this vector stores them in
  195. /// reverse order, i.e. inner fake parenthesis first.
  196. SmallVector<prec::Level, 4> FakeLParens;
  197. /// \brief Insert this many fake ) after this token for correct indentation.
  198. unsigned FakeRParens = 0;
  199. /// \brief \c true if this token starts a binary expression, i.e. has at least
  200. /// one fake l_paren with a precedence greater than prec::Unknown.
  201. bool StartsBinaryExpression = false;
  202. /// \brief \c true if this token ends a binary expression.
  203. bool EndsBinaryExpression = false;
  204. /// \brief Is this is an operator (or "."/"->") in a sequence of operators
  205. /// with the same precedence, contains the 0-based operator index.
  206. unsigned OperatorIndex = 0;
  207. /// \brief Is this the last operator (or "."/"->") in a sequence of operators
  208. /// with the same precedence?
  209. bool LastOperator = false;
  210. /// \brief Is this token part of a \c DeclStmt defining multiple variables?
  211. ///
  212. /// Only set if \c Type == \c TT_StartOfName.
  213. bool PartOfMultiVariableDeclStmt = false;
  214. /// \brief If this is a bracket, this points to the matching one.
  215. FormatToken *MatchingParen = nullptr;
  216. /// \brief The previous token in the unwrapped line.
  217. FormatToken *Previous = nullptr;
  218. /// \brief The next token in the unwrapped line.
  219. FormatToken *Next = nullptr;
  220. /// \brief If this token starts a block, this contains all the unwrapped lines
  221. /// in it.
  222. SmallVector<AnnotatedLine *, 1> Children;
  223. /// \brief Stores the formatting decision for the token once it was made.
  224. FormatDecision Decision = FD_Unformatted;
  225. /// \brief If \c true, this token has been fully formatted (indented and
  226. /// potentially re-formatted inside), and we do not allow further formatting
  227. /// changes.
  228. bool Finalized = false;
  229. bool is(tok::TokenKind Kind) const { return Tok.is(Kind); }
  230. bool is(TokenType TT) const { return Type == TT; }
  231. bool is(const IdentifierInfo *II) const {
  232. return II && II == Tok.getIdentifierInfo();
  233. }
  234. template <typename A, typename B> bool isOneOf(A K1, B K2) const {
  235. return is(K1) || is(K2);
  236. }
  237. template <typename A, typename B, typename... Ts>
  238. bool isOneOf(A K1, B K2, Ts... Ks) const {
  239. return is(K1) || isOneOf(K2, Ks...);
  240. }
  241. template <typename T> bool isNot(T Kind) const { return !is(Kind); }
  242. bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); }
  243. bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const {
  244. return Tok.isObjCAtKeyword(Kind);
  245. }
  246. bool isAccessSpecifier(bool ColonRequired = true) const {
  247. return isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private) &&
  248. (!ColonRequired || (Next && Next->is(tok::colon)));
  249. }
  250. /// \brief Determine whether the token is a simple-type-specifier.
  251. bool isSimpleTypeSpecifier() const;
  252. bool isObjCAccessSpecifier() const {
  253. return is(tok::at) && Next && (Next->isObjCAtKeyword(tok::objc_public) ||
  254. Next->isObjCAtKeyword(tok::objc_protected) ||
  255. Next->isObjCAtKeyword(tok::objc_package) ||
  256. Next->isObjCAtKeyword(tok::objc_private));
  257. }
  258. /// \brief Returns whether \p Tok is ([{ or a template opening <.
  259. bool opensScope() const {
  260. return isOneOf(tok::l_paren, tok::l_brace, tok::l_square,
  261. TT_TemplateOpener);
  262. }
  263. /// \brief Returns whether \p Tok is )]} or a template closing >.
  264. bool closesScope() const {
  265. return isOneOf(tok::r_paren, tok::r_brace, tok::r_square,
  266. TT_TemplateCloser);
  267. }
  268. /// \brief Returns \c true if this is a "." or "->" accessing a member.
  269. bool isMemberAccess() const {
  270. return isOneOf(tok::arrow, tok::period, tok::arrowstar) &&
  271. !isOneOf(TT_DesignatedInitializerPeriod, TT_TrailingReturnArrow,
  272. TT_LambdaArrow);
  273. }
  274. bool isUnaryOperator() const {
  275. switch (Tok.getKind()) {
  276. case tok::plus:
  277. case tok::plusplus:
  278. case tok::minus:
  279. case tok::minusminus:
  280. case tok::exclaim:
  281. case tok::tilde:
  282. case tok::kw_sizeof:
  283. case tok::kw_alignof:
  284. return true;
  285. default:
  286. return false;
  287. }
  288. }
  289. bool isBinaryOperator() const {
  290. // Comma is a binary operator, but does not behave as such wrt. formatting.
  291. return getPrecedence() > prec::Comma;
  292. }
  293. bool isTrailingComment() const {
  294. return is(tok::comment) &&
  295. (is(TT_LineComment) || !Next || Next->NewlinesBefore > 0);
  296. }
  297. /// \brief Returns \c true if this is a keyword that can be used
  298. /// like a function call (e.g. sizeof, typeid, ...).
  299. bool isFunctionLikeKeyword() const {
  300. switch (Tok.getKind()) {
  301. case tok::kw_throw:
  302. case tok::kw_typeid:
  303. case tok::kw_return:
  304. case tok::kw_sizeof:
  305. case tok::kw_alignof:
  306. case tok::kw_alignas:
  307. case tok::kw_decltype:
  308. case tok::kw_noexcept:
  309. case tok::kw_static_assert:
  310. case tok::kw___attribute:
  311. return true;
  312. default:
  313. return false;
  314. }
  315. }
  316. /// \brief Returns actual token start location without leading escaped
  317. /// newlines and whitespace.
  318. ///
  319. /// This can be different to Tok.getLocation(), which includes leading escaped
  320. /// newlines.
  321. SourceLocation getStartOfNonWhitespace() const {
  322. return WhitespaceRange.getEnd();
  323. }
  324. prec::Level getPrecedence() const {
  325. return getBinOpPrecedence(Tok.getKind(), true, true);
  326. }
  327. /// \brief Returns the previous token ignoring comments.
  328. FormatToken *getPreviousNonComment() const {
  329. FormatToken *Tok = Previous;
  330. while (Tok && Tok->is(tok::comment))
  331. Tok = Tok->Previous;
  332. return Tok;
  333. }
  334. /// \brief Returns the next token ignoring comments.
  335. const FormatToken *getNextNonComment() const {
  336. const FormatToken *Tok = Next;
  337. while (Tok && Tok->is(tok::comment))
  338. Tok = Tok->Next;
  339. return Tok;
  340. }
  341. /// \brief Returns \c true if this tokens starts a block-type list, i.e. a
  342. /// list that should be indented with a block indent.
  343. bool opensBlockTypeList(const FormatStyle &Style) const {
  344. return is(TT_ArrayInitializerLSquare) ||
  345. (is(tok::l_brace) &&
  346. (BlockKind == BK_Block || is(TT_DictLiteral) ||
  347. (!Style.Cpp11BracedListStyle && NestingLevel == 0)));
  348. }
  349. /// \brief Same as opensBlockTypeList, but for the closing token.
  350. bool closesBlockTypeList(const FormatStyle &Style) const {
  351. return MatchingParen && MatchingParen->opensBlockTypeList(Style);
  352. }
  353. private:
  354. // Disallow copying.
  355. FormatToken(const FormatToken &) = delete;
  356. void operator=(const FormatToken &) = delete;
  357. };
  358. class ContinuationIndenter;
  359. struct LineState;
  360. class TokenRole {
  361. public:
  362. TokenRole(const FormatStyle &Style) : Style(Style) {}
  363. virtual ~TokenRole();
  364. /// \brief After the \c TokenAnnotator has finished annotating all the tokens,
  365. /// this function precomputes required information for formatting.
  366. virtual void precomputeFormattingInfos(const FormatToken *Token);
  367. /// \brief Apply the special formatting that the given role demands.
  368. ///
  369. /// Assumes that the token having this role is already formatted.
  370. ///
  371. /// Continues formatting from \p State leaving indentation to \p Indenter and
  372. /// returns the total penalty that this formatting incurs.
  373. virtual unsigned formatFromToken(LineState &State,
  374. ContinuationIndenter *Indenter,
  375. bool DryRun) {
  376. return 0;
  377. }
  378. /// \brief Same as \c formatFromToken, but assumes that the first token has
  379. /// already been set thereby deciding on the first line break.
  380. virtual unsigned formatAfterToken(LineState &State,
  381. ContinuationIndenter *Indenter,
  382. bool DryRun) {
  383. return 0;
  384. }
  385. /// \brief Notifies the \c Role that a comma was found.
  386. virtual void CommaFound(const FormatToken *Token) {}
  387. protected:
  388. const FormatStyle &Style;
  389. };
  390. class CommaSeparatedList : public TokenRole {
  391. public:
  392. CommaSeparatedList(const FormatStyle &Style)
  393. : TokenRole(Style), HasNestedBracedList(false) {}
  394. void precomputeFormattingInfos(const FormatToken *Token) override;
  395. unsigned formatAfterToken(LineState &State, ContinuationIndenter *Indenter,
  396. bool DryRun) override;
  397. unsigned formatFromToken(LineState &State, ContinuationIndenter *Indenter,
  398. bool DryRun) override;
  399. /// \brief Adds \p Token as the next comma to the \c CommaSeparated list.
  400. void CommaFound(const FormatToken *Token) override {
  401. Commas.push_back(Token);
  402. }
  403. private:
  404. /// \brief A struct that holds information on how to format a given list with
  405. /// a specific number of columns.
  406. struct ColumnFormat {
  407. /// \brief The number of columns to use.
  408. unsigned Columns;
  409. /// \brief The total width in characters.
  410. unsigned TotalWidth;
  411. /// \brief The number of lines required for this format.
  412. unsigned LineCount;
  413. /// \brief The size of each column in characters.
  414. SmallVector<unsigned, 8> ColumnSizes;
  415. };
  416. /// \brief Calculate which \c ColumnFormat fits best into
  417. /// \p RemainingCharacters.
  418. const ColumnFormat *getColumnFormat(unsigned RemainingCharacters) const;
  419. /// \brief The ordered \c FormatTokens making up the commas of this list.
  420. SmallVector<const FormatToken *, 8> Commas;
  421. /// \brief The length of each of the list's items in characters including the
  422. /// trailing comma.
  423. SmallVector<unsigned, 8> ItemLengths;
  424. /// \brief Precomputed formats that can be used for this list.
  425. SmallVector<ColumnFormat, 4> Formats;
  426. bool HasNestedBracedList;
  427. };
  428. /// \brief Encapsulates keywords that are context sensitive or for languages not
  429. /// properly supported by Clang's lexer.
  430. struct AdditionalKeywords {
  431. AdditionalKeywords(IdentifierTable &IdentTable) {
  432. kw_in = &IdentTable.get("in");
  433. kw_CF_ENUM = &IdentTable.get("CF_ENUM");
  434. kw_CF_OPTIONS = &IdentTable.get("CF_OPTIONS");
  435. kw_NS_ENUM = &IdentTable.get("NS_ENUM");
  436. kw_NS_OPTIONS = &IdentTable.get("NS_OPTIONS");
  437. kw_finally = &IdentTable.get("finally");
  438. kw_function = &IdentTable.get("function");
  439. kw_import = &IdentTable.get("import");
  440. kw_var = &IdentTable.get("var");
  441. kw_abstract = &IdentTable.get("abstract");
  442. kw_extends = &IdentTable.get("extends");
  443. kw_final = &IdentTable.get("final");
  444. kw_implements = &IdentTable.get("implements");
  445. kw_instanceof = &IdentTable.get("instanceof");
  446. kw_interface = &IdentTable.get("interface");
  447. kw_native = &IdentTable.get("native");
  448. kw_package = &IdentTable.get("package");
  449. kw_synchronized = &IdentTable.get("synchronized");
  450. kw_throws = &IdentTable.get("throws");
  451. kw___except = &IdentTable.get("__except");
  452. kw_mark = &IdentTable.get("mark");
  453. kw_option = &IdentTable.get("option");
  454. kw_optional = &IdentTable.get("optional");
  455. kw_repeated = &IdentTable.get("repeated");
  456. kw_required = &IdentTable.get("required");
  457. kw_returns = &IdentTable.get("returns");
  458. kw_signals = &IdentTable.get("signals");
  459. kw_slots = &IdentTable.get("slots");
  460. kw_qslots = &IdentTable.get("Q_SLOTS");
  461. }
  462. // Context sensitive keywords.
  463. IdentifierInfo *kw_in;
  464. IdentifierInfo *kw_CF_ENUM;
  465. IdentifierInfo *kw_CF_OPTIONS;
  466. IdentifierInfo *kw_NS_ENUM;
  467. IdentifierInfo *kw_NS_OPTIONS;
  468. IdentifierInfo *kw___except;
  469. // JavaScript keywords.
  470. IdentifierInfo *kw_finally;
  471. IdentifierInfo *kw_function;
  472. IdentifierInfo *kw_import;
  473. IdentifierInfo *kw_var;
  474. // Java keywords.
  475. IdentifierInfo *kw_abstract;
  476. IdentifierInfo *kw_extends;
  477. IdentifierInfo *kw_final;
  478. IdentifierInfo *kw_implements;
  479. IdentifierInfo *kw_instanceof;
  480. IdentifierInfo *kw_interface;
  481. IdentifierInfo *kw_native;
  482. IdentifierInfo *kw_package;
  483. IdentifierInfo *kw_synchronized;
  484. IdentifierInfo *kw_throws;
  485. // Pragma keywords.
  486. IdentifierInfo *kw_mark;
  487. // Proto keywords.
  488. IdentifierInfo *kw_option;
  489. IdentifierInfo *kw_optional;
  490. IdentifierInfo *kw_repeated;
  491. IdentifierInfo *kw_required;
  492. IdentifierInfo *kw_returns;
  493. // QT keywords.
  494. IdentifierInfo *kw_signals;
  495. IdentifierInfo *kw_slots;
  496. IdentifierInfo *kw_qslots;
  497. };
  498. } // namespace format
  499. } // namespace clang
  500. #endif