Skip to content

Commit 3a4623b

Browse files
authored
Merge pull request #11907 from michaelnebel/csharp/cil/attributes
C#: CIL attributes
2 parents e0ccb93 + 8e3e650 commit 3a4623b

File tree

4 files changed

+8374
-3
lines changed

4 files changed

+8374
-3
lines changed

csharp/extractor/Semmle.Extraction.CIL/Entities/DefinitionMethod.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public override IEnumerable<IExtractionProduct> Contents
9292
yield return Tuples.cil_parameter_out(pe);
9393
if (p.Attributes.HasFlag(ParameterAttributes.In))
9494
yield return Tuples.cil_parameter_in(pe);
95-
Attribute.Populate(Context, pe, p.GetCustomAttributes());
95+
foreach (var c in Attribute.Populate(Context, pe, p.GetCustomAttributes()))
96+
yield return c;
9697
}
9798

9899
yield return Tuples.metadata_handle(this, Context.Assembly, MetadataTokens.GetToken(handle));
@@ -205,7 +206,8 @@ public override IEnumerable<IExtractionProduct> Contents
205206
yield return Tuples.cil_newslot(this);
206207

207208
// Populate attributes
208-
Attribute.Populate(Context, this, md.GetCustomAttributes());
209+
foreach (var c in Attribute.Populate(Context, this, md.GetCustomAttributes()))
210+
yield return c;
209211
}
210212
}
211213

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Attributes on methods in CIL are now extracted (Bugfix).

0 commit comments

Comments
 (0)