From eb51f1dc7cd9d8c95a09b991454af77e2dc055a3 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Mon, 5 Feb 2018 09:29:08 +0000 Subject: Merging r323935: ------------------------------------------------------------------------ r323935 | rsmith | 2018-02-01 01:28:36 +0100 (Thu, 01 Feb 2018) | 5 lines PR36181: Teach CodeGen to properly ignore requests to emit dependent entities. Previously, friend function definitions within class templates slipped through the gaps and caused the MS mangler to assert. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@324215 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/microsoft-abi-emit-dependent.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/CodeGenCXX/microsoft-abi-emit-dependent.cpp (limited to 'test') diff --git a/test/CodeGenCXX/microsoft-abi-emit-dependent.cpp b/test/CodeGenCXX/microsoft-abi-emit-dependent.cpp new file mode 100644 index 0000000000..e74ebc879f --- /dev/null +++ b/test/CodeGenCXX/microsoft-abi-emit-dependent.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -emit-llvm-only -fmodules -triple x86_64-windows %s +// PR36181 +#pragma clang module build foo +module foo {} +#pragma clang module contents +template struct A { + friend void f(A) {} +}; +#pragma clang module endbuild +#pragma clang module import foo +void g() { f(A()); } -- cgit v1.2.3