Just use getAttr because we are interested in the attribute's contents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237336
91177308-0d34-0410-b5e6-
96231b3b80d8
if (hasInit())
return Definition;
- if (hasAttr<AliasAttr>() ||
- (hasAttr<SelectAnyAttr>() && !getAttr<SelectAnyAttr>()->isInherited()))
+ if (hasAttr<AliasAttr>())
return Definition;
+ if (const auto *SAA = getAttr<SelectAnyAttr>())
+ if (!SAA->isInherited())
+ return Definition;
+
// A variable template specialization (other than a static data member
// template or an explicit specialization) is a declaration until we
// instantiate its initializer.