You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(A) a simple module interface with a template function calling a function object passed to it
(B) a call to that function from a module passing a lambda twice in the same enclosing scope
This will cause the following compiler error: greetings.cpp:6:6: error: definition with same mangled name '_ZW9greetingsE5greetIZW_0E4testvEUt_EvT_' as another definition
This happens only if the use in (B) is part of a module as well (it can be an implementation unit of the same module, or it can also be part of a second module test which will trigger the error as well).
<closure-type-name> ::= Ul <lambda-sig> E [ <nonnegative number> ] _
The number is omitted for the first closure type with a given <lambda-sig> in a given context; it is n-2 for the nth closure type (in [lexical order]) with that same <lambda-sig> and context.
Clang will trigger a compilation error with:
This will cause the following compiler error:
greetings.cpp:6:6: error: definition with same mangled name '_ZW9greetingsE5greetIZW_0E4testvEUt_EvT_' as another definition
This happens only if the use in (B) is part of a module as well (it can be an implementation unit of the same module, or it can also be part of a second module
test
which will trigger the error as well).This seems to be some kind of variation of the following long closed bug: https://bugs.llvm.org/show_bug.cgi?id=33924
greetings.cpp
test.cpp
Compilation commands:
Alternate command if
test.cpp
is meant to be part of a different module:The text was updated successfully, but these errors were encountered: