projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5bdada
)
Fix "pointer is null" static analyzer warning. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 10 Jan 2020 17:10:35 +0000
(17:10 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 10 Jan 2020 17:21:20 +0000
(17:21 +0000)
Use cast<> instead of dyn_cast<> since we know that the pointer should be valid (and is dereferenced immediately).
clang/lib/ARCMigrate/ObjCMT.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/ARCMigrate/ObjCMT.cpp
b/clang/lib/ARCMigrate/ObjCMT.cpp
index
4abb04f
..
8b3a4a3
100644
(file)
--- a/
clang/lib/ARCMigrate/ObjCMT.cpp
+++ b/
clang/lib/ARCMigrate/ObjCMT.cpp
@@
-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();