How to conf vscode-clangd to use c++11 for lint?
I added both complie_commands.json
and complie_flags.txt
in workshop.
workshop
|-complie_commands.json
|-complie_flags.txt
|-list.cpp
complie_commands.json
[
{ "directory": "pathto/workshop/",
"command": "/opt/rh/llvm-toolset-7/root/usr/bin/clang++ -o file *cpp -std=c++11"}
]
compile_flags.txt
-std=c++11
It couldn't recognize auto
with error:
'auto' type specifier is a C++11 extension