You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S3949 is generating MLIR instructions for all C# syntaxes, based on the CFG. When encountering an unknown syntax, it will throw an exception together with an AD0001 warning. It fails for C# 9 syntax.
error AD0001: Analyzer 'SonarAnalyzer.Rules.CSharp.CbdeHandlerRule' threw an exception of type 'SonarAnalyzer.CBDE.CbdeException' with message 'Top level error in CBDE handling: WithExpression
Details:
Inner exception:
Stack trace: at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildExpression(ExpressionSyntax expression, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildVariableDeclarator(VariableDeclaratorSyntax variableDeclarator, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildVariableDeclaration(VariableDeclarationSyntax declaration, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildStatement(StatementSyntax statement, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildStatements(IEnumerable`1 statements, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildBlock(BlockSyntax block, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.BuildStatement(StatementSyntax statement, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraphBuilder.Build(SyntaxNode node, Block currentBlock)
at SonarAnalyzer.ControlFlowGraph.AbstractControlFlowGraphBuilder.Build()
at SonarAnalyzer.ControlFlowGraph.CSharp.CSharpControlFlowGraph.Create(CSharpSyntaxNode node, SemanticModel semanticModel)
at SonarAnalyzer.CBDE.MlirExporter.ExportFunction(MethodDeclarationSyntax method)
at SonarAnalyzer.CBDE.CbdeHandler.ExportFunctionMlir(SyntaxTree tree, SemanticModel model, MlirExporterMetrics exporterMetrics, String mlirFileName)
at SonarAnalyzer.CBDE.CbdeHandler.<RegisterMlirAndCbdeInOneStep>b__31_0(CompilationAnalysisContext c)'. [C:\Workspace\sonar-dotnet\sonaranalyzer-dotnet\its\sources\Net5\Net5.csproj
Note: The regression ITs are considering AD0001 warnings as errors. Thus when running the Net5 integration test, we disable S3949. We should re-enable it after fixing this issue (see sonaranalyzer-dotnet/its/regression-test.ps1).
The text was updated successfully, but these errors were encountered:
S3949 is generating MLIR instructions for all C# syntaxes, based on the CFG. When encountering an unknown syntax, it will throw an exception together with an AD0001 warning. It fails for C# 9 syntax.
Note: The regression ITs are considering AD0001 warnings as errors. Thus when running the
Net5
integration test, we disable S3949. We should re-enable it after fixing this issue (see sonaranalyzer-dotnet/its/regression-test.ps1).The text was updated successfully, but these errors were encountered: