[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / default-argument-with-immediate-calls.cpp
blob510605a23d4e7e10af9fcd07689817cf3b81511d
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
5 #ifndef HEADER_INCLUDED
6 #define HEADER_INCLUDED
8 consteval int immediate();
9 int regular_function() {
10 return 0;
13 struct S {
14 int a = immediate() + regular_function();
17 int f(int arg = immediate()) {
18 return arg;
21 #else
23 consteval int immediate() {
24 return 0;
27 void test() {
28 f(0);
29 f();
30 S s{0};
31 S t{0};
34 #endif