[PATCH] D70638: [Diagnostic] add a warning which warns about misleading indentation
Nathan Chancellor via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 17:05:56 PST 2019
nathanchance added a comment.
As an FYI, this appears to cause several false positive warnings with the Linux kernel:
../drivers/video/fbdev/core/fbmem.c:665:3: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation]
if (fb_logo.depth > 4 && depth > 4) {
^
../drivers/video/fbdev/core/fbmem.c:661:2: note: previous statement is here
else
^
../drivers/video/fbdev/core/fbmem.c:1075:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
return ret;
^
../drivers/video/fbdev/core/fbmem.c:1072:2: note: previous statement is here
if (!ret)
^
2 warnings generated.
Corresponding to:
https://elixir.bootlin.com/linux/v5.4.1/source/drivers/video/fbdev/core/fbmem.c#L665
and
https://elixir.bootlin.com/linux/v5.4.1/source/drivers/video/fbdev/core/fbmem.c#L1072
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70638/new/
https://reviews.llvm.org/D70638
More information about the cfe-commits
mailing list