Page MenuHomePhabricator

Add ParsedAttrInfo::handleDeclAttribute
Needs ReviewPublic

Authored by john.brawn on Mar 24 2017, 9:30 AM.

Details

Summary

This makes it possible for plugin attributes to actually do something, and also removes a lot of boilerplate for simple attributes in SemaDeclAttr.cpp.

Diff Detail

Event Timeline

john.brawn edited the summary of this revision. (Show Details)
john.brawn set the repository for this revision to rG LLVM Github Monorepo.
john.brawn added a subscriber: cfe-commits.

Resurrecting this old patch, plus take the opportunity to remove the need for some boilerplate code. This is the third of four patches to make it possible for clang plugins to define attributes.

Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2020, 6:23 AM
carwil added a subscriber: carwil.Mon, Jan 27, 2:13 AM
aaron.ballman added inline comments.Sun, Feb 2, 10:01 AM
clang/docs/ClangPlugins.rst
74

We should be documenting the fields of ParsedAttrInfo that the user would be interacting with. We should also consider whether we are introducing a new stability guarantee with that interface and document accordingly. I think we should not promise that this structure will be stable from release to release, but it will be stable within a given release (e.g., the type can change between Clang 11 -> Clang 12, but the type will not change between Clang 11 -> Clang 11.0.1).

clang/lib/Sema/SemaDeclAttr.cpp
6701–6702

I think this might make more logical sense as part of the default label in the switch statement.