Description
@sean-mcmanus - thanks for the clarification! However, the [Customizing default settings](https://code.visualstudio.com/docs/cpp/customize-default-settings-cpp) article doesn't seem to indicate this order of evaluation.
In the Updated c_cpp_properties.json syntax section, it states the following:
If a property is missing from
c_cpp_properties.json
, the extension will use the value in the VS Code setting.
And then in the System include path/defines resolution strategies section for when the open file is found in the compileCommands
database, the following order of operations is listed:
- If
systemIncludePath
has a value, use it (continue to the next step to search for system defines).- If
compilerPath
is valid, query it.- Interpret the first argument in the command as the compiler and attempt to query it.
- If
compilerPath
is "", use an empty array for system include path and defines.- If
compilerPath
is undefined, look for a compiler on the system and query it.
Based on these details, it's not clear from the documentation that the VS Code setting is evaluated differently from the value provided in the c_cpp_properties.json
file. If the compilerPath
from the VS Code setting does have lower presence than the command from the compile commands database, then it would be helpful if the System include path/defines resolution strategies section could be updated to reflect this.
Originally posted by @tcm0116 in #10842 (comment)