fix utest asan
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
dc0626497e
commit
f62067ef83
|
@ -40,7 +40,7 @@ endif()
|
|||
|
||||
if (ENABLE_ASAN)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fsanitize=undefined")
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer -fsanitize=undefined")
|
||||
else()
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libsan -fsanitize=undefined")
|
||||
endif()
|
||||
|
|
|
@ -60,7 +60,7 @@ std::string CodeAsString(const StatusCode c) {
|
|||
return std::string(s);
|
||||
}
|
||||
|
||||
Status::Status(StatusCode c) noexcept : code_(c), err_msg_(std::move(CodeAsString(c))) {}
|
||||
Status::Status(StatusCode c) noexcept : code_(c), err_msg_(CodeAsString(c)) {}
|
||||
|
||||
Status::Status() noexcept : code_(StatusCode::kOK), err_msg_("") {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue