[LV] Add test showing debug output for loops with uncountable BTCs.
[llvm-project.git] / clang / test / Modules / derived_class.cpp
blobe0c5a652eba4eaf5b154a43e571108b6b5c106ee
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/foo.cppm -emit-module-interface -o %t/foo.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
8 // RUN: %clang_cc1 -std=c++20 %t/foo.cppm -emit-reduced-module-interface -o %t/foo.pcm
9 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
11 //--- bar.h
12 struct bar_base {
13 enum A {
19 constexpr static bool value = false;
20 static bool get() { return false; }
21 bool member_value = false;
22 bool get_func() { return false; }
25 template <typename T>
26 struct bar : public bar_base {
29 //--- foo.cppm
30 module;
31 #include "bar.h"
32 export module foo;
33 export template <typename T>
34 int foo() {
35 bool a = bar<T>::value;
36 bar<T>::get();
37 bar<T> b;
38 b.member_value = a;
39 bool c = b.get_func();
40 return bar<T>::a;
43 //--- Use.cpp
44 // expected-no-diagnostics
45 import foo;
46 void test() {
47 foo<int>();