Missing typo correction diagnostic in preprocessor conditionals · Issue #51598 · llvm/llvm-project (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@AaronBallman

Description

@AaronBallman

Bugzilla Link 52256
Version trunk
OS Windows NT
CC @zygoloid

Extended Description

Consider the following code, and assume that FOO is not defined:

#ifdef FOO
#elfidef BAR
#endif

In this case, we do not issue any diagnostic about the typo where #elifdef is misspelled as #elfidef because it appears within a preprocessor branch that is discarded.

When scanning for the end of the discarded block, we should consider typo corrections for non-directives to help catch this sort of mistake.