Add an attribute registry so plugins can add attributes
authorJohn Brawn <john.brawn@arm.com>
Fri, 7 Feb 2020 14:21:13 +0000 (14:21 +0000)
committerJohn Brawn <john.brawn@arm.com>
Thu, 27 Feb 2020 17:23:16 +0000 (17:23 +0000)
commit75d4d4bd028f6a5f24ef41dbbc45bed65b2305cf
treebd96d9808a68dcf3d00af87cf36248806b98ed4a
parentddd11273d9d0807e25a34181e5978e3307d78dc2
Add an attribute registry so plugins can add attributes

When constructing a ParsedAttr the ParsedAttrInfo gets looked up in the
AttrInfoMap, which is auto-generated using tablegen. If that lookup fails then
we look through the ParsedAttrInfos that plugins have added to the registry and
check if any has a spelling that matches.

Differential Revision: https://reviews.llvm.org/D31338
clang/include/clang/Basic/AttributeCommonInfo.h
clang/include/clang/Sema/ParsedAttr.h
clang/lib/Basic/Attributes.cpp
clang/lib/Sema/ParsedAttr.cpp
clang/utils/TableGen/ClangAttrEmitter.cpp