C++: Implement Expr::mayBeFromImplicitlyDeclaredFunction

This commit is contained in:
Calum Grant
2024-10-16 10:23:39 +01:00
parent 853128c9c3
commit 6a48ad0ee7
11 changed files with 37 additions and 1 deletions

View File

@@ -0,0 +1 @@
| file://:0:0:0:0 | <error expr> |

View File

@@ -0,0 +1,5 @@
import cpp
from Expr e
where e.getType() instanceof ErroneousType
select e

View File

@@ -0,0 +1,2 @@
| file://:0:0:0:0 | There was an error during this compilation |
| implicit.cpp:5:5:5:5 | identifier 'g' is undefined |

View File

@@ -0,0 +1,4 @@
import cpp
from Diagnostic d
select d

View File

@@ -0,0 +1,4 @@
void f() {
f();
g();
}

View File

@@ -0,0 +1,6 @@
// semmle-extractor-options: --expect_errors
void f() {
f();
g();
}

View File

@@ -0,0 +1 @@
| implicit.c:3:5:3:5 | call to g |

View File

@@ -0,0 +1,5 @@
import cpp
from Expr e
where e.mayBeFromImplicitlyDeclaredFunction()
select e