diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-01 21:50:30 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-01 21:50:30 +0000 |
| commit | 5d5285a4bfa9b092dd99c3fafc28f87cb012c1c9 (patch) | |
| tree | 0ba2324cf2c1a6adcb604ac1c4a00bbe924c1773 /lib/CodeGen/CGExprAgg.cpp | |
| parent | 3b45bb56b5c3420ec332133c15a3ff7eaaf72572 (diff) | |
| download | clang-5d5285a4bfa9b092dd99c3fafc28f87cb012c1c9.tar.gz | |
CGExprAgg - remove duplicate code. NFCI.
Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index 0a57870a7c..9610a04be3 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/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; |
