Files
codeql/csharp/ql/test/library-tests/attributes/AttributeElements.ql
Tom Hvitved d6515e7963 C#: Changes to extraction of attributes in assemblies
- Only cache on `AttributeData` and not the parent entity.
- Move `CreateGeneratedExpressionFromArgument` to `Expression.cs`.
- Restructure the various `CreateGenerated` methods so child entities are
  created inside them (and therefore no need to expose child index logic).
- Add locations to generated expressions.
- Avoid linear lookup in `CompilationUnit.cs`.
- Consolidate tests.
2020-11-11 09:54:51 +01:00

8 lines
275 B
Plaintext

import csharp
from Attributable element, Attribute attribute
where
attribute = element.getAnAttribute() and
(element.(Element).fromSource() or element.(Assembly).getName() in ["attributes", "Assembly1"])
select element, attribute, attribute.getType().getQualifiedName()