diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index fc65199..a562a6a 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2979,10 +2979,8 @@ public: /// hasVolatileMember - returns true if aggregate type has a volatile /// member. bool hasVolatileMember(QualType T) { - if (const RecordType *RT = T->getAs<RecordType>()) { - const RecordDecl *RD = RT->getOriginalDecl()->getDefinitionOrSelf(); + if (const auto *RD = T->getAsRecordDecl()) return RD->hasVolatileMember(); - } return false; } |