Clang(和 GCC)编译错误可能会附带有关如何修复它们的建议:“Fix-it Hints”。 Clang(或者可能是另一个 LLVM 工具)是否有一个选项可以应用这些提示?我在 https://clang.llvm.org/docs/UsersManual.html 中没有看到一个.显然这样的程序可以使用-fdiagnostics-parseable-fixits
编写;这不是我要问的。
最佳答案
是的。
-fix-only-warnings Apply fix-it advice only for warnings, not errors -fix-what-you-can Apply fix-it advice even in the presence of unfixable errors -fixit-recompile Apply fix-it changes and recompile -fixit-to-temporary Apply fix-it changes to temporary files -fixit=<value> Apply fix-it advice creating a file with the given suffix -fixit Apply fix-it advice to the input source
关于c++ - 从命令行自动应用 Clang 的修复提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49748996/