New issue
Advanced search Search tips

Issue 920467 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 752720



Sign in to add a comment

clang-cl fails to compile chrome on C++17 mode due to ConstantExpr mangling

Project Member Reported by tzik@chromium.org, Jan 10

Issue description

clang-cl fails to compile chrome on C++17 mode.
The failing try job is
https://chromium-review.googlesource.com/c/chromium/src/+/1032317/73
https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win10_chromium_x64_rel_ng/171948

And its error message is:
..\..\third_party\depot_tools\win_toolchain\vs_files\3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c\VC\Tools\MSVC\14.14.26428\atlmfc\include\atlhost.h(517,38):  error: cannot yet mangle expression type ConstantExpr
CComQIPtr<IOleInPlaceActiveObject, &__uuidof(IOleInPlaceActiveObject)> spInPlaceActiveObject(m_spUnknown);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8924771129461113120/+/steps/compile__with_patch_/0/logs/raw_io.output_failure_summary_/0

Looks like an MSVC's library starts using an unimplemented feature of clang-cl.
 
Cc: r...@chromium.org
Should be fun to implement :-)
Here is a small repro:
https://wandbox.org/permlink/3W7yu2au9UZ5kNZt
----
struct _GUID {};

struct __declspec(uuid("{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}")) B {};

template <const _GUID* piid>
struct A : B {
  virtual void baz() { new A<piid>; }
};

int main() {
  new A<&__uuidof(B)>;
  return 0;
}
----

It works on C++14 mode, and on C++17 mode of the previous version:
https://wandbox.org/permlink/HdEtnQOPVeGDTKUv
https://wandbox.org/permlink/x9nXTKmkle47bKCi

Probably, this is related to https://bugs.llvm.org/show_bug.cgi?id=39881
memo: the version of clang was ad0cb4e3a2d39c2a, @350794.
https://llvm.googlesource.com/clang/+/ad0cb4e3a2d39c2afa7bead67d6707833ed4f603
> error: cannot yet mangle expression type ConstantExpr

This should have been fixed in r350068:
https://reviews.llvm.org/D55853

Chromium already has this revision. Are you saying this is still a problem?
"error: cannot yet mangle expression type ConstantExpr" seems to gone, but it's still failing for another error due to an infinite template recursion.
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8924275870757390928/+/steps/compile__with_patch_/0/logs/raw_io.output_failure_summary_/

I'm not sure if they have the same mechanism.

Sign in to add a comment