Skip to content

Commit da0456b

Browse files
committed
Format
1 parent 0c95609 commit da0456b

File tree

2 files changed

+68
-68
lines changed

2 files changed

+68
-68
lines changed

lib/suppressions.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -737,38 +737,38 @@ void polyspace::Parser::finishSuppression()
737737
Suppression suppr = { mFamily, mResultName, mFilename, 0, 0 };
738738

739739
switch (mKind) {
740-
case CommentKind::Regular:
741-
{
742-
suppr.lineBegin = mLine;
743-
suppr.lineEnd = mLine + mRange;
744-
mDone.push_back(suppr);
745-
return;
746-
}
747-
case CommentKind::Begin:
748-
{
749-
suppr.lineBegin = mLine;
750-
mStarted.push_back(suppr);
751-
return;
752-
}
753-
case CommentKind::End:
754-
{
755-
auto it = std::find_if(
756-
mStarted.begin(),
757-
mStarted.end(),
758-
[&] (const Suppression &other) {
759-
return suppr.matches(other);
760-
}
761-
);
762-
763-
if (it == mStarted.end())
764-
return;
740+
case CommentKind::Regular:
741+
{
742+
suppr.lineBegin = mLine;
743+
suppr.lineEnd = mLine + mRange;
744+
mDone.push_back(suppr);
745+
return;
746+
}
747+
case CommentKind::Begin:
748+
{
749+
suppr.lineBegin = mLine;
750+
mStarted.push_back(suppr);
751+
return;
752+
}
753+
case CommentKind::End:
754+
{
755+
auto it = std::find_if(
756+
mStarted.begin(),
757+
mStarted.end(),
758+
[&] (const Suppression &other) {
759+
return suppr.matches(other);
760+
}
761+
);
765762

766-
suppr.lineBegin = it->lineBegin;
767-
suppr.lineEnd = mLine;
768-
mStarted.erase(it);
769-
mDone.push_back(suppr);
763+
if (it == mStarted.end())
770764
return;
771-
}
765+
766+
suppr.lineBegin = it->lineBegin;
767+
suppr.lineEnd = mLine;
768+
mStarted.erase(it);
769+
mDone.push_back(suppr);
770+
return;
771+
}
772772
}
773773
}
774774

lib/suppressions.h

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -298,49 +298,49 @@ struct Suppressions
298298

299299
namespace polyspace {
300300

301-
struct Suppression {
302-
std::string family;
303-
std::string resultName;
304-
std::string filename;
305-
int lineBegin;
306-
int lineEnd;
307-
308-
bool matches(const Suppression &other) const;
309-
bool convert(const Settings &settings, SuppressionList::Suppression &suppr) const;
310-
};
301+
struct Suppression {
302+
std::string family;
303+
std::string resultName;
304+
std::string filename;
305+
int lineBegin;
306+
int lineEnd;
307+
308+
bool matches(const Suppression &other) const;
309+
bool convert(const Settings &settings, SuppressionList::Suppression &suppr) const;
310+
};
311311

312-
class Parser {
313-
public:
314-
Parser() = delete;
315-
Parser(const Settings &settings) : mSettings(settings) {}
316-
void collect(SuppressionList &suppressions) const;
317-
void parse(const std::string &comment, int line, const std::string &filename);
312+
class Parser {
313+
public:
314+
Parser() = delete;
315+
Parser(const Settings &settings) : mSettings(settings) {}
316+
void collect(SuppressionList &suppressions) const;
317+
void parse(const std::string &comment, int line, const std::string &filename);
318318

319-
private:
320-
std::string peekToken();
321-
std::string nextToken();
322-
void finishSuppression();
323-
bool parseEntry();
319+
private:
320+
std::string peekToken();
321+
std::string nextToken();
322+
void finishSuppression();
323+
bool parseEntry();
324324

325-
enum class CommentKind {
326-
Regular, Begin, End,
327-
};
325+
enum class CommentKind {
326+
Regular, Begin, End,
327+
};
328328

329-
std::list<Suppression> mStarted;
330-
std::list<Suppression> mDone;
331-
std::string mComment;
332-
std::string mFilename;
333-
int mLine{};
334-
int mRange{};
335-
CommentKind mKind{};
336-
std::string mFamily;
337-
std::string mResultName;
338-
std::string mPeeked;
339-
bool mHasPeeked{};
340-
const Settings &mSettings;
341-
};
329+
std::list<Suppression> mStarted;
330+
std::list<Suppression> mDone;
331+
std::string mComment;
332+
std::string mFilename;
333+
int mLine{};
334+
int mRange{};
335+
CommentKind mKind{};
336+
std::string mFamily;
337+
std::string mResultName;
338+
std::string mPeeked;
339+
bool mHasPeeked{};
340+
const Settings &mSettings;
341+
};
342342

343-
bool isPolyspaceComment(const std::string &comment);
343+
bool isPolyspaceComment(const std::string &comment);
344344

345345
}
346346

0 commit comments

Comments
 (0)