CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
148 lines
6.2 KiB
C++
148 lines
6.2 KiB
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/line.cpp -verify -o %t/line.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/gnu_line_marker.cpp -verify -o %t/gnu_line_marker.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/include.cpp -verify -o %t/include.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/ident.cpp -verify -o %t/ident.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_comment.cpp -verify -o %t/pragma_comment.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_mark.cpp -verify -o %t/pragma_mark.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_detect_mismatch.cpp -verify -o %t/pragma_detect_mismatch.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_clang_debug.cpp -verify -o %t/pragma_clang_debug.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_message.cpp -verify -o %t/pragma_message.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_gcc_warn.cpp -verify -o %t/pragma_gcc_warn.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_gcc_error.cpp -verify -o %t/pragma_gcc_error.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_diag_push_pop.cpp -verify -o %t/pragma_diag_push_pop.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_diag_ignore.cpp -verify -o %t/pragma_diag_ignore.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_opencl_ext.cpp -verify -o %t/pragma_opencl_ext.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_push_pop.cpp -verify -o %t/pragma_push_pop.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_exec_charset.cpp -verify -o %t/pragma_exec_charset.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/pragma_clang_assume_nonnull.cpp -verify -o %t/pragma_clang_assume_nonnull.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/marco_expand.cpp -DMACRO="" -verify -o %t/marco_expand.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/define.cpp -verify -o %t/define.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/undef.cpp -verify -o %t/undef.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/defined.cpp -verify -o %t/defined.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/has_embed.cpp -verify -o %t/has_embed.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/has_include.cpp -verify -o %t/has_include.pcm
|
|
|
|
//--- header.h
|
|
#ifndef HEADER_H
|
|
#define HEADER_H
|
|
|
|
#endif // HEADER_H
|
|
|
|
//--- line.cpp
|
|
// expected-no-diagnostics
|
|
#line 3
|
|
export module M;
|
|
|
|
//--- gnu_line_marker.cpp
|
|
// expected-no-diagnostics
|
|
# 1 __FILE__ 1 3
|
|
export module M;
|
|
|
|
//--- include.cpp
|
|
#include "header.h" // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
|
|
//--- ident.cpp
|
|
// expected-no-diagnostics
|
|
#ident "$Header:$"
|
|
export module M;
|
|
|
|
//--- pragma_comment.cpp
|
|
// expected-no-diagnostics
|
|
#pragma comment(lib, "msvcrt.lib")
|
|
export module M;
|
|
|
|
//--- pragma_mark.cpp
|
|
// expected-no-diagnostics
|
|
#pragma mark LLVM's world
|
|
export module M;
|
|
|
|
//--- pragma_detect_mismatch.cpp
|
|
// expected-no-diagnostics
|
|
#pragma detect_mismatch("test", "1")
|
|
export module M;
|
|
|
|
//--- pragma_clang_debug.cpp
|
|
// expected-no-diagnostics
|
|
#pragma clang __debug dump Test
|
|
export module M;
|
|
|
|
//--- pragma_message.cpp
|
|
#pragma message "test" // expected-warning {{test}}
|
|
export module M;
|
|
|
|
//--- pragma_gcc_warn.cpp
|
|
#pragma GCC warning "Foo" // expected-warning {{Foo}}
|
|
export module M;
|
|
|
|
//--- pragma_gcc_error.cpp
|
|
#pragma GCC error "Foo" // expected-error {{Foo}}
|
|
export module M;
|
|
|
|
//--- pragma_diag_push_pop.cpp
|
|
// expected-no-diagnostics
|
|
#pragma gcc diagnostic push
|
|
#pragma gcc diagnostic pop
|
|
export module M;
|
|
|
|
//--- pragma_diag_ignore.cpp
|
|
// expected-no-diagnostics
|
|
#pragma GCC diagnostic ignored "-Wframe-larger-than"
|
|
export module M;
|
|
|
|
//--- pragma_opencl_ext.cpp
|
|
// expected-no-diagnostics
|
|
#pragma OPENCL EXTENSION __cl_clang_variadic_functions : enable
|
|
export module M;
|
|
|
|
//--- pragma_push_pop.cpp
|
|
// expected-no-diagnostics
|
|
#pragma warning(push)
|
|
#pragma warning(pop)
|
|
export module M;
|
|
|
|
//--- pragma_exec_charset.cpp
|
|
// expected-no-diagnostics
|
|
#pragma execution_character_set(push, "UTF-8")
|
|
#pragma execution_character_set(pop)
|
|
export module M;
|
|
|
|
//--- pragma_clang_assume_nonnull.cpp
|
|
// expected-no-diagnostics
|
|
#pragma clang assume_nonnull begin
|
|
#pragma clang assume_nonnull end
|
|
export module M;
|
|
|
|
//--- marco_expand.cpp
|
|
MACRO // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
|
|
//--- define.cpp
|
|
// This is a comment
|
|
#define I32 int // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
export I32 i32;
|
|
|
|
//--- undef.cpp
|
|
#undef FOO // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
|
|
//--- defined.cpp
|
|
#if defined(FOO) // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
#endif
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
|
|
//--- has_embed.cpp
|
|
#if __has_embed(__FILE__ ext::token(0xB055)) // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
|
|
#endif
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|
|
|
|
//--- has_include.cpp
|
|
#if __has_include(<stdio.h>) || __has_include_next(<stdlib.h>) // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}} \
|
|
// expected-warning {{#include_next in primary source file; will search from start of include path}}
|
|
#endif
|
|
export module M; // expected-error {{module declaration must occur at the start of the translation unit}}
|