C++: Mark constexpr if as unevalauted.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-07-31 13:09:12 +01:00
parent 4e62dc81d2
commit fe575df325
2 changed files with 8 additions and 0 deletions

View File

@@ -307,6 +307,10 @@ class Expr extends StmtParent, @expr {
)
or
exists(Decltype d | d.getExpr() = this.getParentWithConversions*())
or
exists(ConstexprIfStmt constIf |
constIf.getControllingExpr() = this.getParentWithConversions*()
)
}
/**

View File

@@ -14,3 +14,7 @@
| test.cpp:57:9:57:9 | 4 |
| test.cpp:63:9:63:19 | call to getAVirtual |
| test.cpp:63:9:63:21 | temporary object |
| test.cpp:67:16:67:26 | sizeof(int) |
| test.cpp:67:16:67:31 | ... == ... |
| test.cpp:67:31:67:31 | 4 |
| test.cpp:67:31:67:31 | (unsigned long)... |