[PATCH] D37308: Interface class with uuid base record

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 21:51:44 PDT 2017


erichkeane added a comment.

You seem to have had a hard time with the diff tool too... there is an extra file here that needs to be removed.



================
Comment at: lib/Sema/SemaDeclCXX.cpp:2390
+         Uuid && Uuid->getGuid() =="00000000-0000-0000-C000-000000000046" &&
+         dyn_cast<TranslationUnitDecl>(RD->getDeclContext());
+}
----------------
@aaron.ballman This logic we'd like you to particularly check on.  Does this ensure it isn't in a namespace?

Zahira: since you don't need the value, "isa<TranslationUnitDecl>" is more appropriate here.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:2393
+
+/// \brief Test if any chidren of inheritated base is an IUnknow type.
+static bool AreChildrenOfBaseIUnknown(const CXXRecordDecl *Base)
----------------
Misspelled IUnknown here.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:2394
+/// \brief Test if any chidren of inheritated base is an IUnknow type.
+static bool AreChildrenOfBaseIUnknown(const CXXRecordDecl *Base)
+{
----------------
If you do the below function right, this one ends up not being necessary.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:2405
+/// \brief Test if RD or its inhetited bases is an IUnknow type.
+static bool IsOrInheritsFromIUnknown(const CXXRecordDecl *RD) {
+  const CXXRecordDecl *Base =
----------------
This doesn't cover the other children of RD.  It checks only the first Base.


https://reviews.llvm.org/D37308





More information about the cfe-commits mailing list