[PATCH] Add 'return_typestate' function attribute

Christian Wailes chriswailes at google.com
Fri Aug 30 16:45:39 PDT 2013


Hi delesley, dblaikie, aaron.ballman,

Functions can now declare what state the consumable type the are returning will be in.  This is then used on the caller side and checked on the callee side.  Constructors now use this attribute instead of the 'consumes' attribute.

http://llvm-reviews.chandlerc.com/D1567

Files:
  include/clang/Analysis/Analyses/Consumed.h
  include/clang/Basic/Attr.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Analysis/Consumed.cpp
  lib/Sema/AnalysisBasedWarnings.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/SemaCXX/warn-consumed-analysis-strict.cpp
  test/SemaCXX/warn-consumed-analysis.cpp
  test/SemaCXX/warn-consumed-parsing.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1567.1.patch
Type: text/x-patch
Size: 22313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130830/82250b55/attachment.bin>


More information about the cfe-commits mailing list