C++ backend: use .noInit pragma for non-public default constructors; refs #4687

This commit is contained in:
Andreas Rumpf 2016-09-04 22:27:38 +02:00
commit dfa0699e73
5 changed files with 45 additions and 18 deletions

View file

@ -359,6 +359,7 @@ proc blockLeaveActions(p: BProc, howManyTrys, howManyExcepts: int) =
linefmt(p, cpsStmts, "#popCurrentException();$n")
proc genReturnStmt(p: BProc, t: PNode) =
if nfPreventCg in t.flags: return
p.beforeRetNeeded = true
genLineDir(p, t)
if (t.sons[0].kind != nkEmpty): genStmts(p, t.sons[0])