Suggest typo corrections for preprocessor directives
When a preprocessor directive is unknown outside of a skipped conditional block, we give an error diagnostic because we don't know how to proceed with preprocessing. But when the directive is in a skipped conditional block, we would not diagnose it on the theory that the directive may be known to an implementation other than Clang. Now, for unknown directives inside a skipped conditional block, we diagnose the unknown directive as a warning if it is sufficiently similar to a directive specific to preprocessor conditional blocks. For example, we'll warn about `#esle` and suggest `#else` but we won't warn about `#progma` because it's not a directive specific to preprocessor conditional blocks. Fixes #51598 Differential Revision: https://reviews.llvm.org/D124726
parent
92c645b5
Please register or sign in to comment