New issue
Advanced search Search tips

Issue 843046 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 841908



Sign in to add a comment

ToTWin builds fail with "constexpr variable cannot have non-literal type 'const (lambda at ..."

Project Member Reported by h...@chromium.org, May 15 2018

Issue description

Starting here: https://ci.chromium.org/buildbot/chromium.clang/ToTWin/1513


FAILED: obj/chrome/browser/browser_0/enumerate_input_method_editors_win.obj 

../../chrome/browser/conflicts/enumerate_input_method_editors_win.cc(51,18):  error: constexpr variable cannot have non-literal type 'const (lambda at ../../chrome/browser/conflicts/enumerate_input_method_editors_win.cc:51:25)'
  constexpr auto comp = [](const wchar_t* lhs, const wchar_t* rhs) -> bool {
                 ^
../../chrome/browser/conflicts/enumerate_input_method_editors_win.cc(51,25):  note: lambda closure types are non-literal types before C++17
  constexpr auto comp = [](const wchar_t* lhs, const wchar_t* rhs) -> bool {
                        ^
1 error generated.
 

Comment 1 by h...@chromium.org, May 15 2018

Labels: clang

Comment 2 by h...@chromium.org, May 15 2018

Presumably due to this Clang commit:

------------------------------------------------------------------------
r332286 | rsmith | 2018-05-14 22:15:04 +0200 (Mon, 14 May 2018) | 4 lines

PR37450: Fix bug that disabled some type checks for variables with deduced types.

Also improve diagnostic for the case where a type is non-literal because it's a lambda.

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

Comment 3 by h...@chromium.org, May 15 2018

Status: Started (was: Assigned)
(Who wrote that code anyway :-P https://chromium-review.googlesource.com/c/chromium/src/+/1013525r)

Fix: https://chromium-review.googlesource.com/c/chromium/src/+/1059111

Let's see if there's more...
Project Member

Comment 4 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cbc92e1267e122ae6a835d4bfd4dfe5567ac3d76

commit cbc92e1267e122ae6a835d4bfd4dfe5567ac3d76
Author: Hans Wennborg <hans@chromium.org>
Date: Tue May 15 09:29:17 2018

Don't try to use constexpr for lambda variable

Apparently lambdas are non-literal types before C++17, and Clang errors
about this after r332286.

TBR=thakis

Bug:  843046 
Change-Id: I9ec058e9e4e74e418d36d1875f7e51bf0d1165c1
Reviewed-on: https://chromium-review.googlesource.com/1059111
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558648}
[modify] https://crrev.com/cbc92e1267e122ae6a835d4bfd4dfe5567ac3d76/chrome/browser/conflicts/enumerate_input_method_editors_win.cc

Comment 5 by h...@chromium.org, May 15 2018

Status: Fixed (was: Started)
I got through a full build locally.

Sign in to add a comment