Mercurial > hg > CbC > CbC_llvm
view clang/test/Modules/pr58716.cppm @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1f2b6ac9f198 |
children |
line wrap: on
line source
// Tests that the compiler won't crash due to the consteval constructor. // // REQUIRES: x86-registered-target // // RUN: rm -rf %t // RUN: mkdir -p %t // RUN: split-file %s %t // // RUN: %clang_cc1 -triple=x86_64-linux-gnu -std=c++20 -emit-module-interface %t/m.cppm -o %t/m.pcm // RUN: %clang_cc1 -triple=x86_64-linux-gnu -std=c++20 %t/m.pcm -S -emit-llvm -o - | FileCheck %t/m.cppm // //--- m.cppm module; #include "fail.h" export module mymodule; // CHECK: @.str = {{.*}}"{}\00" // CHECK: store{{.*}}ptr @.str //--- fail.h namespace std { template<class _CharT> class basic_string_view { public: constexpr basic_string_view(const _CharT* __s) : __data_(__s) {} private: const _CharT* __data_; }; template <class _CharT> struct basic_format_string { template <class _Tp> consteval basic_format_string(const _Tp& __str) : __str_{__str} { } private: basic_string_view<_CharT> __str_; }; } auto this_fails() -> void { std::basic_format_string<char> __fmt("{}"); }