bug report: continuous warning of "incompatible with c++98"
See original GitHub issueI have installed clang and cppcheck as checkers. I have already set "c-cpp-flylint.clang.standard": ["c++11", "c++14", "c++17"]
and "c-cpp-flylint.cppcheck.standard": ["c++11"]
in my settings.json file.
But every time I save a file I get a warning notification like below. There is no problem in building the project. It only appears in the static analysis.
I am using Ubuntu 18.04 with VS Code 1.25.1.
vscode-c-cpp-flylint: ‘Line could not be parsed: warning: ‘auto’ type specifier is incompatible with C++98 [Semantic Issue]’ while validating: /home/<xxxx>/Code/XXXX/src/runner/Master_handler.cpp. Please analyze the ‘C/C++ FlyLint’ Output console. Stacktrace: Error: Line could not be parsed: warning: ‘auto’ type specifier is incompatible with C++98 [Semantic Issue] at lines.forEach.line (/home/<xxxx>/.vscode/extensions/jbenden.c-cpp-flylint-1.1.1/server/linters/linter.js:221:31) at Array.forEach (native) at Clang.parseLines (/home/<xxxx>/.vscode/extensions/jbenden.c-cpp-flylint-1.1.1/server/linters/linter.js:205:15) at Clang.lint (/home/<xxxx>/.vscode/extensions/jbenden.c-cpp-flylint-1.1.1/server/linters/linter.js:195:21) at lintersCopy.forEach.linter (/home/<xxxx>/.vscode/extensions/jbenden.c-cpp-flylint-1.1.1/server/server.js:242:43) at Array.forEach (native) at /home/<xxxx>/.vscode/extensions/jbenden.c-cpp-flylint-1.1.1/server/server.js:239:21 at Generat…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Try
"c-cpp-flylint.clang.extraArgs": ["-Wno-c++98-compat"],
also try
"no-c++98-compat-pedantic"
https://clang.llvm.org/docs/DiagnosticsReference.html#id120with
-Weverything
you need to “black-list” warnings that don’t apply (too noisy), instead of “white-listing” the warnings you want. I believe the default is["all", "extra", "everything"]
prolly why you get c98 compat warnings in c++17 mode.