mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 22:20:37 +03:00
Move dmd files into compiler/
This commit is contained in:
parent
20bd0cacbd
commit
6374bb87b7
4579 changed files with 4 additions and 4 deletions
63
compiler/test/compilable/cppmangle3.d
Normal file
63
compiler/test/compilable/cppmangle3.d
Normal file
|
@ -0,0 +1,63 @@
|
|||
// https://issues.dlang.org/show_bug.cgi?id=15512
|
||||
// https://issues.dlang.org/show_bug.cgi?id=19893
|
||||
// https://issues.dlang.org/show_bug.cgi?id=19920
|
||||
module cppmangle3;
|
||||
|
||||
version (CppRuntime_Clang) version = CppMangle_Itanium;
|
||||
version (CppRuntime_DigitalMars) version = CppMangle_MSVC;
|
||||
version (CppRuntime_Gcc) version = CppMangle_Itanium;
|
||||
version (CppRuntime_Microsoft) version = CppMangle_MSVC;
|
||||
version (CppRuntime_Sun) version = CppMangle_Itanium;
|
||||
|
||||
extern(C++, "true")
|
||||
{
|
||||
}
|
||||
|
||||
extern(C++, "__traits")
|
||||
{
|
||||
}
|
||||
|
||||
extern(C++, "foo")
|
||||
{
|
||||
}
|
||||
|
||||
int foo; // no name clashing with above namespace
|
||||
|
||||
extern(C++, "std", "chrono")
|
||||
{
|
||||
void func();
|
||||
}
|
||||
|
||||
version(CppMangle_MSVC) static assert(func.mangleof == "?func@chrono@std@@YAXXZ");
|
||||
else static assert(func.mangleof == "_ZNSt6chrono4funcEv");
|
||||
|
||||
struct Foo
|
||||
{
|
||||
extern(C++, "namespace")
|
||||
{
|
||||
static void bar();
|
||||
}
|
||||
}
|
||||
|
||||
alias Alias(alias a) = a;
|
||||
alias Alias(T) = T;
|
||||
|
||||
static assert(is(Alias!(__traits(parent, Foo.bar)) == Foo));
|
||||
|
||||
extern(C++, "std"):
|
||||
debug = 456;
|
||||
debug = def;
|
||||
version = 456;
|
||||
version = def;
|
||||
|
||||
extern(C++, "std")
|
||||
{
|
||||
debug = 456;
|
||||
debug = def;
|
||||
version = 456;
|
||||
version = def;
|
||||
}
|
||||
|
||||
extern(C++, "foo")
|
||||
extern(C++, "bar")
|
||||
version = baz;
|
Loading…
Add table
Add a link
Reference in a new issue