[llvm-dev] -Wmisleading-indentation violations
Dan Liew via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 2 10:52:28 PDT 2016
Whilst I'm here I thought I would just do a clean build of LLVM and
Clang to see if any more warnings of this sort appeared. Only one
other popped up.
```
/home/dsl11/dev/llvm-upstream/src/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:
In member function ‘void
{anonymous}::ArrayBoundCheckerV2::checkLocation(clang::ento::SVal,
bool, const clang::Stmt*, clang::ento::CheckerContext&) const’:
/home/dsl11/dev/llvm-upstream/src/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:160:7:
warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (state->isTainted(rawOffset.getByteOffset()))
^~
/home/dsl11/dev/llvm-upstream/src/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:162:9:
note: ...this statement, but the latter is misleadingly indented as if
it is guarded by the ‘if’
return;
^~~~~~
```
HTH,
Dan.
More information about the llvm-dev
mailing list