New issue
Advanced search Search tips

Issue 726359 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocking:
issue 726358



Sign in to add a comment

ClangToTWin failing with error: unknown type name 'definition'

Project Member Reported by h...@chromium.org, May 25 2017

Issue description

E.g. from https://build.chromium.org/p/chromium.fyi/builders/ClangToTWin/builds/12424

Looks like a mis-parse:

FAILED: obj/third_party/WebKit/Source/core/dom/dom_4/CustomElementRegistry.obj 
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes /FC @obj/third_party/WebKit/Source/core/dom/dom_4/CustomElementRegistry.obj.rsp /c ../../third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp /Foobj/third_party/WebKit/Source/core/dom/dom_4/CustomElementRegistry.obj /Fd"obj/third_party/WebKit/Source/core/dom/dom_4_cc.pdb"
C:\b\c\builder\ClangToTWin\src\third_party\WebKit\Source\core\dom\custom\CustomElementRegistry.cpp(229,7):  error: unknown type name 'definition'
  if (definition and definition->Descriptor().LocalName() == desc.LocalName()) {
      ^
C:\b\c\builder\ClangToTWin\src\third_party\WebKit\Source\core\dom\custom\CustomElementRegistry.cpp(229,18):  error: variable declaration in condition must have an initializer
  if (definition and definition->Descriptor().LocalName() == desc.LocalName()) {
                 ^
2 errors generated.


(It might also be worth looking through Blink to remove this use of "and".)
 

Comment 1 by h...@chromium.org, May 25 2017

Last good Clang: 303793
First bad: 303812

Comment 2 by thakis@chromium.org, May 25 2017

This is due to r303798 - For Microsoft compatibility, set fno_operator_names. Can you revert that?

Comment 3 by h...@chromium.org, May 25 2017

It pretty much has to be this one:

------------------------------------------------------------------------
r303798 | erichkeane | 2017-05-24 12:31:19 -0700 (Wed, 24 May 2017) | 19 lines

For Microsoft compatibility, set fno_operator_names

There's a Microsoft header in the Windows SDK which won't 
compile with clang because it uses an operator name (and) 
as a field name. This patch allows that file to compile by 
setting the option which disables operator names. 
The header which doesn't compile <Query.h> C:/Program Files (x86)/
Windows Kits/10/include/10.0.14393.0/um\Query.h:259:40: 
error: expected member name or ';' after declaration specifiers

  /* [case()] */ NODERESTRICTION or;
                   ~~~~~~~~~~~~~~~ ^

                   1 error generated.

Contributed for Melanie Blower

Differential Revision:https://reviews.llvm.org/D33505

------------------------------------------------------------------------

Comment 4 by h...@chromium.org, May 25 2017

Status: Fixed (was: Assigned)
The committer reverted the patch in r303882.

Sign in to add a comment