[PATCH] D105457: [clang] Refactor AST printing tests to share more infrastructure
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 14 14:01:52 PDT 2021
nridge added a comment.
Thanks! I reduced it further to:
template <typename>
class function {
public:
template <typename F>
function(F) {}
};
template <typename M>
void Foo(M, function<void()> = [](){});
void Bar() {
Foo(42);
Foo(42.0);
}
with gcc 7, this gives:
/tmp/cccKjL8O.s: Assembler messages:
/tmp/cccKjL8O.s:76: Error: symbol `_ZN8functionIFvvEEC2IUlvE_EET_' is already defined
I still don't understand this error, but it seems to be related to the lambda that appears as a default argument in a function that gets instantiated multiple times (and with the default argument value not dependent on the function's template parameter), so I think that gives us some idea of where to try workarounds.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105457/new/
https://reviews.llvm.org/D105457
More information about the cfe-commits
mailing list