Class with virtual methods should have virtual destructors too.
This commit is contained in:
parent
023931180c
commit
eea5ae9ceb
|
@ -127,6 +127,7 @@ public:
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
virtual ~ErrorSink() {}
|
||||
virtual void verror(const char* fmt, va_list ap) = 0;
|
||||
};
|
||||
|
||||
|
@ -2003,6 +2004,7 @@ class Compiler : public ErrorSink {
|
|||
|
||||
class InputStream {
|
||||
public:
|
||||
virtual ~InputStream() {}
|
||||
int getChar() {
|
||||
if (bumpLine) {
|
||||
line++;
|
||||
|
|
Loading…
Reference in New Issue