<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - LLVM does not compile with Visual Studio 17 2018 Preview"
href="https://bugs.llvm.org/show_bug.cgi?id=38118">38118</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM does not compile with Visual Studio 17 2018 Preview
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>steveire@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>BuildPasses.cpp does not compile with that compiler, but does compile with
non-preview versions.
C:\dev\src\llvm\build\lib\Passes>CL.exe /c /IC:\dev\src\llvm\build\lib\Passes
/IC:\dev\src\llvm\lib\Passes /IC:\dev\src\llvm\build\include
/IC:\dev\src\llvm\include /Zi /W4 /WX- /diagnostics:classic /MP /O2 /Ob1 /Oi /D
WIN32 /D _WINDOWS /D NDEBUG /D _HAS_EXCEPTIONS=0 /D GTEST_HAS_RTTI=0 /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_WARNINGS /D
_CRT_NONSTDC_NO_DEPRECATE /D _CRT_NONSTDC_NO_WARNINGS /D
_SCL_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D UNICODE /D _UNICODE /D
__STDC_CONSTANT_MACROS /D __STDC_FORMAT_MACROS /D __STDC_LIMIT_MACROS /D
"CMAKE_INTDIR=\"RelWithDebInfo\"" /D _UNICODE /D UNICODE /Gm- /MD /GS
/fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Zc:rvalueCast /GR-
/Fo"LLVMPasses.dir\RelWithDebInfo\\"
/Fd"LLVMPasses.dir\RelWithDebInfo\LLVMPasses.pdb" /Gd /TP /wd4141 /wd4146
/wd4180 /wd4244 /wd4258 /wd4267 /wd4291 /wd4345 /wd4351 /wd4355 /wd4456 /wd4457
/wd4458 /wd4459 /wd4503 /wd4624 /wd4722 /wd4800 /wd4100 /wd4127 /wd4512 /wd4505
/wd4610 /wd4510 /wd4702 /wd4245 /wd4706 /wd4310 /wd4701 /wd4703 /wd4389 /wd4611
/wd4805 /wd4204 /wd4577 /wd4091 /wd4592 /wd4319 /wd4324 /FC /errorReport:prompt
/we4238 /Zc:strictStrings -w14062 /EHs-c-
C:\dev\src\llvm\lib\Passes\PassBuilder.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26608.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
PassBuilder.cpp
c:\dev\src\llvm\lib\passes\passregistry.def(121): error C2275:
'std::remove_reference<llvm::TargetIRAnalysis>::type': illegal use of this type
as an expression
c:\dev\src\llvm\lib\passes\passregistry.def(120): note: see declaration of
'std::remove_reference<llvm::TargetIRAnalysis>::type'
c:\dev\src\llvm\lib\passes\passregistry.def(121): error C2923:
'llvm::RequireAnalysisPass':
'std::remove_reference<llvm::TargetIRAnalysis>::type' is not a valid template
type argument for parameter 'AnalysisT'
c:\dev\src\llvm\lib\passes\passregistry.def(120): note: see declaration of
'std::remove_reference<llvm::TargetIRAnalysis>::type'
c:\dev\src\llvm\lib\passes\passregistry.def(121): error C2955:
'llvm::RequireAnalysisPass': use of class template requires template argument
list
c:\dev\src\llvm\include\llvm\ir\passmanager.h(1247): note: see declaration of
'llvm::RequireAnalysisPass'
c:\dev\src\llvm\lib\passes\passregistry.def(120): error C2672:
'llvm::PassManager<llvm::Function,llvm::AnalysisManager<IRUnitT>>::addPass': no
matching overloaded function found
with
[
IRUnitT=llvm::Function
]
I reduced it to:
#include <type_traits>
template <typename DerivedT> struct PassInfoMixin
{
};
template <typename T, typename... U>
struct Templ : PassInfoMixin<Templ<T, U...>>
{
};
struct A
{
};
struct TargetMachine
{
A foo() { return {}; }
};
bool parseFunctionPass() {
TargetMachine *TM;
Templ<std::remove_reference<decltype(TM->foo())>::type> t;
return false;
}
C:\dev\src\playground\cpp>cl.exe rmref.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26608.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
rmref.cpp
rmref.cpp(24): error C2275: 'std::remove_reference<A>::type': illegal use of
this type as an expression
rmref.cpp(24): note: see declaration of 'std::remove_reference<A>::type'
rmref.cpp(24): error C2923: 'Templ': 'std::remove_reference<A>::type' is not a
valid template type argument for parameter 'T'
rmref.cpp(24): note: see declaration of 'std::remove_reference<A>::type'
rmref.cpp(24): error C2133: 't': unknown size
rmref.cpp(24): error C2512: 'Templ': no appropriate default constructor
available
rmref.cpp(9): note: see declaration of 'Templ'</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>