Commit Graph

553 Commits

Author SHA1 Message Date
Roelf-Jilling
a7ec3a85ab Revert all since "Workaround: fallback to mscv link.exe" did not work on AppVeyor
This reverts the commits:
bda3d6a428
97062933ac
0f4fb04bac
1b0c19afd1
a5739ea5f0
2018-11-16 19:36:26 +01:00
Roelf-Jilling
bda3d6a428 Workaround: fix, escape backslashes 2018-11-16 19:36:03 +01:00
Roelf-Jilling
97062933ac Workaround: try with full-path; and return user PATH 2018-11-16 17:01:35 +01:00
Roelf-Jilling
0f4fb04bac Workaround: fix, remove "PATH=" from text 2018-11-16 16:15:44 +01:00
Roelf-Jilling
1b0c19afd1 Workaround: get msvc paths into PowerShell through intermediate file 2018-11-16 15:46:41 +01:00
Roelf-Jilling
a5739ea5f0 Workaround: fallback to mscv link.exe 2018-11-16 15:21:56 +01:00
Roelf-Jilling
3e62f50737 Add macro block end comment on large #if blocks 2018-11-16 14:40:50 +01:00
Roelf-Jilling
2238c4760e Fix clang warning -Winvalid-noreturn on Windows 2018-11-16 14:28:56 +01:00
Roelf-Jilling
1b15a73942 Fix clang warning -Wmissing-noreturn 2018-11-16 10:17:40 +01:00
Roelf-Jilling
6fe1a42035 Fix clang warning -Wunused-member-function 2018-11-16 01:16:54 +01:00
Roelf-Jilling
f65b7cc35e Revert "Fallback to the MSVC linker until vcpkg has been updated"
This reverts commit 7263f3289e.
2018-11-16 00:36:50 +01:00
Roelf-Jilling
7263f3289e Fallback to the MSVC linker until vcpkg has been updated 2018-11-15 23:12:56 +01:00
Roelf-Jilling
329da83fd1 Fix clang warning -Wmissing-variable-declarations 2018-11-15 22:18:04 +01:00
Roelf-Jilling
9a625ab71c For Clang, fallback to the AppVeyor installed version of CMake 2018-11-15 19:59:29 +01:00
Roelf-Jilling
bd5b775b08 Clean condition statement 2018-11-15 19:48:16 +01:00
Roelf-Jilling
24604619ab Set linker explicitly 2018-11-15 19:48:07 +01:00
Roelf-Jilling
f810ce74f3 Fix clang warning -Wdouble-promotion (#741) 2018-11-14 22:44:10 +01:00
Roelf-Jilling
137367bbd7 Fix clang warning -Wnewline-eof (#741) 2018-11-14 22:44:03 +01:00
Roelf-Jilling
fd25cf8140 Suppress clang warning on tests (missing-prototypes) (#741) 2018-11-14 22:44:03 +01:00
Roelf-Jilling
100f2b9b55 MSVC flags to Clang-cl; disable c++98-compat and undefined macro warnings (#741) 2018-11-14 21:42:55 +01:00
Roelf-Jilling
84f57949ab Update span size() bug confirmation test for GCC 6.5 (#741) 2018-11-14 19:55:35 +01:00
Roelf-Jilling
22e78182e3 Try accessing APPVEYOR_BUILD_FOLDER variable (#471) 2018-11-14 12:20:35 +01:00
Roelf-Jilling
ade48d5fdd Fix blocks in ps script (#741) 2018-11-14 12:13:00 +01:00
Roelf-Jilling
c4845bb90a Check vcpkg version; try without building vcpkg; use latest clang-cl from path (#741) 2018-11-14 12:03:47 +01:00
Roelf-Jilling
92f69b6499 Update vcpkg (#741) 2018-11-14 01:33:48 +01:00
Roelf-Jilling
6c796869a3 Escape backslash in path (#741) 2018-11-14 00:07:22 +01:00
Roelf-Jilling
e09dfe90dd Add path to clang-cl.exe (#741) 2018-11-13 23:52:02 +01:00
Roelf-Jilling
1a15d747de Corrections Appveyor;
Temporarily disable msvc compilation for faster testing (#741)
2018-11-13 22:24:10 +01:00
Roelf-Jilling
7347fc5afa Add clang-cl configurations 2018-11-13 19:19:39 +01:00
Roelf-Jilling
9f3492064b Merge branch 'master' into clang-cl_2 2018-11-13 19:12:32 +01:00
Dave Hill
c02ddae4bc Span can be constructed from empty std::array safely (#686)
* Span std::array c'tor uses arr.data() instead of &arr[0]
- Fixes runtime issues when constructing from an empty std::array

* Construct span with std::data if C++17 detected

* Specialize span c'tor for std::array of length 0, set storage to nullptr
2018-11-05 15:39:41 -08:00
Ian Taylor
2bf9f137a6 make BoundsRanges constexpr (#732)
* make BoundsRanges constexpr

* fix clang compilation error

* fix windows compilation
2018-11-05 15:26:27 -08:00
Roelf-Jilling
419ea60e3e Fix #739 correct cppcorecheck warnings for clang-cl 2018-10-15 15:42:18 +02:00
Anna Gringauze
1995e86d1a span constructor no address (#723)
* Changed &arr[0] to std::array<T, N>::data and std::address_of to protect against overloaded operator&.

* Removed the usage of `std::addressof` because it is a C++ 17 feature. Using decay for C arrays instead.

* Add unit tests for #662.

* Added c++17 test configurations for clang5.0 and clang6.0

* fixed CppCoreCheck pointer decay warning
2018-08-19 17:10:53 -07:00
Anna Gringauze
585f48ce55 better check for branch opt (#724)
* Added c++17 test configurations for clang5.0 and clang6.0

* Simplified optimization in span::operator[]
2018-08-19 16:27:30 -07:00
Stephan Dollberg
86be2366c7 Fix #717 - Add empty() to strided_span (#718) 2018-08-17 11:47:03 -07:00
Anna Gringauze
55aad0ab6d
Dev/annagrin/explicit notnull transition description (#722)
* Added c++17 test configurations for clang5.0 and clang6.0

* Improved description how to make transition to explicit not_null constructor
2018-08-17 11:36:26 -07:00
Anna Gringauze
5016ce4a4d
Dev/annagrin/opt neg branch (#721)
* Added c++17 test configurations for clang5.0 and clang6.0

* Added optimization that removes a branch from span::operator[]

* minor beauty fix

* added a better message for the optimization, fixed signed/unsigned warning

* better check fir wrap-around possibility
2018-08-17 11:36:06 -07:00
Anna Gringauze
6241b3faa6
Dev/annagrin/sloppy not null (#712)
* Added c++17 test configurations for clang5.0 and clang6.0

* added transition helper sloppy_not_null

* Moved gsl_transition to a samples folder

* Fixed build break and static analysis warnings
2018-08-13 09:55:48 -07:00
Anna Gringauze
831584d947
Dev/annagrin/make not null (#711)
* Added c++17 test configurations for clang5.0 and clang6.0

* Added make_not_null helper to create a not_null

Introduction of explicit not_null constructor made it cumbersome to create not_nulls
in c++14. Adding make_not_null helper. Usage (see tests):

int i = 42;

auto x = make_not_null(&i);
helper(make_not_null(&i));
helper_const(make_not_null(&i));

* Added std::forward to make_not_null, fixed some code analysis warnings

* Fix build break in VS2015 Release configuration

* Fix build break in VS2015 Release configuration
2018-08-13 02:22:02 -07:00
Anna Gringauze
f1a2e91e4e
fixed typo 2018-08-12 21:45:39 -07:00
Anna Gringauze
cea0d0ac2b fix cppcorecheck warnings (#703)
* Added c++17 test configurations for clang5.0 and clang6.0

* Fixed CppCoreCheck warnings in GSL and tests

- Added CMakeSettings.json for VS Open Folder configuration
	- So we can easily run CppCoreCheck in VS
- Fixed CppCorecheck warnings where it made sense
- Suppressed the rest
	- Some suppression does not work due to compiler/tool bugs,
          so replaced by #pragma disable
	- CppCoreCheck has noise, suppressed those with comments
	- Catch produces many warnings, blanket-supressed them all
- Had to fix clang formatting to keep attributes in place
	- clang-format does not support attributes, so I am using
        - "CommentPragmas: '^ NO-FORMAT:'" to skip formatiting on them
- Removed GSL_NOEXCEPT macro, removed incorred noexcepts

* Ignore unknown attributes

* ignore unknown attributes in noexception mode tests

* fixed C26472 in at()

* created GSL_SUPPRESS macro to allow all compilers to parse suppression attributes

* try to fix gcc compilation problems with attributes

* ignore gsl::suppress for gcc

* move suppression to function level on return statements

clang5.0 and up does not allow attributes on return statemets in constexpr functions

* move suppression to function level on return statements

* use GSL_SUPPRESS in algorithm_tests

* Addressed PR comments
2018-08-12 21:44:17 -07:00
Anna Gringauze
6a75903c79 replace uses of GSL_NOEXCEPT macro (#719)
* Added c++17 test configurations for clang5.0 and clang6.0

* removed GSL_NOEXCEPT

- Removed GSL_NOEXCEPT macro
- Replaced by noexcept keyword when needed
- removed noexcept where a function could throw

* remove unneded undef

* fixed replace errors

* removed noexcept where function can throw
2018-08-12 20:19:16 -07:00
Stefan Reinhold
b6c531f7c1 Explicitly check for availability of std::byte (fixes #713) (#714)
* Explicitly check for availbility of std::byte

GCC > 7.3 defines __cpp_lib_byte >= 201603 when std::byte is available.
On libc++ std::byte is available since version 5.0. This can be checked
with _LIBCPP_VERSION >= 5000.
This fixes 713.

* Add missing \ in preprocessor check
2018-08-03 10:39:12 -07:00
beinhaerter
f4a715816c Suppress warnings on VS (#642)
- gsl::narrow, gsl::narrow_cast and gsl::at are the safe variants suggested by CppCoreGuideline. It does not make sense to let VS warn inside the implementation of these functions that unsafe static_cast is used and that the safe variants shall be used.
- Suppress warning that throw_exception can be declared noexcept (for the GSL_TERMINATE_ON_CONTRACT_VIOLATION case)
2018-07-31 17:53:00 -07:00
Anna Gringauze
1f76fbd168
Dev/annagrin/failfast in noexcept mode windows (#710)
made terminate call __fastfail in noexcept mode when using msvc
2018-07-31 17:30:43 -07:00
Daniel599
5778149583 Test broken size (#704)
* added test for size check (#590)

* added #if for gcc 6.4 bug (#590)

* hopefully fix #if for gcc 6.4 bug (#590)

* fixed CHECK usage (#590)

* gcc broken size bug is only when using optimizations
2018-07-13 17:19:09 -07:00
Anna Gringauze
0cebbd77bf
Added c++17 test configurations for clang5.0 and clang6.0 (#697) 2018-06-15 11:42:16 -07:00
Anna Gringauze
21cb6bb8b0
Added testing for c++17 to latest compilers with test with (#692)
* Added testing with std=c++17 for latest compilers

Added running latest compilers with -std=c++17 option to CI the test matrix,
Updated cmake configuration to allow passing c++ standard on the command line.

* attempt to fix appveyor break

* added clang6.0, removed c++17 tests for clang 5.0

* commented out tests for clang with c++17 die to issue #695

* Addresed comments
2018-06-15 10:13:11 -07:00
Matthieu Poullet
a9ef39f14a Fix GCC8 warnings 'useless cast to type'. (#691) 2018-06-15 10:12:37 -07:00