[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 14:45:33 PST 2024


================
@@ -0,0 +1,20 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: split-file %s %t
+//
+// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify
+
+//--- i.h
+#ifndef FOO_H
+#pragma once
+struct S{};
+#endif
+
+//--- foo.cpp
----------------
vsapsai wrote:

Personally I would name the file as test.cpp but don't have a strong opinion.

https://github.com/llvm/llvm-project/pull/76119


More information about the cfe-commits mailing list