~ubuntu-branches/ubuntu/wily/verilator/wily-proposed

« back to all changes in this revision

Viewing changes to src/V3Case.cpp

  • Committer: Package Import Robot
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2015-04-26 16:20:52 UTC
  • mfrom: (4.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20150426162052-69yjwh512m0adl2k
Tags: 3.872-2
* Upload to unstable.
* debian/patches/*: Added DEP-3 patch headers.
* Remove debian/gbp.conf, not needed in master branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
//*************************************************************************
8
8
//
9
 
// Copyright 2003-2014 by Wilson Snyder.  This program is free software; you can
 
9
// Copyright 2003-2015 by Wilson Snyder.  This program is free software; you can
10
10
// redistribute it and/or modify it under the terms of either the GNU
11
11
// Lesser General Public License Version 3 or the Perl Artistic License
12
12
// Version 2.0.
411
411
                AstNode* itemexprp = ifexprp;  ifexprp=NULL;
412
412
                if (depth == (CASE_ENCODER_GROUP_DEPTH)) { // End of group - can skip the condition
413
413
                    itemexprp->deleteTree(); itemexprp=NULL;
 
414
                    // cppcheck-suppress redundantAssignment
414
415
                    itemexprp = new AstConst(itemp->fileline(), AstConst::LogicTrue());
415
416
                }
416
417
                AstIf* newp = new AstIf(itemp->fileline(), itemexprp, istmtsp, NULL);
462
463
            replaceCaseFast(nodep); nodep=NULL;
463
464
        } else {
464
465
            ++m_statCaseSlow;
 
466
            // cppcheck-supporess uselessAssignmentPtrArg
465
467
            replaceCaseComplicated(nodep); nodep=NULL;
466
468
        }
467
469
    }
489
491
void V3Case::caseAll(AstNetlist* nodep) {
490
492
    UINFO(2,__FUNCTION__<<": "<<endl);
491
493
    CaseVisitor visitor (nodep);
 
494
    V3Global::dumpCheckGlobalTree("case.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
492
495
}
493
496
void V3Case::caseLint(AstNodeCase* nodep) {
494
497
    UINFO(4,__FUNCTION__<<": "<<endl);