[PATCH] D71037: [Diagnostic] Add ftabstop to -Wmisleading-indentation

Tyker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 22 02:51:09 PST 2020


Tyker added a comment.

In D71037#1871089 <https://reviews.llvm.org/D71037#1871089>, @efriedma wrote:

> I just ran into this warning, and I think there's a bit of a discoverability problem related to the width of tabs and -ftabstop.  If you have mixed tabs and spaces, and you've correctly specified the tab stop width with -ftabstop, everything works fine.  If you haven't specified -ftabstop, you get a warning, and the issue isn't obvious.  Depending on your editor settings, the code might look fine at first glance, and the warning text doesn't mention -ftabstop at all.  Maybe there's something that could be improved here, if we're printing a warning for two lines with mismatched indentation styles?


i agree that this is not obvious. i added a patch to improve this https://reviews.llvm.org/D75009.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71037/new/

https://reviews.llvm.org/D71037





More information about the cfe-commits mailing list