<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Building clangDynamicASTMatchers fails on Visual Studio 2015 in REGISTER_MATCHER(hasDeclaration);"
href="https://llvm.org/bugs/show_bug.cgi?id=26087">26087</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Building clangDynamicASTMatchers fails on Visual Studio 2015 in REGISTER_MATCHER(hasDeclaration);
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jujjyl@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Attempting to build LLVM+Clang from sources on Windows Visual Studio 2015, it
is failing in tools\clang\lib\ASTMatchers\Dynamic\Registry.cpp on line 206 with
REGISTER_MATCHER(hasDeclaration);
giving the following error messages that go inside templated code:
1>------ Build started: Project: clangDynamicASTMatchers, Configuration: Debug
x64 ------
1> Registry.cpp
1>C:\code\emsdk\clang\fastcomp\src\tools\clang\include\clang/ASTMatchers/ASTMatchersInternal.h(669):
error C2664: 'bool
clang::ast_matchers::internal::HasDeclarationMatcher<T,P1>::matchesSpecialized(const
clang::MemberExpr &,clang::ast_matchers::internal::ASTMatchFinder
*,clang::ast_matchers::internal::BoundNodesTreeBuilder *) const': cannot
convert argument 1 from 'const clang::DeclRefExpr' to 'const clang::QualType &'
1> with
1> [
1> T=clang::DeclRefExpr,
1> P1=clang::ast_matchers::internal::Matcher<clang::Decl>
1> ]
1>
C:\code\emsdk\clang\fastcomp\src\tools\clang\include\clang/ASTMatchers/ASTMatchersInternal.h(669):
note: Reason: cannot convert from 'const clang::DeclRefExpr' to 'const
clang::QualType'
1>
C:\code\emsdk\clang\fastcomp\src\tools\clang\include\clang/ASTMatchers/ASTMatchersInternal.h(669):
note: No user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
1>
C:\code\emsdk\clang\fastcomp\src\tools\clang\include\clang/ASTMatchers/ASTMatchersInternal.h(668):
note: while compiling class template member function 'bool
clang::ast_matchers::internal::HasDeclarationMatcher<T,P1>::matches(const T
&,clang::ast_matchers::internal::ASTMatchFinder
*,clang::ast_matchers::internal::BoundNodesTreeBuilder *) const'
1> with
1> [
1> T=clang::DeclRefExpr,
1> P1=clang::ast_matchers::internal::Matcher<clang::Decl>
1> ]
1>
C:\code\emsdk\clang\fastcomp\src\tools\clang\include\clang/ASTMatchers/ASTMatchersInternal.h(1032):
note: see reference to class template instantiation
'clang::ast_matchers::internal::HasDeclarationMatcher<T,P1>' being compiled
1> with
1> [
1> T=clang::DeclRefExpr,
1> P1=clang::ast_matchers::internal::Matcher<clang::Decl>
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(220):
note: see reference to function template instantiation
'clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>::operator
clang::ast_matchers::internal::Matcher<TargetT>(void) const<TargetT>' being
compiled
1> with
1> [
1> TargetT=clang::DeclRefExpr
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(220):
note: see reference to function template instantiation
'clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>::operator
clang::ast_matchers::internal::Matcher<TargetT>(void) const<TargetT>' being
compiled
1> with
1> [
1> TargetT=clang::DeclRefExpr
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(221):
note: see reference to function template instantiation 'void
clang::ast_matchers::dynamic::internal::mergePolyMatchers<PolyMatcher,clang::ast_matchers::internal::TypeList<clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>>(const
PolyMatcher
&,std::vector<clang::ast_matchers::internal::DynTypedMatcher,std::allocator<_Ty>>
&,TypeList)' being compiled
1> with
1> [
1>
PolyMatcher=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1> _Ty=clang::ast_matchers::internal::DynTypedMatcher,
1>
TypeList=clang::ast_matchers::internal::TypeList<clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(221):
note: see reference to function template instantiation 'void
clang::ast_matchers::dynamic::internal::mergePolyMatchers<PolyMatcher,clang::ast_matchers::internal::TypeList<clang::CXXConstructExpr,clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>>(const
PolyMatcher
&,std::vector<clang::ast_matchers::internal::DynTypedMatcher,std::allocator<_Ty>>
&,TypeList)' being compiled
1> with
1> [
1>
PolyMatcher=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1> _Ty=clang::ast_matchers::internal::DynTypedMatcher,
1>
TypeList=clang::ast_matchers::internal::TypeList<clang::CXXConstructExpr,clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(239):
note: see reference to function template instantiation 'void
clang::ast_matchers::dynamic::internal::mergePolyMatchers<T,clang::ast_matchers::internal::TypeList<clang::CallExpr,clang::CXXConstructExpr,clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>>(const
PolyMatcher
&,std::vector<clang::ast_matchers::internal::DynTypedMatcher,std::allocator<_Ty>>
&,TypeList)' being compiled
1> with
1> [
1>
T=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1>
PolyMatcher=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1> _Ty=clang::ast_matchers::internal::DynTypedMatcher,
1>
TypeList=clang::ast_matchers::internal::TypeList<clang::CallExpr,clang::CXXConstructExpr,clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(435):
note: see reference to function template instantiation
'clang::ast_matchers::dynamic::VariantMatcher
clang::ast_matchers::dynamic::internal::outvalueToVariantMatcher<ReturnType>(const
T
&,clang::ast_matchers::internal::TypeList<clang::CallExpr,clang::CXXConstructExpr,clang::DeclRefExpr,clang::EnumType,clang::InjectedClassNameType,clang::LabelStmt,clang::MemberExpr,clang::QualType,clang::RecordType,clang::TagType,clang::TemplateSpecializationType,clang::TemplateTypeParmType,clang::TypedefType,clang::UnresolvedUsingType>
*)' being compiled
1> with
1> [
1>
ReturnType=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1>
T=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>
1> ]
1>
c:\code\emsdk\clang\fastcomp\src\tools\clang\lib\astmatchers\dynamic\Marshallers.h(641):
note: see reference to function template instantiation
'clang::ast_matchers::dynamic::VariantMatcher
clang::ast_matchers::dynamic::internal::matcherMarshall1<ReturnType,ArgType1>(void
(__cdecl
*)(void),llvm::StringRef,clang::ast_matchers::dynamic::SourceRange,llvm::ArrayRef<clang::ast_matchers::dynamic::ParserValue>,clang::ast_matchers::dynamic::Diagnostics
*)' being compiled
1> with
1> [
1>
ReturnType=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1> ArgType1=const
clang::ast_matchers::internal::Matcher<clang::Decl> &
1> ]
1>
C:\code\emsdk\clang\fastcomp\src\tools\clang\lib\ASTMatchers\Dynamic\Registry.cpp(206):
note: see reference to function template instantiation
'clang::ast_matchers::dynamic::internal::MatcherDescriptor
*clang::ast_matchers::dynamic::internal::makeMatcherAutoMarshall<clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,const
clang::ast_matchers::internal::Matcher<clang::Decl>&>(ReturnType (__cdecl
*)(ArgType1),llvm::StringRef)' being compiled
1> with
1> [
1>
ReturnType=clang::ast_matchers::internal::PolymorphicMatcherWithParam1<clang::ast_matchers::internal::HasDeclarationMatcher,clang::ast_matchers::internal::Matcher<clang::Decl>,void
(clang::ast_matchers::internal::HasDeclarationSupportedTypes)>,
1> ArgType1=const
clang::ast_matchers::internal::Matcher<clang::Decl> &
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</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>