mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

We're going to remove the support for modules-ts. But there are a lot of tests which uses -fmodules-ts. We shouldn't remove them simply. This patch refactor these tests to use standard c++ modules.
22 lines
325 B
C++
22 lines
325 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 %t/M.cppm -fsyntax-only -verify
|
|
|
|
//--- foo.h
|
|
typedef struct {
|
|
int c;
|
|
union {
|
|
int n;
|
|
char c[4];
|
|
} v;
|
|
} mbstate;
|
|
|
|
//--- M.cppm
|
|
// expected-no-diagnostics
|
|
module;
|
|
#include "foo.h"
|
|
export module M;
|
|
export using ::mbstate;
|