parent
eaca62f331
commit
734da9544d
2 changed files with 40 additions and 1 deletions
|
|
@ -540,7 +540,7 @@ proc initLocExprSingleUse(p: BProc, e: PNode, result: var TLoc) =
|
|||
discard "bug #8202; enforce evaluation order for nested calls for C++ too"
|
||||
# We may need to consider that 'f(g())' cannot be rewritten to 'tmp = g(); f(tmp)'
|
||||
# if 'tmp' lacks a move/assignment operator.
|
||||
if e[0].kind == nkSym and sfConstructor in e[0].sym.flags:
|
||||
if e[0].kind == nkSym and sfCompileToCpp in e[0].sym.flags:
|
||||
result.flags.incl lfSingleUse
|
||||
else:
|
||||
result.flags.incl lfSingleUse
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue