[PATCH] D12131: Make [Sema]DiagnosticBuilder move-only, instead of having a sneaky mutating copy ctor.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 18 18:28:07 PDT 2015


dblaikie created this revision.
dblaikie added a reviewer: rsmith.
dblaikie added a subscriber: cfe-commits.

While there wasn't much use of "return Diag(...) << x" outside Sema (one
each in ARCMigrate, Lex, Parse, and 5 in ClangTidy - which were all just
changed to use named local variables, then stream, then return), in Sema
there were quite a few uses. So this extends Sema::Diag to be a variadic
template allowing the extra parameters to be passed directly rather than
via streaming on the resulting temporary expression.

http://reviews.llvm.org/D12131

Files:
  include/clang/Basic/Diagnostic.h
  include/clang/Sema/Sema.h
  lib/ARCMigrate/TransformActions.cpp
  lib/Lex/LiteralSupport.cpp
  lib/Parse/Parser.cpp
  lib/Sema/SemaDeclObjC.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaExprObjC.cpp
  lib/Sema/SemaObjCProperty.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/SemaStmt.cpp
  lib/Sema/SemaStmtAsm.cpp
  lib/Sema/SemaTemplateVariadic.cpp
  lib/Sema/SemaType.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12131.32490.patch
Type: text/x-patch
Size: 25091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150819/ba29eb99/attachment-0001.bin>


More information about the cfe-commits mailing list