Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1656,8 +1656,10 @@ export class CppProperties {
let compilerPathNeedsQuotes: boolean = false;
let compilerMessage: string | undefined;
const compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(compilerPath);
// Don't squiggle invalid cl.exe paths because it could be for an older preview build.
if (compilerPathAndArgs.compilerName.toLowerCase() !== "cl.exe" && compilerPathAndArgs.compilerPath !== undefined) {
const compilerLowerCase: string = compilerPathAndArgs.compilerName.toLowerCase();
const isClCompiler: boolean = compilerLowerCase === "cl" || compilerLowerCase === "cl.exe";
// Don't squiggle for invalid cl and cl.exe paths.
if (compilerPathAndArgs.compilerPath && !isClCompiler) {
// Squiggle when the compiler's path has spaces without quotes but args are used.
compilerPathNeedsQuotes = (compilerPathAndArgs.additionalArgs && compilerPathAndArgs.additionalArgs.length > 0)
&& !compilerPath.startsWith('"')
Expand All @@ -1676,7 +1678,7 @@ export class CppProperties {
}
const isWSL: boolean = isWindows && compilerPath.startsWith("/");
let compilerPathExists: boolean = true;
if (this.rootUri) {
if (this.rootUri && !isClCompiler) {
const checkPathExists: any = util.checkPathExistsSync(compilerPath, this.rootUri.fsPath + path.sep, isWindows, isWSL, true);
compilerPathExists = checkPathExists.pathExists;
compilerPath = checkPathExists.path;
Expand Down