简体   繁体   English

是否有等效于MSVC(Visual C ++)的-Weffc ++?

[英]Is There a -Weffc++ Equivalent for MSVC (Visual C++)?

I would like to know, is there a MSVC(++) equivalent for the -Weffc++ flag? 我想知道, -Weffc++标志是否有等效的MSVC(++)? What number is it? 这是几号

I didn't see anything like it in the list of compiler warnings/errors on the MS website . 我在MS网站上的编译器警告/错误列表中没有看到类似的内容。

There's not any equivalent. 没有任何对等的东西。

Visual C++ doesn't have warning groups at all, only the warning level slider, and the ability to disable individual warnings. Visual C ++根本没有警告组,只有警告级别滑块和禁用单个警告的功能。 So none of the GCC/clang warning group options have an equivalent. 因此,所有GCC / clang警告组选项都没有等效项。

Beyond that, the Effective C++ book is rather old and some of its advice is no longer considered to be best practices. 除此之外,Effective C ++本书相当古老,其一些建议已不再被视为最佳实践。 So enforcement has minimal value. 因此,执行具有最小的价值。

Some editions of Visual C++ come with code analysis, which has many more of these checks than the basic compiler. 某些版本的Visual C ++附带了代码分析功能,与基本编译器相比,这些功能具有更多的检查功能。 That's turned on using /analyze , documentation is here: https://docs.microsoft.com/en-us/visualstudio/code-quality/code-analysis-for-c-cpp-overview 这是使用/analyze打开的,文档在这里: https : //docs.microsoft.com/zh-cn/visualstudio/code-quality/code-analysis-for-c-cpp-overview

可能完全不同,但是从Visual Studio 2015开始,有C ++核心准则检查器: https : //docs.microsoft.com/zh-cn/visualstudio/code-quality/using-the-cpp-core-guidelines-checkers

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM