Skip to content

Commit f82b1be

Browse files
authored
Fix c_cpp_properties.json squiggle on recursively found forcedInclde. (#7722)
1 parent e0c9020 commit f82b1be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,10 @@ export class CppProperties {
17461746
}
17471747
let message: string;
17481748
if (!pathExists) {
1749+
if (curOffset >= forcedIncludeStart && curOffset <= forcedeIncludeEnd
1750+
&& !path.isAbsolute(resolvedPath)) {
1751+
continue; // Skip the error, because it could be resolved recursively.
1752+
}
17491753
message = localize('cannot.find2', "Cannot find \"{0}\".", resolvedPath);
17501754
newSquiggleMetrics.PathNonExistent++;
17511755
} else {

0 commit comments

Comments
 (0)