@@ -355,9 +355,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
355
355
var preprocErr error
356
356
var preprocStderr []byte
357
357
358
- var include string
358
+ var missingIncludeH string
359
359
if unchanged && cache .valid {
360
- include = cache .Next ().Include
360
+ missingIncludeH = cache .Next ().Include
361
361
if first && ctx .Verbose {
362
362
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
363
363
}
@@ -366,25 +366,25 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
366
366
// Unwrap error and see if it is an ExitError.
367
367
if preprocErr == nil {
368
368
// Preprocessor successful, done
369
- include = ""
369
+ missingIncludeH = ""
370
370
} else if _ , isExitErr := errors .Cause (preprocErr ).(* exec.ExitError ); ! isExitErr || preprocStderr == nil {
371
371
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
372
372
return errors .WithStack (preprocErr )
373
373
} else {
374
- include = IncludesFinderWithRegExp (string (preprocStderr ))
375
- if include == "" && ctx .Verbose {
374
+ missingIncludeH = IncludesFinderWithRegExp (string (preprocStderr ))
375
+ if missingIncludeH == "" && ctx .Verbose {
376
376
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
377
377
}
378
378
}
379
379
}
380
380
381
- if include == "" {
381
+ if missingIncludeH == "" {
382
382
// No missing includes found, we're done
383
383
cache .ExpectEntry (sourcePath , "" , nil )
384
384
return nil
385
385
}
386
386
387
- library := ResolveLibrary (ctx , include )
387
+ library := ResolveLibrary (ctx , missingIncludeH )
388
388
if library == nil {
389
389
// Library could not be resolved, show error
390
390
// err := runCommand(ctx, &GCCPreprocRunner{SourceFilePath: sourcePath, TargetFileName: paths.New(constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E), Includes: includes})
@@ -408,7 +408,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
408
408
// include path and queue its source files for further
409
409
// include scanning
410
410
ctx .ImportedLibraries = append (ctx .ImportedLibraries , library )
411
- appendIncludeFolder (ctx , cache , sourcePath , include , library .SourceDir )
411
+ appendIncludeFolder (ctx , cache , sourcePath , missingIncludeH , library .SourceDir )
412
412
sourceDirs := library .SourceDirs ()
413
413
for _ , sourceDir := range sourceDirs {
414
414
queueSourceFilesFromFolder (ctx , ctx .CollectedSourceFiles , library , sourceDir .Dir , sourceDir .Recurse )
0 commit comments