<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 --- - clangASTMatchers and clangDynamicASTMatchers appear to be mutually dependent"
href="https://llvm.org/bugs/show_bug.cgi?id=30892">30892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clangASTMatchers and clangDynamicASTMatchers appear to be mutually dependent
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vsk@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17545" name="attach_17545" title="Defined-away AST matcher overloads">attachment 17545</a> <a href="attachment.cgi?id=17545&action=edit" title="Defined-away AST matcher overloads">[details]</a></span>
Defined-away AST matcher overloads
During a clean build of clang with -DBUILD_SHARED_LIBS=On, I get the following
link failure:
```
FAILED: lib/libclangASTMatchers.dylib
: &&
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fmodules
-fmodules-cache-path=/Users/vk/Desktop/llvm/DA/module.cache -fcxx-modules
-gmodules -fcolor-diagnostics -fno-common -Woverloaded-virtual
-Wno-nested-anon-types -g -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
-dynamiclib -Wl,-headerpad_max_install_names -o lib/libclangASTMatchers.dylib
-install_name @rpath/libclangASTMatchers.dylib
tools/clang/lib/ASTMatchers/CMakeFiles/clangASTMatchers.dir/ASTMatchFinder.cpp.o
tools/clang/lib/ASTMatchers/CMakeFiles/clangASTMatchers.dir/ASTMatchersInternal.cpp.o
lib/libclangAST.dylib lib/libclangBasic.dylib lib/libLLVMSupport.dylib
-Wl,-rpath,@loader_path/../lib && :
Undefined symbols for architecture x86_64:
"clang::ast_matchers::callExpr", referenced from:
clang::ast_matchers::internal::matcher_callee1Matcher::matches(clang::CallExpr
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchFinder.cpp.o
clang::ast_matchers::internal::matcher_callee1Matcher::matches(clang::CallExpr
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchersInternal.cpp.o
"clang::ast_matchers::qualType", referenced from:
clang::ast_matchers::internal::matcher_pointsTo1Matcher::matches(clang::QualType
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchFinder.cpp.o
clang::ast_matchers::internal::matcher_references1Matcher::matches(clang::QualType
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchFinder.cpp.o
clang::ast_matchers::internal::matcher_hasType1Matcher<clang::Expr,
clang::ast_matchers::internal::Matcher<clang::Decl> >::matches(clang::Expr
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchFinder.cpp.o
clang::ast_matchers::internal::matcher_pointsTo1Matcher::matches(clang::QualType
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchersInternal.cpp.o
clang::ast_matchers::internal::matcher_references1Matcher::matches(clang::QualType
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchersInternal.cpp.o
clang::ast_matchers::internal::matcher_hasType1Matcher<clang::Expr,
clang::ast_matchers::internal::Matcher<clang::Decl> >::matches(clang::Expr
const&, clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in
ASTMatchersInternal.cpp.o
```
Code in ASTMatchers.h appears to depend on the callExpr and qualType matchers
defined in libclangDynamicASTMatchers. I was able to link clang successfully by
defining four AST matcher overloads from ASTMatchers.h as 'return false;'. I'm
attaching that diff.</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>