[PATCH] Add -Wrange-loop-analysis to warn when a range-based for-loop is creating a copy.

Richard Trieu rtrieu at google.com
Tue Aug 26 17:38:03 PDT 2014


Don't warn when POD types are copied.  It's likely that some of the larger POD types should be warned on, but a reasonable limit is needed since copies of smaller POD types is a regular occurrence.

http://reviews.llvm.org/D4169

Files:
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaStmt.cpp
  test/SemaCXX/warn-range-loop-analysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4169.12976.patch
Type: text/x-patch
Size: 18262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140827/a467b24d/attachment.bin>


More information about the cfe-commits mailing list