CompileFlags: # Tweak the parse settings
Add: [-xc++, -Wall, -std=c++17] # treat all files as C++, enable more warnings
Remove: -W* # strip all other warning-related flags
Compiler: clang++ # Change argv[0] of compile flags to `clang++`
Diagnostics:
UnusedIncludes: None
Bashrc setup:
comp() {
filename="${1%.cpp}" # 获取输入文件名,去掉扩展名
clang++ -O2 -Wall -Wfatal-error "$1" -o "$filename" # 编译并输出为输入文件名 + .out
}