[PATCH] D19586: Misleading Indentation check

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 13 05:34:16 PST 2017


xazax.hun marked 13 inline comments as done.
xazax.hun added inline comments.


================
Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:20
+
+void MisleadingIndentationCheck::danglingElseCheck(
+    const MatchFinder::MatchResult &Result) {
----------------
danielmarjamaki wrote:
> There is no handling of tabs and spaces by danglingElseCheck as far as I see.
> 
> The "if" might for example be indented with spaces. And then the corresponding "else" is indented with a tab. Then I guess there is false positive.
> 
> If the "if" is indented with 2 spaces and the "else" is indented with 2 tabs. then I assume there is false negative.
> 
> It's unfortunate. Is it ok?
Documented this limitation.


https://reviews.llvm.org/D19586





More information about the cfe-commits mailing list