diff options
author | Brad King <brad.king@kitware.com> | 2021-06-03 18:53:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-03 18:59:55 (GMT) |
commit | b6c4d93dcd85b8e2c512abf83c25c2270cead1c8 (patch) | |
tree | 77b28ff7c7537d5e4b1fef268e8fdce78618226a /Tests/CMakeLib/testOptional.cxx | |
parent | c1b575f4d110231617a7cb62187d553d67faad31 (diff) | |
download | CMake-b6c4d93dcd85b8e2c512abf83c25c2270cead1c8.zip CMake-b6c4d93dcd85b8e2c512abf83c25c2270cead1c8.tar.gz CMake-b6c4d93dcd85b8e2c512abf83c25c2270cead1c8.tar.bz2 |
clang-analyzer: Suppress warnings in intentional use-after-move cases
Diffstat (limited to 'Tests/CMakeLib/testOptional.cxx')
-rw-r--r-- | Tests/CMakeLib/testOptional.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testOptional.cxx b/Tests/CMakeLib/testOptional.cxx index 2d7dd7c..9d4b72a 100644 --- a/Tests/CMakeLib/testOptional.cxx +++ b/Tests/CMakeLib/testOptional.cxx @@ -301,12 +301,14 @@ static bool testMoveConstruct(std::vector<Event>& expected) cm::optional<EventLogger> o3{}; const cm::optional<EventLogger> o4{ std::move(o3) }; +#ifndef __clang_analyzer__ /* cplusplus.Move */ expected = { { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, { Event::MOVE_CONSTRUCT, &*o2, &*o1, 4 }, { Event::DESTRUCT, &*o2, nullptr, 4 }, { Event::DESTRUCT, &*o1, nullptr, 4 }, }; +#endif return true; } |