Don't use 'system' include/framework paths as fallback 'user' include/framework paths in the base config #13247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like this code was falling back to inserting the compiler default 'system' include paths (and framework search paths) into the 'user' base configuration. I don't think this is correct. If a compiler is not specified (the only case these includes were being used), the detected default compiler will be used (if trusted) and its system include paths used automatically (without requiring them added this way).
Maybe this was intended to fall back to inserting these into the 'user' config when falling back to a detected default compiler that isn't trusted? But if the compiler isn't trusted, we wouldn't have been able to query it for system include paths. In the case of cl.exe (which we don't need to query), that is implicitly trusted (since we don't actually need to query it).