@@ -335,9 +335,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
335
335
var preprocErr error
336
336
var preprocStderr []byte
337
337
338
- var include string
338
+ var missingIncludeH string
339
339
if unchanged && cache .valid {
340
- include = cache .Next ().Include
340
+ missingIncludeH = cache .Next ().Include
341
341
if first && ctx .Verbose {
342
342
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
343
343
}
@@ -346,25 +346,25 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
346
346
// Unwrap error and see if it is an ExitError.
347
347
if preprocErr == nil {
348
348
// Preprocessor successful, done
349
- include = ""
349
+ missingIncludeH = ""
350
350
} else if _ , isExitErr := errors .Cause (preprocErr ).(* exec.ExitError ); ! isExitErr || preprocStderr == nil {
351
351
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
352
352
return errors .WithStack (preprocErr )
353
353
} else {
354
- include = IncludesFinderWithRegExp (string (preprocStderr ))
355
- if include == "" && ctx .Verbose {
354
+ missingIncludeH = IncludesFinderWithRegExp (string (preprocStderr ))
355
+ if missingIncludeH == "" && ctx .Verbose {
356
356
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
357
357
}
358
358
}
359
359
}
360
360
361
- if include == "" {
361
+ if missingIncludeH == "" {
362
362
// No missing includes found, we're done
363
363
cache .ExpectEntry (sourcePath , "" , nil )
364
364
return nil
365
365
}
366
366
367
- library := ResolveLibrary (ctx , include )
367
+ library := ResolveLibrary (ctx , missingIncludeH )
368
368
if library == nil {
369
369
// Library could not be resolved, show error
370
370
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
@@ -388,7 +388,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
388
388
// include path and queue its source files for further
389
389
// include scanning
390
390
ctx .ImportedLibraries = append (ctx .ImportedLibraries , library )
391
- appendIncludeFolder (ctx , cache , sourcePath , include , library .SourceDir )
391
+ appendIncludeFolder (ctx , cache , sourcePath , missingIncludeH , library .SourceDir )
392
392
sourceDirs := library .SourceDirs ()
393
393
for _ , sourceDir := range sourceDirs {
394
394
queueSourceFilesFromFolder (ctx , ctx .CollectedSourceFiles , library , sourceDir .Dir , sourceDir .Recurse )
0 commit comments