Skip to content

Commit 168f7f5

Browse files
committed
C++: Add support for C++ requires expressions
1 parent 24d98ee commit 168f7f5

File tree

16 files changed

+10925
-1323
lines changed

16 files changed

+10925
-1323
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 isExprRequirement(Expr expr) {
10+
exists(int kind | exprs(expr, kind, _) | kind = [391, 392, 393])
11+
}
12+
13+
from Expr expr, int kind, int kind_new, Location location
14+
where
15+
exprs(expr, kind, location) and
16+
if isExprRequirement(expr) then kind_new = 1 else kind_new = kind
17+
select expr, kind_new, location

0 commit comments

Comments
 (0)