35 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -emit-pch %s -o %t2// RUN: %clang_cc1 -std=c++20 -include-pch %t -verify %s3// expected-no-diagnostics4 5#ifndef HEADER_INCLUDED6#define HEADER_INCLUDED7 8consteval int immediate();9int regular_function() {10 return 0;11}12 13struct S {14 int a = immediate() + regular_function();15};16 17int f(int arg = immediate()) {18 return arg;19}20 21#else22 23consteval int immediate() {24 return 0;25}26 27void test() {28 f(0);29 f();30 S s{0};31 S t{0};32}33 34#endif35