C++ backend: use .noInit pragma for non-public default constructors; refs #4687
This commit is contained in:
parent
7e86ed00ce
commit
dfa0699e73
5 changed files with 45 additions and 18 deletions
|
|
@ -2084,11 +2084,14 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
|
|||
of nkCaseStmt: genCase(p, n, d)
|
||||
of nkReturnStmt: genReturnStmt(p, n)
|
||||
of nkBreakStmt: genBreakStmt(p, n)
|
||||
of nkAsgn: genAsgn(p, n, fastAsgn=false)
|
||||
of nkAsgn:
|
||||
if nfPreventCg notin n.flags:
|
||||
genAsgn(p, n, fastAsgn=false)
|
||||
of nkFastAsgn:
|
||||
# transf is overly aggressive with 'nkFastAsgn', so we work around here.
|
||||
# See tests/run/tcnstseq3 for an example that would fail otherwise.
|
||||
genAsgn(p, n, fastAsgn=p.prc != nil)
|
||||
if nfPreventCg notin n.flags:
|
||||
# transf is overly aggressive with 'nkFastAsgn', so we work around here.
|
||||
# See tests/run/tcnstseq3 for an example that would fail otherwise.
|
||||
genAsgn(p, n, fastAsgn=p.prc != nil)
|
||||
of nkDiscardStmt:
|
||||
if n.sons[0].kind != nkEmpty:
|
||||
genLineDir(p, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue