[llvm-dev] -Wmisleading-indentation violations

Dan Gohman via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 3 10:31:32 PDT 2016


In the LoopStrengthReduce.cpp code mentioned here, the code behaves as it
was intended to; it's the indentation that's wrong.

Dan


On Thu, Jun 2, 2016 at 10:58 AM, Dan Liew <dan at su-root.co.uk> wrote:

> Using the correct e-mail address this time.
>
>
> > ```
> >
> /home/dsl11/dev/llvm-upstream/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:
> > In member function ‘void {anonymous}::Cost::RateRegister(const
> > llvm::SCEV*, llvm::SmallPtrSetImpl<const llvm::SCEV*>&, const
> > llvm::Loop*, llvm::ScalarEvolution&, llvm::DominatorTree&)’:
> >
> >
> /home/dsl11/dev/llvm-upstream/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:943:3:
> > warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
> >
> >    if (!isa<SCEVUnknown>(Reg) &&
> >
> >    ^~
> >
> >
> /home/dsl11/dev/llvm-upstream/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp:950:5:
> > note: ...this statement, but the latter is misleadingly
> >
> > indented as if it is guarded by the ‘if’
> >
> >      NumIVMuls += isa<SCEVMulExpr>(Reg) &&
> >
> >      ^~~~~~~~~
> > ```
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160603/e62fa90d/attachment-0001.html>


More information about the llvm-dev mailing list