Open alzix opened 1 year ago
It's a false positive - we do not use arrays, but only braced initialization. And idea how to fix this?
Sounds like a clang issue though, right?
I guess. The code surely does not define a C array.
how about static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;
in https://github.com/nlohmann/json/blob/c71ecde505ebf236048a731c81ae8ecaf2b260a8/include/nlohmann/detail/macro_scope.hpp#L212
Description
clang-tidy emits a warning on a code using NLOHMANN_JSON_SERIALIZE_ENUM, this requires to to put no-lint comments on the usage code
Reproduction steps
run clang-tidy on the code using
NLOHMANN_JSON_SERIALIZE_ENUM
macroExpected vs. actual results
expected no warnings
Minimal code example
Error messages
Compiler and operating system
Apple clang version 14.0.0, MacOS
Library version
v3.11.2
Validation
develop
branch is used.