Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / predefined.cpp
blobfbe0c4e23ca59cf323a724e5fd23430eab6944e4
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: cd %t
5 // RUN: %clang_cc1 -x c++ -std=c++20 -emit-module-interface a.h -o a.pcm -fms-extensions -verify
6 // RUN: %clang_cc1 -std=c++20 a.cpp -fmodule-file=A=a.pcm -fms-extensions -fsyntax-only -verify
8 //--- a.h
10 // expected-no-diagnostics
12 export module A;
14 export template <typename T>
15 void f() {
16 char a[] = __func__;
19 //--- a.cpp
21 // expected-warning@a.h:8 {{initializing an array from a '__func__' predefined identifier is a Microsoft extension}}
23 import A;
25 void g() {
26 f<int>(); // expected-note {{in instantiation of function template specialization 'f<int>' requested here}}