Skip to content

Commit 4e62dc8

Browse files
committed
C++: Add constexpr if testcase.
1 parent 59e22f6 commit 4e62dc8

File tree

1 file changed

+6
-0
lines changed
  • cpp/ql/test/library-tests/exprs/unevaluated

1 file changed

+6
-0
lines changed

cpp/ql/test/library-tests/exprs/unevaluated/test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ Virtual getAVirtual();
6262
void test9() {
6363
typeid(getAVirtual()); // unevaluated
6464
}
65+
66+
void constExprIf() {
67+
if constexpr(sizeof(int) == 4) { } // unevaluated
68+
}
69+
70+
// semmle-extractor-options: -std=c++20

0 commit comments

Comments
 (0)