Skip to content

Commit e18b443

Browse files
committed
Define __cpp_consteval in clang-cl so that the <source_location> header is usable
1 parent 3b7bcad commit e18b443

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subdoc/lib/run.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ sus::result::Result<Database, DiagnosticResults> run_files(
9292
// requires this define in order to use offsetof() from constant
9393
// expressions, which subspace uses for the never-value optimization.
9494
args.push_back("/D_CRT_USE_BUILTIN_OFFSETOF");
95+
// TODO: https://github.com/llvm/llvm-project/issues/60347 the
96+
// source_location header on windows requires this to be defined. As
97+
// Clang's C++20 support includes consteval, let's define it.
98+
args.push_back("/D__cpp_consteval");
9599
}
96100

97101
return std::move(args);

0 commit comments

Comments
 (0)