Commit Graph

9 Commits

Author SHA1 Message Date
Sean McBride 1cf14f8c03 Source: fix many -Wmissing-prototypes warnings by marking functions static 2021-10-25 12:27:09 -04:00
Brad King b6c4d93dcd clang-analyzer: Suppress warnings in intentional use-after-move cases 2021-06-03 14:59:55 -04:00
Kyle Edwards 0668120398 cm::optional: Fix move assignment 2020-10-21 14:23:43 -04:00
Kyle Edwards 7e1304c6e6 cm::optional: Add comparison operators 2020-09-07 08:50:09 -04:00
Kyle Edwards c854e9eba5 Refactor: Add ASSERT_TRUE() macro to testOptional.cxx 2020-09-06 17:39:27 -04:00
Kyle Edwards e8bd920df1 Tests: Fix reliance on undefined behavior of cm::optional
The test for cm::optional assumed that *opt would return a reference
to a non-constructed object if opt.has_value() is false. However, on
certain systems that build CMake with flags to harden the build,
this condition aborts rather than returning the invalid reference.
Fix this by getting the reference only when the cm::optional is
known to actually have a value.

Fixes: #19964
2019-11-13 13:56:22 -05:00
Kitware Robot ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Marc Chevrier c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Kyle Edwards 197c5e12ad Source: Add cm::optional 2019-08-23 08:43:35 -04:00