Fix output of loops on waiving (#2355)

When an unopt loop is waived, we also don't want the loop's example
path being plot.

Signed-off-by: Stefan Wallentowitz <[email protected]>
This commit is contained in:
Stefan Wallentowitz
2020-05-26 08:45:57 +02:00
committed by GitHub
parent 7f32d4dc45
commit 68a2ed6776
6 changed files with 36 additions and 6 deletions
+6 -2
View File
@@ -103,6 +103,7 @@ class FileLine {
VFileContent* m_contentp; // Source text contents line is within
FileLine* m_parent; // Parent line that included this line
std::bitset<V3ErrorCode::_ENUM_MAX> m_warnOn;
bool m_waive; // Waive warning
protected:
// User routines should never need to change line numbers
@@ -134,7 +135,8 @@ public:
, m_contentLineno(0)
, m_contentp(NULL)
, m_parent(NULL)
, m_warnOn(defaultFileLine().m_warnOn) {}
, m_warnOn(defaultFileLine().m_warnOn)
, m_waive(false) {}
explicit FileLine(FileLine* fromp)
: m_firstLineno(fromp->m_firstLineno)
, m_firstColumn(fromp->m_firstColumn)
@@ -144,7 +146,8 @@ public:
, m_contentLineno(fromp->m_contentLineno)
, m_contentp(fromp->m_contentp)
, m_parent(fromp->m_parent)
, m_warnOn(fromp->m_warnOn) {}
, m_warnOn(fromp->m_warnOn)
, m_waive(fromp->m_waive) {}
struct EmptySecret {}; // Constructor selection
explicit FileLine(EmptySecret);
FileLine* copyOrSameFileLine();
@@ -213,6 +216,7 @@ public:
void warnStyleOff(bool flag);
void warnStateFrom(const FileLine& from) { m_warnOn = from.m_warnOn; }
void warnResetDefault() { warnStateFrom(defaultFileLine()); }
bool lastWarnWaived() { return m_waive; }
// Specific flag ACCESSORS/METHODS
bool coverageOn() const { return m_warnOn.test(V3ErrorCode::I_COVERAGE); }