mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Extract active flag from directives, fix missing assembly location
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
{
|
||||
PopulatePreprocessor(trapFile);
|
||||
|
||||
trapFile.preprocessor_directive_active(this, trivia.IsActive);
|
||||
trapFile.preprocessor_directive_location(this, cx.Create(ReportingLocation));
|
||||
|
||||
if (!cx.Extractor.Standalone)
|
||||
|
||||
@@ -607,6 +607,13 @@ namespace Semmle.Extraction.CSharp
|
||||
trapFile.WriteTuple("preprocessor_directive_assembly", directive, assembly);
|
||||
}
|
||||
|
||||
internal static void preprocessor_directive_active<TDirective>(this TextWriter trapFile,
|
||||
PreprocessorDirective<TDirective> directive, bool isActive)
|
||||
where TDirective : DirectiveTriviaSyntax
|
||||
{
|
||||
trapFile.WriteTuple("preprocessor_directive_active", directive, isActive ? 1 : 0);
|
||||
}
|
||||
|
||||
internal static void pragma_warnings(this TextWriter trapFile, PragmaWarningDirective pragma, int kind)
|
||||
{
|
||||
trapFile.WriteTuple("pragma_warnings", pragma, kind);
|
||||
@@ -706,7 +713,5 @@ namespace Semmle.Extraction.CSharp
|
||||
{
|
||||
trapFile.WriteTuple("directive_define_symbols", symb, name);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user