Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-06Fix Clang-tidy 15 warnings (#1058)Rose
These warnings were found by running clang-tidy 15.
2021-05-21gsl::at behavior change regarding gsl::span (#985)Jordan Maples [MSFT]
* move span specialization of 'at' to <gsl/span> and update the parameter to be taken by reference * undid previous changes and acted upon decisions made in maintainer sync. Fixed tests failing in /kernel mode * ran clang-format on the include folder * ran clang-format on the test folder Co-authored-by: Jordan Maples <jordan.maples@microsoft.com>
2021-05-13Fix iPhone simulator CI (#981)Tushar Maheshwari
* Run iOS simulator CI * Fix link errors - scope function linkage using anonymous namespace * Update noexcept test for consistency
2020-11-04Adding std::hash<not_null<T>> tests to notnull_tests.cpp (#947)Jordan Maples [MSFT]
* added std::hash<not_null> tests * nl
2020-01-31remove move constructor for not_null.Jordan Maples [MSFT]
2020-01-16MSVC and CoreChecker warning suppression for tests to CMakeRoelf-Jilling
Suppress CppCoreCheck warnings on GTest macros. Suppress CppCoreCheck advice to use the GSL
2020-01-16Move compiler warning suppression for tests from cpp files to CMakeRoelf-Jilling
2020-01-08added suppression for missing destructor overrideJordan Maples [MSFT]
2019-12-21testing somethingJordan Maples [MSFT]
2019-12-20addressing commentsJordan Maples [MSFT]
2019-12-13change from string to char*Jordan Maples [MSFT]
2019-12-12removed string_view for string in testsJordan Maples [MSFT]
2019-12-12changing text in notices & readme. adding terminate handler for testsJordan Maples [MSFT]
2019-12-07fixing suppression of gtest warnings for gccJordan Maples
2019-12-05attempting to fix the gtest print issues in vs17Jordan Maples [MSFT]
2019-12-04suppressing -Wundef in clang (GTest emitted)Jordan Maples [MSFT]
2019-12-04ignore warnings from gtestJordan Maples [MSFT]
2019-12-04gtest migrationJordan Maples [MSFT]
2019-09-01Thanks to @stayprivates fixed out of bounds access in "TestNotNullostream"B1Z0N
2019-01-15Clang cl (#762)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Fix #739 correct cppcorecheck warnings for clang-cl * Add clang-cl configurations * Corrections Appveyor; Temporarily disable msvc compilation for faster testing (#741) * Add path to clang-cl.exe (#741) * Escape backslash in path (#741) * Update vcpkg (#741) * Check vcpkg version; try without building vcpkg; use latest clang-cl from path (#741) * Fix blocks in ps script (#741) * Try accessing APPVEYOR_BUILD_FOLDER variable (#471) * Update span size() bug confirmation test for GCC 6.5 (#741) * MSVC flags to Clang-cl; disable c++98-compat and undefined macro warnings (#741) * Suppress clang warning on tests (missing-prototypes) (#741) * Fix clang warning -Wnewline-eof (#741) * Fix clang warning -Wdouble-promotion (#741) * Set linker explicitly * Clean condition statement * For Clang, fallback to the AppVeyor installed version of CMake * Fix clang warning -Wmissing-variable-declarations * Fallback to the MSVC linker until vcpkg has been updated * Revert "Fallback to the MSVC linker until vcpkg has been updated" This reverts commit 7263f3289e6e835c32fc7800d0c2d4e58bd21178. * Fix clang warning -Wunused-member-function * Fix clang warning -Wmissing-noreturn * Fix clang warning -Winvalid-noreturn on Windows * Add macro block end comment on large #if blocks * Workaround: fallback to mscv link.exe * Workaround: get msvc paths into PowerShell through intermediate file * Workaround: fix, remove "PATH=" from text * Workaround: try with full-path; and return user PATH * Workaround: fix, escape backslashes * Revert all since "Workaround: fallback to mscv link.exe" did not work on AppVeyor This reverts the commits: bda3d6a428e5d19e97375b2e575b0f51ff1b4bc0 97062933acfb6428535c0fdcab5d94371ce72bfc 0f4fb04bac9c2d091005b791294237250dbe0668 1b0c19afd154f4ffc5ef793014c1bc2324534fd0 a5739ea5f0cd7633527b5e5d3b16a9e3ade7149f * Suppress output of git pull; remove vcpkg from cache * Re-enable AppVeyor builds for all platforms * Correct typo Co-Authored-By: Farwaykorse <Farwaykorse@users.noreply.github.com> * Add Clang-cl 7.0.0 to the supported platforms * Revert "Fix clang warning -Wunused-member-function" This reverts commit 6fe1a4203501145ab4350b9152ecc11f3a30e49a. * Fix or locally suppress clang warning -Wunused-member-function * format touched code and correct comment * git pull --quiet * fix logic error in workaround * fix missing bracket * Suppress output of mkdir * Replace MSBuild with Ninja * Suppress output of 7z * Add architecture flags for Clang * Drop workaround for lld-link * 7-zip Overwrite and Alternative output suppression without suppressing errors Replaces 3c1c0794dd9a29908cc7c38f591bd3c7b4929677 * AppVeyor setup and CMake before build * reorder compiler configuration * remove unnecessary * remove -fno-strict-aliasing * remove -Wsign-conversion, since before v4.0 part of -Wconversion * -Wctor-dtor-privacy is GCC only * remove -Woverloaded-virtual part of -Wmost, part of -Wall * add -Wmissing-noreturn * remove the pragmas for -Wunused-member-function * Re-add MSBuild generator on AppVeyor * Print CMake commands * Add MSBuild toolset selection * Separate Architecture setting * clang-cl: add -Weverything * clang-cl -Wno-c++98-compat * clang-cl -Wno-c++98-compat-pedantic * clang-cl -Wno-missing-prototypes * clang-cl C++14 -Wno-unused-member-function * clang-cl -Wundef __GNUC__ * clang++: add -Weverything * clang++ -Wno-c++98-compat * clang++ -Wno-c++98-compat-pedantic * clang++ -Wno-missing-prototypes * clang++ -Wno-weak-vtables * clang++ C++14 -Wno-unused-member-function * clang++ fix -Wundef _MSC_VER * clang++ -Wno-padded * clang++ solve -Wdeprecated * Add AppleClang compiler target Since CMake v3.0 use of Clang for both is deprecated * clang++ v5.0 C++17 -Wno-undefined-func-template * Add VS2015 + LLVM/clang-cl to AppVeyor * Do not disable constexpr when compiling with clang-cl on Windows * Clean-up clang-only warnings (now under -Weverything) * Revert "Fix clang warning -Winvalid-noreturn on Windows" This reverts commit 2238c4760e86feebb2a18620b77312bd01055f61. * Suppress -Winvalid-noreturn for the MS STL noexception workaround * CMake: put preprocessor definition in target_compile_definitions * Solve compiler warning C4668: __GNUC__ not defined
2019-01-15Dev/annagrin/remove explicit not null constructor (#743)Anna Gringauze
* Added c++17 test configurations for clang5.0 and clang6.0 * Removed explicit not_null constructor, sloppy_not_null, added strict_not_null We added explicit not_null constructor in version 2.0.0. It proved very difficult to switch to the new version for large code bases that adopted previous versions of gsl, due to not_null used extensively in the code. Still, using explicit constructor is very benefitial for new code, since it encorages better API design and make null checks intentional. To resolve the issue, this change: - removes explicit keyword from not_null constructor - removes unneded sloppy_not_null type - adds strict_not_null type to behave the same way as v2 not_null - updates tests * Removed explicit not_null constructor, sloppy_not_null, added strict_not_null We added explicit not_null constructor in version 2.0.0. It proved very difficult to switch to the new version for large code bases that adopted previous versions of gsl, due to not_null used extensively in the code. Still, using explicit constructor is very benefitial for new code, since it encorages better API design and make null checks intentional. To resolve the issue, this change: - removes explicit keyword from not_null constructor - removes unneded sloppy_not_null type - adds strict_not_null type to behave the same way as v2 not_null - updates tests * fixed build break for gcc7 * added more tests * added more non-compiling tests * Addressed PR comments and suppressed a code analysis warning * Fixed test failure in not_null tests
2018-08-13Dev/annagrin/sloppy not null (#712)Anna Gringauze
* 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-13Dev/annagrin/make not null (#711)Anna Gringauze
* 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-13fix cppcorecheck warnings (#703)Anna Gringauze
* 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-06-07Added template argument deduction for not_null (#689)Anna Gringauze
* Added template argument deduction for not_null This allows compilers with c++17 support to infer template instantiation types when calling not_null constructor: int foo(not_null<const int*> x); int main() { int t = 0; not_null x{ &t }; return foo(not_null{ &t }); } * replaced deduction guides by a simple constructor * Updated tests * fixed check for availability of std::byte * testing c++1z on clang * fixed cmakelists extra endif * include cstddef header for clang and gcc in pointers * fixed a typo * fix missing nullptr_t type * fixed typo in CMakeLists.tst * change approach to c++17 testing, step one: revert cmake testing, update clang5.0 package removed using latest c++ due to clang5.0 failing, update clang5.0 travis config to use llvm-toolchain-trusty-5.0 * addressed comments
2018-04-25not_null constructor is now explicit (#659)ericLemanissier
solves #395
2018-03-04make explicit not_null move constructor so it is noexcept (#630)Zac Hansen
* make explicit not_null move constructor so it is noexcept * added test for not_null being noexcet move constructible
2018-02-12add throw on nullptr CTOR test (#577)menete
2017-11-28Applied iwyu --comment to the code base (#588)Tiago
2017-11-14Iosfwd (#586)menete
* Solves #567 with <iosfwd> approach * adds a little testing to not_null ostream
2017-10-31Move GSL pointers to a separate header (#566)Tiago
2017-07-13Move from unittest-cpp to catch for unit testing. (#533)Neil MacIntosh
Many thanks to @rianquinn. This should fix #495, #494 and #529.
2017-05-31Fixes dereferencing operator issue #517 introduced in PR #513 (#516)Alexey Malov
* Fixes issue with dereferencing operator issue #491 introduced in PR #513 dereferencing operator added in PR#513 returned a copy of the object instead of reference to it. Adding decltype(auto) as return type of operator* fixes this issue. * added more tests for not_null::operator*
2017-05-30Adding derference operator to not_null (#513)saurabh singh
2017-04-20Reformat files to follow clang-format style (#492)Tiago
Project files were not following the clang-format style. For people using IDEs were clang-format is always run after a save this would cause unwanted changes. This commit only applies "clang-format -i" to files.
2017-04-13Added support of not_null<smart_ptr> comparison (#473)Alexey Malov
* Added support of not_null<smart_ptr> comparison * The return type of not_null comparison operators is determined using SFINAE #474 * tests for gsl::not_null comparison were added * not_null comparison tests were rewritten to compare pointers to objects located in the same array * not_null<shared_ptr> comparison was simplified
2016-11-04Cleanup additional GCC warningsRian Quinn
When turning on the following flags, several additional warnings were generated, which have been cleaned up in this patch. The flags included: -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wctor-dtor-privacy -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Woverloaded-virtual
2016-08-10Removed .h extension from header files.Galik
2016-08-09Renamed include/ folder to gsl/ to make including the library consistentgalik
whether using it from the development folder, from the installation folder or from being copied into a project. #include <gsl/gsl.h> Updated headers/tests/instructions/cmake build accordingly This PR should address https://github.com/Microsoft/GSL/issues/277 (less the renaming of gsl itself)
2015-11-13Enabled -Wall for gcc and clang.Neil MacIntosh
2015-09-30Renamed namespace to 'gsl'. Renamed macro to configure testing.Neil MacIntosh
2015-09-28Add various copy assignment operators to not_null and maybe_null_*.Kern Handa
Also removed unused constant member variable that seemed to be there to prevent maybe_null_* being used with anything other than a pointer, which is being taken care of with a static_assert now.
2015-09-27not_null and maybe_null variants should only work on nullptr-assignable types.Kern Handa
This is in accordance with the GSL.View guidance on not_null and maybe_null types in the CppCoreGuidelines document.
2015-08-21Initial commit of library files.Neil MacIntosh