DirectiveList Warnings;
DirectiveList Notes;
- ~ExpectedData() {
+ void Reset() {
llvm::DeleteContainerPointers(Errors);
llvm::DeleteContainerPointers(Warnings);
llvm::DeleteContainerPointers(Notes);
}
+
+ ~ExpectedData() { Reset(); }
};
enum DirectiveStatus {
// Reset the buffer, we have processed all the diagnostics in it.
Buffer.reset(new TextDiagnosticBuffer());
- ED.Errors.clear();
- ED.Warnings.clear();
- ED.Notes.clear();
+ ED.Reset();
}
Directive *Directive::create(bool RegexKind, SourceLocation DirectiveLoc,