Fix "pointer is null" static analyzer warning. NFCI.

Use cast<> instead of dyn_cast<> since we know that the pointer should be valid (and is dereferenced immediately).
This commit is contained in:
Simon Pilgrim 2020-01-10 17:10:35 +00:00
parent a5bdada09d
commit cdc9592bf1
1 changed files with 1 additions and 1 deletions

View File

@ -1092,7 +1092,7 @@ static bool AvailabilityAttrsMatch(Attr *At1, Attr *At2) {
const AvailabilityAttr *AA1 = dyn_cast<AvailabilityAttr>(At1);
if (!AA1)
return true;
const AvailabilityAttr *AA2 = dyn_cast<AvailabilityAttr>(At2);
const AvailabilityAttr *AA2 = cast<AvailabilityAttr>(At2);
VersionTuple Introduced1 = AA1->getIntroduced();
VersionTuple Deprecated1 = AA1->getDeprecated();