Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace UnaryOperator("throw") with ThrowStatement for CXX #1815

Merged
merged 9 commits into from
Nov 6, 2024
Merged

Conversation

KuechA
Copy link
Contributor

@KuechA KuechA commented Nov 5, 2024

Replaces the usage of UnaryOperator with operatorCode "throw" with the new node ThrowStatement for the CXX-frontend. We have to change the class ThrowStatement to inherit from Expression since this is required in cxx (for the handler, so probably also by the language). This means that we also rename ThrowStatement to ThrowExpression.

@KuechA KuechA added the cxx Related to C/C++ language parsing label Nov 5, 2024
@KuechA KuechA changed the title Replace UnaryOperator("throw") with ThrowStatement or CXX Replace UnaryOperator("throw") with ThrowStatement for CXX Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.23%. Comparing base (c516e81) to head (4b3690c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...de/fraunhofer/aisec/cpg/graph/ExpressionBuilder.kt 83.33% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...kotlin/de/fraunhofer/aisec/cpg/graph/Extensions.kt 73.60% <ø> (ø)
.../de/fraunhofer/aisec/cpg/graph/StatementBuilder.kt 72.86% <ø> (-0.47%) ⬇️
...in/de/fraunhofer/aisec/cpg/graph/builder/Fluent.kt 86.48% <100.00%> (ø)
...ofer/aisec/cpg/graph/statements/ThrowExpression.kt 75.86% <100.00%> (ø)
...n/kotlin/de/fraunhofer/aisec/cpg/passes/DFGPass.kt 83.24% <100.00%> (ø)
...hofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt 89.30% <100.00%> (-0.33%) ⬇️
...hofer/aisec/cpg/frontends/cxx/ExpressionHandler.kt 71.80% <100.00%> (ø)
...hofer/aisec/cpg/frontends/java/StatementHandler.kt 77.36% <100.00%> (ø)
...hofer/aisec/cpg/frontends/llvm/StatementHandler.kt 62.99% <100.00%> (ø)
...de/fraunhofer/aisec/cpg/passes/CompressLLVMPass.kt 65.74% <100.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KuechA KuechA enabled auto-merge (squash) November 6, 2024 08:05
@KuechA KuechA merged commit ad97725 into main Nov 6, 2024
3 checks passed
@KuechA KuechA deleted the ak/throw-cxx branch November 6, 2024 08:12
lshala pushed a commit that referenced this pull request Nov 8, 2024
* Replace UnaryOperator("throw") with ThrowStatement

* Rename ThrowStatement to ThrowExpression

* Also update node builder

* Adapt tests

* Rename test

* Update docs

* Rename methods in passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx Related to C/C++ language parsing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants