File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,6 +207,30 @@ std::vector<SuppressionList::Suppression> SuppressionList::parseMultiSuppressCom
207207 suppressions.push_back (std::move (s));
208208 }
209209
210+ std::string::size_type extraPos = comment.find (' ;' , end_position);
211+ std::size_t delimSize = 1 ;
212+
213+ if (extraPos == std::string::npos) {
214+ extraPos = comment.find (" //" , end_position);
215+ delimSize = 2 ;
216+ }
217+
218+ if (extraPos == std::string::npos)
219+ return suppressions;
220+
221+ std::string extraComment = comment.substr (extraPos + delimSize);
222+
223+ if (extraComment.size () >= 2 && extraComment.compare (extraComment.size () - 2 , 2 , " */" ) == 0 )
224+ extraComment.erase (extraComment.size () - 2 , 2 );
225+
226+ extraComment = trim (extraComment);
227+
228+ for (auto it = extraComment.begin (); it != extraComment.end ();)
229+ it = *it & 0x80 ? extraComment.erase (it) : it + 1 ;
230+
231+ for (auto &suppression : suppressions)
232+ suppression.extraComment = extraComment;
233+
210234 return suppressions;
211235}
212236
You can’t perform that action at this time.
0 commit comments