C++: Simplify consteval if to be just a single class with an isNot predicate

This commit is contained in:
Jeroen Ketema
2025-01-20 11:20:11 +01:00
parent a74189f6fa
commit a9e0f20861
6 changed files with 37 additions and 51 deletions

View File

@@ -24138,7 +24138,7 @@ ir23.cpp:
# 10| [TopLevelFunction] bool consteval_2()
# 10| <params>:
# 11| getEntryPoint(): [BlockStmt] { ... }
# 12| getStmt(0): [NotConstevalIfStmt] if ! consteval ...
# 12| getStmt(0): [ConstevalIfStmt] if ! consteval ...
# 12| getThen(): [BlockStmt] { ... }
# 13| getStmt(0): [ReturnStmt] return ...
# 13| getExpr(): [Literal] 1
@@ -24169,7 +24169,7 @@ ir23.cpp:
# 28| [TopLevelFunction] bool consteval_4()
# 28| <params>:
# 29| getEntryPoint(): [BlockStmt] { ... }
# 30| getStmt(0): [NotConstevalIfStmt] if ! consteval ...
# 30| getStmt(0): [ConstevalIfStmt] if ! consteval ...
# 30| getThen(): [BlockStmt] { ... }
# 31| getStmt(0): [ReturnStmt] return ...
# 31| getExpr(): [Literal] 1
@@ -24192,7 +24192,7 @@ ir23.cpp:
# 39| Type = [BoolType] bool
# 39| Value = [Literal] 1
# 39| ValueCategory = prvalue
# 41| getStmt(1): [NotConstevalIfStmt] if ! consteval ...
# 41| getStmt(1): [ConstevalIfStmt] if ! consteval ...
# 41| getThen(): [BlockStmt] { ... }
# 42| getStmt(0): [ExprStmt] ExprStmt
# 42| getExpr(): [AssignExpr] ... = ...