diff options
Diffstat (limited to 'include/clang/Sema/DelayedDiagnostic.h')
-rw-r--r-- | include/clang/Sema/DelayedDiagnostic.h | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/include/clang/Sema/DelayedDiagnostic.h b/include/clang/Sema/DelayedDiagnostic.h index a20480c..3704e09 100644 --- a/include/clang/Sema/DelayedDiagnostic.h +++ b/include/clang/Sema/DelayedDiagnostic.h @@ -199,21 +199,25 @@ public: } private: + + struct DD { + const NamedDecl *Decl; + const ObjCInterfaceDecl *UnknownObjCClass; + const ObjCPropertyDecl *ObjCProperty; + const char *Message; + size_t MessageLen; + }; + + struct FTD { + unsigned Diagnostic; + unsigned Argument; + void *OperandType; + }; + union { - /// Deprecation. - struct { - const NamedDecl *Decl; - const ObjCInterfaceDecl *UnknownObjCClass; - const ObjCPropertyDecl *ObjCProperty; - const char *Message; - size_t MessageLen; - } DeprecationData; - - struct { - unsigned Diagnostic; - unsigned Argument; - void *OperandType; - } ForbiddenTypeData; + /// Deprecation + struct DD DeprecationData; + struct FTD ForbiddenTypeData; /// Access control. char AccessData[sizeof(AccessedEntity)]; @@ -224,14 +228,14 @@ private: /// delayed. class DelayedDiagnosticPool { const DelayedDiagnosticPool *Parent; - llvm::SmallVector<DelayedDiagnostic, 4> Diagnostics; + SmallVector<DelayedDiagnostic, 4> Diagnostics; DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION; public: DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {} ~DelayedDiagnosticPool() { - for (llvm::SmallVectorImpl<DelayedDiagnostic>::iterator + for (SmallVectorImpl<DelayedDiagnostic>::iterator i = Diagnostics.begin(), e = Diagnostics.end(); i != e; ++i) i->Destroy(); } @@ -260,8 +264,7 @@ public: pool.Diagnostics.clear(); } - typedef llvm::SmallVectorImpl<DelayedDiagnostic>::const_iterator - pool_iterator; + typedef SmallVectorImpl<DelayedDiagnostic>::const_iterator pool_iterator; pool_iterator pool_begin() const { return Diagnostics.begin(); } pool_iterator pool_end() const { return Diagnostics.end(); } bool pool_empty() const { return Diagnostics.empty(); } |