New issue
Advanced search Search tips

Issue 622723 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 621972



Sign in to add a comment

Wfor-loop-analysis warning on tot bots

Project Member Reported by thakis@chromium.org, Jun 23 2016

Issue description

https://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)?
 

Comment 1 by thakis@chromium.org, Jun 23 2016

In 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

Comment 3 by thakis@chromium.org, 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.

Comment 4 by thakis@chromium.org, Jun 23 2016

Asked here: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160620/162838.html

Another clang roll blocker :-(

Comment 5 by p...@chromium.org, Jun 23 2016

Reverted r273548 in r273589.

Comment 6 by p...@chromium.org, Jun 23 2016

Richard re-landed with a fix in r273600.

Comment 7 by thakis@chromium.org, Jun 24 2016

Status: Fixed (was: Untriaged)
This looks good now. Thanks!

Sign in to add a comment