diff options
| author | George Karpenkov <ekarpenkov@apple.com> | 2018-07-28 02:16:13 +0000 |
|---|---|---|
| committer | George Karpenkov <ekarpenkov@apple.com> | 2018-07-28 02:16:13 +0000 |
| commit | e7b4d96d686d72107432d1a316522d7d91fb0cb0 (patch) | |
| tree | 07148f8190c7adce0c307687228233cf50cfbbf5 /lib/CodeGen/CGExprConstant.cpp | |
| parent | 8d109915b3b02e56f04fec9c22e97c1230a3fb3d (diff) | |
| download | clang-e7b4d96d686d72107432d1a316522d7d91fb0cb0.tar.gz | |
[AST] Add a convenient getter from QualType to RecordDecl
Differential Revision: https://reviews.llvm.org/D49951
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index cfd0b85923..a738ecb0a3 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -2064,8 +2064,7 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM, if (record->isUnion()) { if (Field->getIdentifier()) break; - if (const auto *FieldRD = - dyn_cast_or_null<RecordDecl>(Field->getType()->getAsTagDecl())) + if (const auto *FieldRD = Field->getType()->getAsRecordDecl()) if (FieldRD->findFirstNamedDataMember()) break; } |
