1 // RUN: %clang_cc1 -std=c++20 -emit-pch %s -o %t 2 // RUN: %clang_cc1 -std=c++20 -include-pch %t -verify %s 3 // expected-no-diagnostics 4 5 #ifndef HEADER_INCLUDED 6 #define HEADER_INCLUDED 7 8 consteval int immediate(); regular_function()9int regular_function() { 10 return 0; 11 } 12 13 struct S { 14 int a = immediate() + regular_function(); 15 }; 16 f(int arg=immediate ())17int f(int arg = immediate()) { 18 return arg; 19 } 20 21 #else 22 immediate()23consteval int immediate() { 24 return 0; 25 } 26 test()27void test() { 28 f(0); 29 f(); 30 S s{0}; 31 S t{0}; 32 } 33 34 #endif 35