third_party_rust_cxx/.clang-tidy

19 lines
620 B
Plaintext
Raw Normal View History

Checks:
clang-analyzer-*,
clang-diagnostic-*,
cppcoreguidelines-*,
modernize-*,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
2020-11-26 04:50:32 +00:00
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-modernize-use-default-member-init,
Suppress modernize-use-equals-default Clang-tidy emits this warning: src/cxx.cc:338:3: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] MaybeUninit() {} ^ ~~ = default; src/cxx.cc:339:3: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] ~MaybeUninit() {} ^ ~~ = default; but following the suggestion makes the code not compile (the default implementation of the default constructor "is implicitly deleted because the default definition would be ill-formed"). src/cxx.cc: In function ‘std::string* cxxbridge1$std$shared_ptr$string$uninit(std::shared_ptr<std::__cxx11::basic_string<char> >*)’: src/cxx.cc:465:48: error: use of deleted function ‘rust::cxxbridge1::{anonymous}::MaybeUninit<T>::MaybeUninit() [with T = std::__cxx11::basic_string<char>]’ 465 | reinterpret_cast<CXX_TYPE *>(new rust::MaybeUninit<CXX_TYPE>); \ | ^~~~~~~~~~~~~~~~~~~~~ src/cxx.cc:512:3: note: in expansion of macro ‘SHARED_PTR_OPS’ 512 | MACRO(string, std::string) | ^~~~~ src/cxx.cc:517:1: note: in expansion of macro ‘FOR_EACH_SHARED_PTR’ 517 | FOR_EACH_SHARED_PTR(SHARED_PTR_OPS) | ^~~~~~~~~~~~~~~~~~~ src/cxx.cc:338:3: note: ‘rust::cxxbridge1::{anonymous}::MaybeUninit<T>::MaybeUninit() [with T = std::__cxx11::basic_string<char>]’ is implicitly deleted because the default definition would be ill-formed: 338 | MaybeUninit() = default; | ^~~~~~~~~~~ src/cxx.cc:337:5: error: union member ‘rust::cxxbridge1::{anonymous}::MaybeUninit<std::__cxx11::basic_string<char> >::value’ with non-trivial ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 337 | T value; | ^~~~~
2020-12-11 03:54:11 +00:00
-modernize-use-equals-default,
-modernize-use-trailing-return-type,
HeaderFilterRegex: cxx\.h