This is an archive of the discontinued LLVM Phabricator instance.

[NFC]: Fix PVS Studio warning in LoopNestAnalysis
ClosedPublic

Authored by etiotto on Nov 4 2019, 1:10 PM.

Details

Summary

This patch fixes the following warnings uncovered by PVS Studio:

/home/xbolva00/LLVM/llvm-project/llvm/lib/Analysis/LoopCacheAnalysis.cpp 353 warn V612 An unconditional 'return' within a loop.
/home/xbolva00/LLVM/llvm-project/llvm/lib/Analysis/LoopCacheAnalysis.cpp 456 err V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '==' operator.

Diff Detail

Event Timeline

etiotto created this revision.Nov 4 2019, 1:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2019, 1:10 PM
etiotto edited the summary of this revision. (Show Details)Nov 4 2019, 1:13 PM
xbolva00 accepted this revision.Nov 4 2019, 1:26 PM

Looks fine.

This revision is now accepted and ready to land.Nov 4 2019, 1:26 PM
Whitney added inline comments.Nov 4 2019, 1:26 PM
llvm/lib/Analysis/LoopCacheAnalysis.cpp
345

return false?

etiotto updated this revision to Diff 227783.Nov 4 2019, 2:29 PM
etiotto updated this revision to Diff 227785.Nov 4 2019, 2:32 PM
etiotto marked an inline comment as done.