Skip to content

Commit cd1403b

Browse files
committed
C++: typeid and noexcept fixes in HashCons
1 parent 367b333 commit cd1403b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cpp/ql/src/semmle/code/cpp/valuenumbering/HashCons.qll

+3-2
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ private predicate mk_UuidofOperator(Type t, UuidofOperator e) {
704704
}
705705

706706
private predicate analyzableTypeidType(TypeidOperator e) {
707-
count(e.getAChild()) = 0
707+
count(e.getAChild()) = 0 and
708+
strictcount(e.getResultType()) = 1
708709
}
709710

710711
private predicate mk_TypeidType(Type t, TypeidOperator e) {
@@ -858,7 +859,7 @@ private predicate analyzableNoExceptExpr(NoExceptExpr nee) {
858859

859860
private predicate mk_NoExceptExpr(HashCons child, NoExceptExpr nee) {
860861
analyzableNoExceptExpr(nee) and
861-
nee.getExpr() = child.getAnExpr().getFullyConverted()
862+
nee.getExpr().getFullyConverted() = child.getAnExpr()
862863
}
863864

864865

0 commit comments

Comments
 (0)