From 1e2d1ef7157e23afaac064964e6523f2bace5fb8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 26 Jun 2024 11:37:07 +0200 Subject: [PATCH] Use dedicated API to get generated syntax trees --- .../extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index e968ef239422..7bf2b08985a9 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -169,9 +169,7 @@ static bool filter(CompilerCall compilerCall) } var args = reader.ReadCommandLineArguments(compilerCall); - - // Generated syntax trees are always added to the end of the list of syntax trees. - var generatedSyntaxTrees = compilation.SyntaxTrees.Skip(compilationData.Compilation.SyntaxTrees.Count()); + var generatedSyntaxTrees = compilationData.GetGeneratedSyntaxTrees(); using var analyser = new BinaryLogAnalyser(new LogProgressMonitor(logger), logger, pathTransformer, canonicalPathCache, options.AssemblySensitiveTrap);