erik.pilkington added a comment. Any thoughts on having this for regular functions and C++ member functions? Seems just as useful there.
================ Comment at: include/clang/Sema/Sema.h:2406 + /// This will warn on any missing clauses in the declaration. + void checkMissingAvailabilityClausesInDeclaration(NamedDecl *Original, NamedDecl *Implementation); + ---------------- Looks longer than 80 chars! ================ Comment at: lib/Sema/SemaDeclAttr.cpp:2300 + }; + + llvm::SmallPtrSet<const IdentifierInfo *, 4> MissingPlatformAttributes; ---------------- I hate to rewrite your function, but have you considered just doing the second loop over the attrs inline instead of hidden in the lambda? I think it would make the function more simple to avoid all the lambdas and callbacks: ``` for (auto *A : Implementation->specific_attrs<AvailabilityAttr>()) { for (auto *B : Original->specific_attrs<AvailabilityAttr>()) { if (A->getPlatform() != B->getPlatform()) continue; if (A->getIntroduced() != B->getIntroduced() || ...) { Diag(); } } } ``` You can do the deprecated check outside of the loop like: ``` if (Impl->hasAttr<Dep>() && !Original->hasAttr<Dep>()) ``` Repository: rL LLVM https://reviews.llvm.org/D39913 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits