commonly when the diag has been copied).
- This eliminates a completely spurious call to Emit() which was in
Sema::Diag(). Sob.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152640
91177308-0d34-0410-b5e6-
96231b3b80d8
/// Destructor - The dtor emits the diagnostic if it hasn't already
/// been emitted.
- ~DiagnosticBuilder() { Emit(); }
+ ~DiagnosticBuilder() {
+ if (DiagObj)
+ Emit();
+ }
/// isActive - Determine whether this diagnostic is still active.
bool isActive() const { return DiagObj != 0; }