diff --git a/include/slang/ast/Compilation.h b/include/slang/ast/Compilation.h index c5d0a2f54..9afb5ed7f 100644 --- a/include/slang/ast/Compilation.h +++ b/include/slang/ast/Compilation.h @@ -708,6 +708,9 @@ class SLANG_EXPORT Compilation : public BumpAllocator { /// Creates an empty ImplicitTypeSyntax object. const syntax::ImplicitTypeSyntax& createEmptyTypeSyntax(SourceLocation loc); + /// Queries if any errors have been issued on any scope within this compilation. + bool hasIssuedErrors() const { return numErrors > 0; }; + /// @{ private: