================ @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19.20 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-windows-msvc | FileCheck --check-prefix=AFTER %s +// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19.14 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-windows-msvc | FileCheck --check-prefix=BEFORE %s + +template <auto a> +class AutoParmTemplate { +public: + AutoParmTemplate() {} +}; + +template <auto a> +auto AutoFunc() { + return a; +} + +void template_mangling() { + + AutoParmTemplate<nullptr> auto_nullptr; ---------------- MaxEW707 wrote:
This is a separate file since `nullptr` gets mangled the same as an integer literal. In VS2017 this gets mangled with the `$M <type>` so clang emits an error for emitting the same mangled name definition for two different objects if these test is inside `mangle-ms-auto-templates.cpp` which has tests for mangling integer literals. VS2017 gets around this by erroneously putting all the definitions into COMDAT sections which clang does not do at the moment when trying to be VS2017 compatible. https://github.com/llvm/llvm-project/pull/97007 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits