arphaman added inline comments.
================ Comment at: lib/Sema/SemaDeclAttr.cpp:2300 + }; + + llvm::SmallPtrSet<const IdentifierInfo *, 4> MissingPlatformAttributes; ---------------- erik.pilkington wrote: > 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>()) > ``` Nice, that's much better! Updated. 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