// RUN: %clang_cc1 -std=c++1y -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s template int x = 0; // CHECK: "\01??$x@X@@3HA" template <> int x; // CHECK: "\01??$x@H@@3HA" template <> int x; // CHECK: "\01?FunctionWithLocalType@@YA?A?@@XZ" auto FunctionWithLocalType() { struct LocalType {}; return LocalType{}; } // CHECK: "\01?ValueFromFunctionWithLocalType@@3ULocalType@?1??FunctionWithLocalType@@YA?A?@@XZ@A" auto ValueFromFunctionWithLocalType = FunctionWithLocalType(); // CHECK: "\01??R@@QBE?A?@@XZ" auto LambdaWithLocalType = [] { struct LocalType {}; return LocalType{}; }; // CHECK: "\01?ValueFromLambdaWithLocalType@@3ULocalType@?1???R@@QBE?A?@@XZ@A" auto ValueFromLambdaWithLocalType = LambdaWithLocalType(); template auto TemplateFuncionWithLocalLambda(T) { auto LocalLambdaWithLocalType = []() { struct LocalType {}; return LocalType{}; }; return LocalLambdaWithLocalType(); } // CHECK: "\01?ValueFromTemplateFuncionWithLocalLambda@@3ULocalType@?2???R@??$TemplateFuncionWithLocalLambda@H@@YA?A?@@H@Z@QBA?A?3@XZ@A" // CHECK: "\01??$TemplateFuncionWithLocalLambda@H@@YA?A?@@H@Z" // CHECK: "\01??R@??$TemplateFuncionWithLocalLambda@H@@YA?A?@@H@Z@QBA?A?1@XZ" auto ValueFromTemplateFuncionWithLocalLambda = TemplateFuncionWithLocalLambda(0);