[PATCH] replaced callable_when_unconsumed annotation with generic callable_when annotation, redux

Chris Wailes chris.wailes at gmail.com
Thu Oct 3 16:11:30 PDT 2013


chris.wailes added you to the CC list for the revision "replaced callable_when_unconsumed annotation with generic callable_when annotation, redux".

Hi delesley, dblaikie, aaron.ballman,

The callable_when annotation can take a list of states that a function can be called in.  This reduced the total number of annotations needed and makes writing more complicated behaviour less burdensome.

To allow the the callable_when attribute to hold a variable number of states a VariadicEnumArgument Tablegen attribute classes was added.  Future work should replace the various Variadic attribute classes with a single class that takes another attribute as a parameter.  A FIXME has been added to indicate this at the request of Richard Smith.

This patch was mailed to the list previously, when I was at Google over the summer.  I created a new patch because it was first submitted almost a month ago, and some changes were made to the TableGen emitter for attributes that necessitated some changes in the patch.

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

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
  utils/TableGen/ClangAttrEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1827.1.patch
Type: text/x-patch
Size: 61701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131003/0dee3e33/attachment.bin>


More information about the cfe-commits mailing list