r245352 - Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 13:54:26 PDT 2015
Author: dblaikie
Date: Tue Aug 18 15:54:26 2015
New Revision: 245352
URL: http://llvm.org/viewvc/llvm-project?rev=245352&view=rev
Log:
Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.
Modified:
cfe/trunk/include/clang/Sema/Sema.h
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=245352&r1=245351&r2=245352&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Tue Aug 18 15:54:26 2015
@@ -1054,6 +1054,14 @@ public:
SemaDiagnosticBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
: DiagnosticBuilder(DB), SemaRef(SemaRef), DiagID(DiagID) { }
+ // This is a cunning lie. DiagnosticBuilder actually performs move
+ // construction in its copy constructor (but due to varied uses, it's not
+ // possible to conveniently express this as actual move construction). So
+ // the default copy ctor here is fine, because the base class disables the
+ // source anyway, so the user-defined ~SemaDiagnosticBuilder is a safe no-op
+ // in that case anwyay.
+ SemaDiagnosticBuilder(const SemaDiagnosticBuilder&) = default;
+
~SemaDiagnosticBuilder() {
// If we aren't active, there is nothing to do.
if (!isActive()) return;
More information about the cfe-commits
mailing list