[llvm] a83dccf - [llvm-c-test] Fix MSVC build error caused by <stdbool.h> in C++ code (#218842)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 04:13:49 PDT 2026
Author: paperplanet
Date: 2026-08-27T19:13:44+08:00
New Revision: a83dccf7d46d3a9383c59f6731ca23c3ed1f477e
URL: https://github.com/llvm/llvm-project/commit/a83dccf7d46d3a9383c59f6731ca23c3ed1f477e
DIFF: https://github.com/llvm/llvm-project/commit/a83dccf7d46d3a9383c59f6731ca23c3ed1f477e.diff
LOG: [llvm-c-test] Fix MSVC build error caused by <stdbool.h> in C++ code (#218842)
This patch fixes vs2022 windows compile error: "#error: The C++ Standard
Library forbids macroizing the keyword "bool". Enable warning C4005 to
find the forbidden define."
Added:
Modified:
llvm/tools/llvm-c-test/llvm-c-test.h
Removed:
################################################################################
diff --git a/llvm/tools/llvm-c-test/llvm-c-test.h b/llvm/tools/llvm-c-test/llvm-c-test.h
index 4c5a88ce0447e..7672324ef155e 100644
--- a/llvm/tools/llvm-c-test/llvm-c-test.h
+++ b/llvm/tools/llvm-c-test/llvm-c-test.h
@@ -13,7 +13,10 @@
#ifndef LLVM_C_TEST_H
#define LLVM_C_TEST_H
+#ifndef __cplusplus
#include <stdbool.h>
+#endif
+
#include "llvm-c/Core.h"
#ifdef __cplusplus
More information about the llvm-commits
mailing list