[PATCH] D37308: Interface class with uuid base record
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 13:23:12 PDT 2017
aaron.ballman added inline comments.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:2403-2406
+static bool IsBasePublicInterface(const CXXRecordDecl *RD,
+ AccessSpecifier spec) {
+ return RD->isInterface() && spec == AS_public;
+}
----------------
I'm not certain that this helper function helps all that much.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:2465-2466
+ // uuid attributes.
+ (!RD->getAttr<UuidAttr>() ||
+ Class->hasAttrs())) {
Diag(KnownBase->getLocStart(), diag::err_invalid_base_in_interface)
----------------
This should be using `RD->hasAttr<UuidAttr>()` since you don't need to use the resulting AST information. Also, why are you checking `Class->hasAttrs()`?
https://reviews.llvm.org/D37308
More information about the cfe-commits
mailing list