Wfor-loop-analysis warning on tot bots |
||
Issue descriptionhttps://build.chromium.org/p/chromium.fyi/builders/ClangToTWin%28dbg%29/builds/6043/steps/compile/logs/stdio FAILED: obj/third_party/WebKit/Source/core/html/HTMLInputElement.obj ../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes /FC @obj/third_party/WebKit/Source/core/html/HTMLInputElement.obj.rsp /c ../../third_party/WebKit/Source/core/html/HTMLInputElement.cpp /Foobj/third_party/WebKit/Source/core/html/HTMLInputElement.obj /Fd"obj/third_party/WebKit/Source/core/html_cc.pdb" ../../third_party/WebKit/Source/core/html/HTMLInputElement.cpp(1843,49): error: variable 'option' used in loop condition not modified in loop body [-Werror,-Wfor-loop-analysis] for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) { ^~~~~~ That code is old though, and I don't see anything in clang that touched this warning recently either. Why does this fire now (and only on a tot bot)?
,
Jun 23 2016
good clang r 273532 bad clang r 273551 (from https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin%28dll%29/builds/5445 / https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin%28dll%29/builds/5446)
,
Jun 23 2016
Nicos-MBP:lld thakis$ svn log -r273532:273551 https://nico@llvm.org/svn/llvm-project/cfe/trunk ------------------------------------------------------------------------ r273533 | ctopper | 2016-06-23 02:36:42 -0400 (Thu, 23 Jun 2016) | 1 line [AVX512] Replace masked unpack builtins with shufflevector and selects. ------------------------------------------------------------------------ r273548 | rsmith | 2016-06-23 04:41:20 -0400 (Thu, 23 Jun 2016) | 6 lines Rearrange condition handling so that semantic checks on a condition variable are performed before the other substatements of the construct are parsed, rather than deferring them until the end. This allows better error recovery from semantic errors in the condition, improves diagnostic order, and is a prerequisite for C++17 constexpr if. ------------------------------------------------------------------------ rsmith's change. I'll ask on the commit.
,
Jun 23 2016
Asked here: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160620/162838.html Another clang roll blocker :-(
,
Jun 23 2016
Richard re-landed with a fix in r273600.
,
Jun 24 2016
This looks good now. Thanks! |
||
►
Sign in to add a comment |
||
Comment 1 by thakis@chromium.org
, Jun 23 2016In other places too: FAILED: obj/third_party/WebKit/Source/core/paint/webcore_shared.ThemePainter.obj ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\third_party\WebKit\Source\core\paint\webcore_shared.ThemePainter.obj.rsp /c ..\..\third_party\WebKit\Source\core\paint\ThemePainter.cpp /Foobj\third_party\WebKit\Source\core\paint\webcore_shared.ThemePainter.obj /Fdobj\third_party\WebKit\Source\core\webcore_shared.cc.pdb ..\..\third_party\WebKit\Source\core\paint\ThemePainter.cpp(283,45): error: variable 'optionElement' used in loop condition not modified in loop body [-Werror,-Wfor-loop-analysis] for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i++) { ^~~~~~~~~~~~~ https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin%28dll%29/builds/5448/steps/compile/logs/stdio