Comments (2)
I've seen this in the work code base as well, and I too would like it to go away. I'll hopefully create some time to do it soon. Thanks for the report.
from outcome.
Possibly related, I've started to observe clang-analyzer-core.uninitialized.Assign
diagnostics being triggered by OUTCOME_TRY
:
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\status-code/status_code.hpp:378:18: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
, _value(static_cast<status_code_storage &&>(o)._value)
[...]
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:197:21: note: expanded from macro 'OUTCOME_TRYV2_SUCCESS_LIKELY'
auto unique##_f(::OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:95:10: note: Calling 'basic_result::as_failure'
return static_cast<T &&>(v).as_failure();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/experimental/../basic_result.hpp:707:12: note: Calling 'failure<system_error2::errored_status_code<system_error2::erased<long long>>>'
return failure(static_cast<basic_result &&>(*this).assume_error(), hooks::spare_storage(this));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/experimental/../success_failure.hpp:245:10: note: Calling constructor for 'failure_type<system_error2::errored_status_code<system_error2::erased<long long>>, void>'
return failure_type<std::decay_t<EC>>{static_cast<EC &&>(v), spare_storage};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like clang-tidy cannot deduce that .has_failure()
⊢ assume_error() is initialized
holds.
full log
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\status-code/status_code.hpp:378:18: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
, _value(static_cast<status_code_storage &&>(o)._value)
^
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:94:5: note: Taking true branch
DPLX_TRY(fetch_content_impl());
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\dplx/dp/disappointment.hpp:194:23: note: expanded from macro 'DPLX_TRY'
#define DPLX_TRY(...) OUTCOME_TRY(__VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:336:26: note: expanded from macro 'OUTCOME_TRY'
#define OUTCOME_TRY(...) OUTCOME_TRY_CALL_OVERLOAD(OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:155:29: note: expanded from macro 'OUTCOME_TRY_CALL_OVERLOAD'
OUTCOME_TRY_OVERLOAD_GLUE(OUTCOME_TRY_OVERLOAD_MACRO(name, OUTCOME_TRY_COUNT_ARGS_MAX8(__VA_ARGS__)), (__VA_ARGS__))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:151:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO1'
#define OUTCOME_TRY_OVERLOAD_MACRO1(name, count) OUTCOME_TRY_OVERLOAD_MACRO2(name, count)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:150:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO2'
#define OUTCOME_TRY_OVERLOAD_MACRO2(name, count) name##count
^
note: expanded from here
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:96:32: note: Assuming the condition is false
for (auto &recordContainer : mContents.record_containers)
^
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:120:11: note: Calling 'file_database_handle::retire_to_storage'
(void)retire_to_storage(mContents);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:337:5: note: Taking true branch
DPLX_TRY(auto &&outStream,
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\dplx/dp/disappointment.hpp:194:23: note: expanded from macro 'DPLX_TRY'
#define DPLX_TRY(...) OUTCOME_TRY(__VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:336:26: note: expanded from macro 'OUTCOME_TRY'
#define OUTCOME_TRY(...) OUTCOME_TRY_CALL_OVERLOAD(OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:155:29: note: expanded from macro 'OUTCOME_TRY_CALL_OVERLOAD'
OUTCOME_TRY_OVERLOAD_GLUE(OUTCOME_TRY_OVERLOAD_MACRO(name, OUTCOME_TRY_COUNT_ARGS_MAX8(__VA_ARGS__)), (__VA_ARGS__))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:151:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO1'
#define OUTCOME_TRY_OVERLOAD_MACRO1(name, count) OUTCOME_TRY_OVERLOAD_MACRO2(name, count)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:150:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO2'
#define OUTCOME_TRY_OVERLOAD_MACRO2(name, count) name##count
^
note: expanded from here
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:341:5: note: Taking false branch
DPLX_TRY(dp::encode(outStream, contents));
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\dplx/dp/disappointment.hpp:194:23: note: expanded from macro 'DPLX_TRY'
#define DPLX_TRY(...) OUTCOME_TRY(__VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:336:26: note: expanded from macro 'OUTCOME_TRY'
#define OUTCOME_TRY(...) OUTCOME_TRY_CALL_OVERLOAD(OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:155:29: note: expanded from macro 'OUTCOME_TRY_CALL_OVERLOAD'
OUTCOME_TRY_OVERLOAD_GLUE(OUTCOME_TRY_OVERLOAD_MACRO(name, OUTCOME_TRY_COUNT_ARGS_MAX8(__VA_ARGS__)), (__VA_ARGS__))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:151:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO1'
#define OUTCOME_TRY_OVERLOAD_MACRO1(name, count) OUTCOME_TRY_OVERLOAD_MACRO2(name, count)
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:150:50: note: expanded from macro 'OUTCOME_TRY_OVERLOAD_MACRO2'
#define OUTCOME_TRY_OVERLOAD_MACRO2(name, count) name##count
^
note: expanded from here
D:\devel\source\deeplex\deeplog\src\dplx\dlog\file_database.cpp:341:5: note: Calling 'try_operation_return_as<outcome_v2::basic_result<void, system_error2::errored_status_code<system_error2::erased<long long>>, outcome_v2::experimental::policy::status_code_throw<void, system_error2::errored_status_code<system_error2::erased<long long>>, void>>>'
DPLX_TRY(dp::encode(outStream, contents));
^
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\dplx/dp/disappointment.hpp:194:23: note: expanded from macro 'DPLX_TRY'
#define DPLX_TRY(...) OUTCOME_TRY(__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:336:26: note: expanded from macro 'OUTCOME_TRY'
#define OUTCOME_TRY(...) OUTCOME_TRY_CALL_OVERLOAD(OUTCOME_TRY_INVOKE_TRY, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:155:29: note: expanded from macro 'OUTCOME_TRY_CALL_OVERLOAD'
OUTCOME_TRY_OVERLOAD_GLUE(OUTCOME_TRY_OVERLOAD_MACRO(name, OUTCOME_TRY_COUNT_ARGS_MAX8(__VA_ARGS__)), (__VA_ARGS__))
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:300:36: note: expanded from macro 'OUTCOME_TRY_INVOKE_TRY1'
#define OUTCOME_TRY_INVOKE_TRY1(a) OUTCOME_TRYV(a)
^~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:221:27: note: expanded from macro 'OUTCOME_TRYV'
#define OUTCOME_TRYV(...) OUTCOME_TRYV2_SUCCESS_LIKELY(OUTCOME_TRY_UNIQUE_NAME, return, deduce, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:197:21: note: expanded from macro 'OUTCOME_TRYV2_SUCCESS_LIKELY'
auto unique##_f(::OUTCOME_V2_NAMESPACE::try_operation_return_as(static_cast<decltype(unique) &&>(unique))); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/try.hpp:95:10: note: Calling 'basic_result::as_failure'
return static_cast<T &&>(v).as_failure();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/experimental/../basic_result.hpp:707:12: note: Calling 'failure<system_error2::errored_status_code<system_error2::erased<long long>>>'
return failure(static_cast<basic_result &&>(*this).assume_error(), hooks::spare_storage(this));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\devel\source\deeplex\deeplog\build\x64-windows-clang\vcpkg_installed\x64-windows-static\include\outcome/experimental/../success_failure.hpp:245:10: note: Calling constructor for 'failure_type<system_error2::errored_status_code<system_error2::erased<long long>>, void>'
return failure_type<std::decay_t<EC>>{static_cast<EC &&>(v), spare_storage};
from outcome.
Related Issues (20)
- `__cpp_modules` now defined in latest MSVC (version > 16.9) HOT 11
- OUTCOME_TRY does not propagate spare storage HOT 1
- Add check that `basic-outcome.hpp` never includes headers it is documented to not include
- warning: the 'bool' keyword is not allowed in a C++20 concept definition HOT 5
- error C2230: could not find module 'BOOST_OUTCOME_V2_BOOST_OUTCOME_C_MODULE_NAME' HOT 1
- Outcome failed to build due to error C2230 C7568 C2955 C2057 on windows with MSVC HOT 3
- Worked example for experimental features failed to compile on g++-7 HOT 6
- constexpr basic_result? HOT 14
- Example doesn't compile HOT 7
- checked<T,E> is not move assignable if T is not copy constructible HOT 5
- Problem with void value type and nontrivial assignment operators HOT 2
- Build fails with ninja generator HOT 2
- Build fails with MSVC HOT 2
- Build fails with GCC 10 HOT 4
- Errors with non-embedded status code HOT 3
- .
- msvc 2022 C2027, compilation error HOT 3
- hooks.cpp, expected-pass.cpp fail on msvc-14.2; expected-pass.cpp fails on msvc-14.3 HOT 22
- WG21-P1886 errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from outcome.