[llvm-bugs] [Bug 52256] New: Missing typo correction diagnostic in preprocessor conditionals

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 21 10:34:05 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52256

            Bug ID: 52256
           Summary: Missing typo correction diagnostic in preprocessor
                    conditionals
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C2x
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aaron at aaronballman.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211021/1e21a98d/attachment.html>


More information about the llvm-bugs mailing list