Fix GCC lint complaint of calling NULL->cloneTree. No functional change intended.

This commit is contained in:
Wilson Snyder
2018-03-10 17:44:17 -05:00
parent 2c30aecc5b
commit d08a91b71e
6 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -361,7 +361,7 @@ private:
AstNode* createInlinedFTask(AstNodeFTaskRef* refp, const string& namePrefix, AstVarScope* outvscp) {
// outvscp is the variable for functions only, if NULL, it's a task
if (!refp->taskp()) refp->v3fatalSrc("Unlinked?");
AstNode* newbodysp = refp->taskp()->stmtsp()->cloneTree(true); // Maybe NULL
AstNode* newbodysp = AstNode::cloneTreeNull(refp->taskp()->stmtsp(), true); // Maybe NULL
AstNode* beginp = new AstComment(refp->fileline(), (string)("Function: ")+refp->name());
if (newbodysp) beginp->addNext(newbodysp);
if (debug()>=9) { beginp->dumpTreeAndNext(cout,"-newbegi:"); }