This just empties out the diag, which is fine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169542
91177308-0d34-0410-b5e6-
96231b3b80d8
#if LLVM_HAS_RVALUE_REFERENCES
PartialDiagnostic &operator=(PartialDiagnostic &&Other) {
- if (this != &Other) {
- if (DiagStorage)
- freeStorage();
-
- DiagID = Other.DiagID;
- DiagStorage = Other.DiagStorage;
- Allocator = Other.Allocator;
+ freeStorage();
- Other.DiagStorage = 0;
- }
+ DiagID = Other.DiagID;
+ DiagStorage = Other.DiagStorage;
+ Allocator = Other.Allocator;
+ Other.DiagStorage = 0;
return *this;
}
#endif