Update for C++17 and fix MSVC warnings (#1694)

* Update MSVC arguments
* Fix json allocator
* Fix simulation diamond
* Bump gtest
* Remove empty varargs in unit tests
* Replace test case with test suite
* Remove deprecation warning in optional
* Remove need for NOMIXMAX to be defined in wpilib headers
This commit is contained in:
Thad House
2019-05-31 13:43:32 -07:00
committed by Peter Johnson
parent fb1239a2ad
commit 221011494d
99 changed files with 534 additions and 398 deletions

View File

@@ -117,6 +117,11 @@
#ifndef LLVM_NODISCARD
#if __cplusplus > 201402L && __has_cpp_attribute(nodiscard)
#define LLVM_NODISCARD [[nodiscard]]
// Detect MSVC directly, since __cplusplus still defaults to old version
#elif _MSVC_LANG >= 201703L
#define LLVM_NODISCARD [[nodiscard]]
#elif _MSC_VER
#define LLVM_NODISCARD
#elif !__cplusplus
// Workaround for llvm.org/PR23435, since clang 3.6 and below emit a spurious
// error when __has_cpp_attribute is given a scoped attribute in C mode.
@@ -236,6 +241,11 @@
#ifndef LLVM_FALLTHROUGH
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
#define LLVM_FALLTHROUGH [[fallthrough]]
// Detect MSVC directly, since __cplusplus still defaults to old version
#elif _MSVC_LANG >= 201703L
#define LLVM_FALLTHROUGH [[fallthrough]]
#elif _MSC_VER
#define LLVM_FALLTHROUGH
#elif __has_cpp_attribute(gnu::fallthrough)
#define LLVM_FALLTHROUGH [[gnu::fallthrough]]
#elif !__cplusplus