Skip to content

Commit 723236d

Browse files
committed
C++: Add a skeleton class for requires expressions
1 parent d0ca39f commit 723236d

File tree

15 files changed

+11078
-1712
lines changed

15 files changed

+11078
-1712
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Expr extends @expr {
2+
string toString() { none() }
3+
}
4+
5+
class Location extends @location_expr {
6+
string toString() { none() }
7+
}
8+
9+
predicate isExprRequires(Expr expr) { exists(int kind | exprs(expr, kind, _) | kind = 390) }
10+
11+
from Expr expr, int kind, int kind_new, Location location
12+
where
13+
exprs(expr, kind, location) and
14+
if isExprRequires(expr) then kind_new = 1 else kind_new = kind
15+
select expr, kind_new, location

0 commit comments

Comments
 (0)