File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,13 @@ private predicate ignoreExprOnly(Expr expr) {
8484 // Ignore the allocator call, because we always synthesize it. Don't ignore
8585 // its arguments, though, because we use them as part of the synthesis.
8686 newExpr .getAllocatorCall ( ) = expr
87- ) or
87+ )
88+ or
89+ // The extractor deliberately emits an `ErrorExpr` as the first argument to
90+ // the allocator call, if any, of a `NewOrNewArrayExpr`. That `ErrorExpr`
91+ // should not be translated.
92+ exists ( NewOrNewArrayExpr new | expr = new .getAllocatorCall ( ) .getArgument ( 0 ) )
93+ or
8894 not translateFunction ( expr .getEnclosingFunction ( ) )
8995 or
9096 // We do not yet translate destructors properly, so for now we ignore the
Original file line number Diff line number Diff line change @@ -2866,13 +2866,6 @@ class TranslatedStmtExpr extends TranslatedNonConstantExpr {
28662866class TranslatedErrorExpr extends TranslatedSingleInstructionExpr {
28672867 override ErrorExpr expr ;
28682868
2869- TranslatedErrorExpr ( ) {
2870- // The extractor deliberately emits an `ErrorExpr` as the first argument to
2871- // the allocator call, if any, of a `NewOrNewArrayExpr`. That `ErrorExpr`
2872- // should not be translated.
2873- not exists ( NewOrNewArrayExpr new | expr = new .getAllocatorCall ( ) .getArgument ( 0 ) )
2874- }
2875-
28762869 override final Instruction getFirstInstruction ( ) {
28772870 result = getInstruction ( OnlyInstructionTag ( ) )
28782871 }
You can’t perform that action at this time.
0 commit comments