C#: Cache the Block and ExpressionBody and streamline implementation too look for both when checking whether a body is available.

This commit is contained in:
Michael Nebel
2026-02-20 09:52:26 +01:00
parent 7d7bbf2a50
commit e8427a59f5
4 changed files with 20 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ namespace Semmle.Extraction.CSharp.Entities
Overrides(trapFile);
if (Symbol.FromSource() && Block is null)
if (Symbol.FromSource() && !HasBody)
{
trapFile.compiler_generated(this);
}