-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C++: Support
if consteval
and if ! consteval
- Loading branch information
Showing
14 changed files
with
788 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
| __va_list_tag::operator= | false | 66 | 66 | operator= | | ||
| __va_list_tag::operator= | false | 72 | 72 | operator= | | ||
| test | false | 142 | 142 | test | | ||
| test | false | 147 | 147 | declaration | | ||
| test | false | 152 | 152 | if consteval ... | | ||
| test | false | 154 | 154 | ExprStmt | | ||
| test | false | 156 | 156 | x | | ||
| test | false | 160 | 160 | 1 | | ||
| test | false | 161 | 161 | ... = ... | | ||
| test | false | 163 | 163 | { ... } | | ||
| test | false | 165 | 165 | ExprStmt | | ||
| test | false | 167 | 167 | x | | ||
| test | false | 171 | 171 | 2 | | ||
| test | false | 172 | 172 | ... = ... | | ||
| test | false | 174 | 174 | { ... } | | ||
| test | false | 176 | 176 | if consteval ... | | ||
| test | false | 178 | 178 | ExprStmt | | ||
| test | false | 180 | 180 | x | | ||
| test | false | 184 | 184 | 3 | | ||
| test | false | 185 | 185 | ... = ... | | ||
| test | false | 187 | 187 | { ... } | | ||
| test | false | 189 | 189 | return ... | | ||
| test | false | 191 | 191 | x | | ||
| test | false | 193 | 193 | (bool)... | | ||
| test | false | 194 | 194 | { ... } | | ||
| test | true | 147 | 152 | | | ||
| test | true | 152 | 163 | | | ||
| test | true | 152 | 174 | | | ||
| test | true | 154 | 160 | | | ||
| test | true | 156 | 161 | | | ||
| test | true | 160 | 156 | | | ||
| test | true | 161 | 176 | | | ||
| test | true | 163 | 154 | | | ||
| test | true | 165 | 171 | | | ||
| test | true | 167 | 172 | | | ||
| test | true | 171 | 167 | | | ||
| test | true | 172 | 176 | | | ||
| test | true | 174 | 165 | | | ||
| test | true | 176 | 187 | | | ||
| test | true | 176 | 189 | | | ||
| test | true | 178 | 184 | | | ||
| test | true | 180 | 185 | | | ||
| test | true | 184 | 180 | | | ||
| test | true | 185 | 189 | | | ||
| test | true | 187 | 178 | | | ||
| test | true | 189 | 191 | | | ||
| test | true | 191 | 142 | | | ||
| test | true | 194 | 147 | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* query-type: graph | ||
* | ||
* @kind graph-equivalence-test | ||
*/ | ||
|
||
import cpp | ||
|
||
class DestructorCallEnhanced extends DestructorCall { | ||
override string toString() { | ||
if exists(this.getQualifier().(VariableAccess).getTarget().getName()) | ||
then | ||
result = | ||
"call to " + this.getQualifier().(VariableAccess).getTarget().getName() + "." + | ||
this.getTarget().getName() | ||
else result = super.toString() | ||
} | ||
} | ||
|
||
string scope(ControlFlowNode x) { | ||
if exists(x.getControlFlowScope().getQualifiedName()) | ||
then result = x.getControlFlowScope().getQualifiedName() | ||
else result = "<no scope>" | ||
} | ||
|
||
predicate isNode(boolean isEdge, ControlFlowNode x, ControlFlowNode y, string label) { | ||
isEdge = false and x = y and label = x.toString() | ||
} | ||
|
||
predicate isSuccessor(boolean isEdge, ControlFlowNode x, ControlFlowNode y, string label) { | ||
exists(string truelabel, string falselabel | | ||
isEdge = true and | ||
x.getASuccessor() = y and | ||
(if x.getATrueSuccessor() = y then truelabel = "T" else truelabel = "") and | ||
(if x.getAFalseSuccessor() = y then falselabel = "F" else falselabel = "") and | ||
label = truelabel + falselabel | ||
) | ||
} | ||
|
||
from boolean isEdge, ControlFlowNode x, ControlFlowNode y, string label | ||
where isNode(isEdge, x, y, label) or isSuccessor(isEdge, x, y, label) | ||
select scope(x), isEdge, x, y, label |
Oops, something went wrong.