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:
ed11786
)
CGExprAgg - remove duplicate code. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 21:50:30 +0000
(21:50 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 21:50:30 +0000
(21:50 +0000)
Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning.
llvm-svn: 373396
clang/lib/CodeGen/CGExprAgg.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGExprAgg.cpp
b/clang/lib/CodeGen/CGExprAgg.cpp
index
0a57870
..
9610a04
100644
(file)
--- a/
clang/lib/CodeGen/CGExprAgg.cpp
+++ b/
clang/lib/CodeGen/CGExprAgg.cpp
@@
-1759,7
+1759,7
@@
static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) {
// referencee. InitListExprs for unions and arrays can't have references.
if (const RecordType *RT = E->getType()->getAs<RecordType>()) {
if (!RT->isUnionType()) {
- RecordDecl *SD =
E->getType()->getAs<RecordType>()
->getDecl();
+ RecordDecl *SD =
RT
->getDecl();
CharUnits NumNonZeroBytes = CharUnits::Zero();
unsigned ILEElement = 0;