[libc-commits] [libc] 81b3914 - [libc] Fix mismatch in exception decl
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Wed Mar 1 12:57:05 PST 2023
Author: Jeff Bailey
Date: 2023-03-01T20:56:59Z
New Revision: 81b39145bda72dbc8cfb0e888f8dbec0fe50e6f1
URL: https://github.com/llvm/llvm-project/commit/81b39145bda72dbc8cfb0e888f8dbec0fe50e6f1
DIFF: https://github.com/llvm/llvm-project/commit/81b39145bda72dbc8cfb0e888f8dbec0fe50e6f1.diff
LOG: [libc] Fix mismatch in exception decl
When running the libc tests under vscode, I got an error about a
mismatches exception declaration for strerror. Since string.h
seems to be getting included transitively anyway, just include
it and rely on its definition.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D144803
Added:
Modified:
libc/test/ErrnoSetterMatcher.h
Removed:
################################################################################
diff --git a/libc/test/ErrnoSetterMatcher.h b/libc/test/ErrnoSetterMatcher.h
index c78d0cdb6f487..d2dab988dc0de 100644
--- a/libc/test/ErrnoSetterMatcher.h
+++ b/libc/test/ErrnoSetterMatcher.h
@@ -12,14 +12,13 @@
#include "test/UnitTest/Test.h"
#include <errno.h>
+#include <string.h>
namespace __llvm_libc {
namespace testing {
namespace internal {
-extern "C" char *strerror(int);
-
template <typename T> class ErrnoSetterMatcher : public Matcher<T> {
T ExpectedReturn;
T ActualReturn;
More information about the libc-commits
mailing list