brintos

brintos / llvm-project-archived public Read only

0
0
Text · 846 B · 8f897f5 Raw
31 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4 5// RUN: %clang_cc1 -x c++ -std=c++20 -emit-module-interface a.h -o a.pcm -fms-extensions -verify6// RUN: %clang_cc1 -std=c++20 a.cpp -fmodule-file=A=a.pcm -fms-extensions -fsyntax-only -verify7 8// RUN: %clang_cc1 -x c++ -std=c++20 -emit-reduced-module-interface a.h -o a.pcm -fms-extensions -verify9// RUN: %clang_cc1 -std=c++20 a.cpp -fmodule-file=A=a.pcm -fms-extensions -fsyntax-only -verify10 11//--- a.h12 13// expected-no-diagnostics14 15export module A;16 17export template <typename T>18void f() {19    char a[] = __func__;20}21 22//--- a.cpp23 24// expected-warning@a.h:8 {{initializing an array from a '__func__' predefined identifier is a Microsoft extension}}25 26import A;27 28void g() {29    f<int>(); // expected-note {{in instantiation of function template specialization 'f<int>' requested here}}30}31