diff --git a/upstream_utils/eigen_patches/0002-Intellisense-fix.patch b/upstream_utils/eigen_patches/0002-Intellisense-fix.patch new file mode 100644 index 0000000000..ef8780dd8c --- /dev/null +++ b/upstream_utils/eigen_patches/0002-Intellisense-fix.patch @@ -0,0 +1,30 @@ +From 94882f4460897f92dfe9f95ec33629094f8e76a2 Mon Sep 17 00:00:00 2001 +From: Peter Johnson +Date: Fri, 20 Jan 2023 23:41:56 -0800 +Subject: [PATCH 2/2] Intellisense fix + +--- + Eigen/src/Core/util/Macros.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h +index 986c3d4..81986b9 100644 +--- a/Eigen/src/Core/util/Macros.h ++++ b/Eigen/src/Core/util/Macros.h +@@ -58,6 +58,16 @@ + // Compiler identification, EIGEN_COMP_* + //------------------------------------------------------------------------------------------ + ++/// \internal Disable NEON features in Intellisense ++#if __INTELLISENSE__ ++#ifdef __ARM_NEON ++#undef __ARM_NEON ++#endif ++#ifdef __ARM_NEON__ ++#undef __ARM_NEON__ ++#endif ++#endif ++ + /// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC + #ifdef __GNUC__ + #define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__) diff --git a/upstream_utils/update_eigen.py b/upstream_utils/update_eigen.py index e04689a292..96ebc002fe 100755 --- a/upstream_utils/update_eigen.py +++ b/upstream_utils/update_eigen.py @@ -105,7 +105,7 @@ def main(): # Apply patches to upstream Git repo os.chdir(upstream_root) - for f in ["0001-Disable-warnings.patch"]: + for f in ["0001-Disable-warnings.patch", "0002-Intellisense-fix.patch"]: git_am(os.path.join(wpilib_root, "upstream_utils/eigen_patches", f)) # Delete old install diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h index 986c3d44db..81986b9447 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h @@ -58,6 +58,16 @@ // Compiler identification, EIGEN_COMP_* //------------------------------------------------------------------------------------------ +/// \internal Disable NEON features in Intellisense +#if __INTELLISENSE__ +#ifdef __ARM_NEON +#undef __ARM_NEON +#endif +#ifdef __ARM_NEON__ +#undef __ARM_NEON__ +#endif +#endif + /// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC #ifdef __GNUC__ #define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)