From 2771429bcce34cbe69ea77142318b28947f35c2d Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Mon, 3 Jun 2024 18:35:18 +0300 Subject: [PATCH] Treat .c files as C headers --- source/dpp/expansion/package.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dpp/expansion/package.d b/source/dpp/expansion/package.d index 4fb332d7..1a7b6e1c 100644 --- a/source/dpp/expansion/package.d +++ b/source/dpp/expansion/package.d @@ -295,7 +295,9 @@ from!"clang".Cursor mergeLeaves(from!"clang".Cursor lhs, from!"clang".Cursor rhs bool isCppHeader(in from!"dpp.runtime.options".Options options, in string headerFileName) @safe pure { import std.path: extension; if(options.parseAsCpp) return true; - return headerFileName.extension != ".h"; + return + headerFileName.extension != ".h" && + headerFileName.extension != ".c"; }