forked from OSchip/llvm-project
[pseudo] Add dangling-else guard to missing if-statement variants
This commit is contained in:
parent
89f284bc23
commit
afc4958f5a
|
@ -300,12 +300,17 @@ llvm::DenseMap<ExtensionID, RuleGuard> buildGuards() {
|
|||
{rule::contextual_zero::NUMERIC_CONSTANT,
|
||||
TOKEN_GUARD(numeric_constant, Tok.text() == "0")},
|
||||
|
||||
// FIXME: the init-statement variants are missing?
|
||||
{rule::selection_statement::IF__L_PAREN__condition__R_PAREN__statement,
|
||||
guardNextTokenNotElse},
|
||||
{rule::selection_statement::
|
||||
IF__L_PAREN__init_statement__condition__R_PAREN__statement,
|
||||
guardNextTokenNotElse},
|
||||
{rule::selection_statement::
|
||||
IF__CONSTEXPR__L_PAREN__condition__R_PAREN__statement,
|
||||
guardNextTokenNotElse},
|
||||
{rule::selection_statement::
|
||||
IF__CONSTEXPR__L_PAREN__init_statement__condition__R_PAREN__statement,
|
||||
guardNextTokenNotElse},
|
||||
|
||||
// The grammar distinguishes (only) user-defined vs plain string literals,
|
||||
// where the clang lexer distinguishes (only) encoding types.
|
||||
|
|
Loading…
Reference in New Issue