Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/ParsedAttr.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
namespace { | namespace { | ||||
#include "clang/Sema/AttrParsedAttrImpl.inc" | #include "clang/Sema/AttrParsedAttrImpl.inc" | ||||
} // namespace | } // namespace | ||||
const ParsedAttrInfo &ParsedAttrInfo::get(const AttributeCommonInfo &A) { | const ParsedAttrInfo &ParsedAttrInfo::get(const AttributeCommonInfo &A) { | ||||
// If we have a ParsedAttrInfo for this ParsedAttr then return that. | // If we have a ParsedAttrInfo for this ParsedAttr then return that. | ||||
if ((size_t)A.getParsedKind() < llvm::array_lengthof(AttrInfoMap)) | if ((size_t)A.getParsedKind() < std::size(AttrInfoMap)) | ||||
return *AttrInfoMap[A.getParsedKind()]; | return *AttrInfoMap[A.getParsedKind()]; | ||||
// If this is an ignored attribute then return an appropriate ParsedAttrInfo. | // If this is an ignored attribute then return an appropriate ParsedAttrInfo. | ||||
static const ParsedAttrInfo IgnoredParsedAttrInfo( | static const ParsedAttrInfo IgnoredParsedAttrInfo( | ||||
AttributeCommonInfo::IgnoredAttribute); | AttributeCommonInfo::IgnoredAttribute); | ||||
if (A.getParsedKind() == AttributeCommonInfo::IgnoredAttribute) | if (A.getParsedKind() == AttributeCommonInfo::IgnoredAttribute) | ||||
return IgnoredParsedAttrInfo; | return IgnoredParsedAttrInfo; | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |