HomePhabricator

DeclCXX - Fix getAs<> null-dereference static analyzer warnings. NFCI.

Authored by RKSimon on Jan 4 2021, 7:12 AM.

Description

DeclCXX - Fix getAs<> null-dereference static analyzer warnings. NFCI.

getAs<> can return null if the cast is invalid, which can lead to null pointer deferences. Use castAs<> instead which will assert that the cast is valid.

Details

Committed
RKSimonJan 4 2021, 7:12 AM
Parents
rG82a29a62aba5: [OpenMP] Add definition/interface for target memory routines
Branches
Unknown
Tags
Unknown