coby added inline comments.

================
Comment at: lib/Sema/SemaStmtAsm.cpp:702-705
+      // MS InlineAsm often uses struct pointer aliases as a base
+      const QualType QT = TD->getUnderlyingType();
+      RT = isa<PointerType>(QT) ? QT->getPointeeType()->getAs<RecordType>() :
+                                  QT->getAs<RecordType>();
----------------
rnk wrote:
> This would probably be simpler as:
>   QualType Ty = TD->getUnderlyingType();
>   if (const auto *PT = Ty->getAs<PointerType>())
>     Ty = PT->getPointeeType();
>   RT = Ty->getAsRecordType();
> ... to avoid repeating getAs<RecordType>().
Indeed. thx for pointing it out!


Repository:
  rL LLVM

https://reviews.llvm.org/D36450



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to