[PATCH] D30009: Add support for '#pragma clang attribute'

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 05:39:21 PDT 2017


arphaman updated this revision to Diff 93466.
arphaman marked 45 inline comments as done.
arphaman added a comment.

The rebased patch includes the following changes:

- `apply_to` and `apply_only_to` are merged into one `apply_to` specifier with `apply_only_to` semantics.
- The subject match rule list that's supported by an attribute is now reported in the fix-it for some of the parse diagnostics.
- GNU style attributes must now use `__attribute__`` syntax.
- `__declspec` attributes are now supported.
- Errors and warnings are now always emitted for each receiving declaration.
- The compiler now warns about unused attributes.
- The compiler now warns about unterminated pushes.
- Objective-C categories are now supported as well.

I couldn't find a good/suitable way to include the attribute subject match rule list that's supported by an attribute in the documentation. Maybe we could specify these lists in a new document?


Repository:
  rL LLVM

https://reviews.llvm.org/D30009

Files:
  docs/LanguageExtensions.rst
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrSubjectMatchRules.h
  include/clang/Basic/CMakeLists.txt
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/TokenKinds.def
  include/clang/Parse/CMakeLists.txt
  include/clang/Parse/Parser.h
  include/clang/Sema/AttributeList.h
  include/clang/Sema/Sema.h
  lib/Basic/Attributes.cpp
  lib/Parse/ParsePragma.cpp
  lib/Parse/ParseStmt.cpp
  lib/Parse/Parser.cpp
  lib/Sema/AttributeList.cpp
  lib/Sema/Sema.cpp
  lib/Sema/SemaAttr.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaDeclObjC.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaObjCProperty.cpp
  test/FixIt/fixit-pragma-attribute.c
  test/FixIt/fixit-pragma-attribute.cpp
  test/Misc/pragma-attribute-cxx-subject-match-rules.cpp
  test/Misc/pragma-attribute-cxx.cpp
  test/Misc/pragma-attribute-objc-subject-match-rules.m
  test/Misc/pragma-attribute-objc.m
  test/Misc/pragma-attribute-strict-subjects.c
  test/Misc/pragma-attribute-supported-attributes-list.test
  test/Parser/pragma-attribute-declspec.cpp
  test/Parser/pragma-attribute.cpp
  test/Sema/pragma-attribute-strict-subjects.c
  test/Sema/pragma-attribute.c
  test/lit.cfg
  test/lit.site.cfg.in
  utils/TableGen/ClangAttrEmitter.cpp
  utils/TableGen/TableGen.cpp
  utils/TableGen/TableGenBackends.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30009.93466.patch
Type: text/x-patch
Size: 167290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170330/2909adb5/attachment-0001.bin>


More information about the cfe-commits mailing list