[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / pragma-once.c
blob15e8503c1158e02730f0af0c66b808dd0f06a76b
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/Inputs/pragma-once.h -fsyntax-only -verify %s
4 // Test with pch.
5 // RUN: %clang_cc1 -emit-pch -o %t %S/Inputs/pragma-once.h
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
8 // expected-no-diagnostics
10 // Including "pragma-once.h" twice, to verify the 'once' aspect is honored.
11 #include "Inputs/pragma-once.h"
12 #include "Inputs/pragma-once.h"
13 int foo(void) { return 0; }