erichkeane added inline comments.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:2377
+/// \brief Tests if the __interface base is public.
+static bool IsBasePublicInterface(const CXXRecordDecl *RD,
+                                  AccessSpecifier spec) {
----------------
This function isn't testing the 'base', it is testing the actual record decl.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:2391
+
+static bool IsInheritatedBaseUuid(const CXXRecordDecl *RD) {
+  for (unsigned int n = 0; n < RD->getNumBases(); n++) {
----------------
This function isn't nearly correct.  IT is only testing the first base (over 
and over, but returns immediately...).


================
Comment at: lib/Sema/SemaDeclCXX.cpp:2396
+
+    return (Base && Base->getName() == "IUnknown" &&
+            !strcmp(Base->getAttr<InheritableAttr>()->getSpelling(),"uuid"));
----------------
Note that this can go down a number of layers.  You have to ensure that it goes 
multiple layers down.  You may wish to make this recursive, and to use your 
"IsUnknownType" function..


https://reviews.llvm.org/D37308



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

Reply via email to