Tencent / rapidjson

A fast JSON parser/generator for C++ with both SAX/DOM style API
http://rapidjson.org/
Other
14.26k stars 3.53k forks source link

add support for clang-tidy on windows #1770

Open stixx200 opened 4 years ago

stixx200 commented 4 years ago

I want to run clang-tidy on windows on a project, based on rapidjson.

On windows, clang-tidy uses the clang-cl interface. Therefore, the following defines are set / unset:

This combination of defines is not supported by rapidjson yet. (rapidjson.h, section "C++11 features". I hotfixed this issue by defining the RAPIDJSON_HAS_CXX11_RVALUE_REFS before including rapidjson:

#ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS
#if (defined(__clang__) && defined(_MSC_VER) && _MSC_VER >= 1600)
#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
#endif
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
stixx200 commented 3 years ago

Any update?