arphaman added inline comments.
================ Comment at: tools/libclang/CIndex.cpp:7287 + if (!HadAvailAttr) if (const EnumConstantDecl *EnumConst = dyn_cast<EnumConstantDecl>(D)) ---------------- I think that you can move this `if` before the new `if`, and convert the new `if` to be an `if (AvailabilityAttrs.empty())` that returns early. Then you can do the merging outside of the `if` at the end of the function. ================ Comment at: tools/libclang/CIndex.cpp:7322 + + for (int I = 0, E = AvailabilityAttrs.size(); I < E && I < availability_size; + ++I) { ---------------- You can use a ranged for loop here if you use `take_front`, e.g. ``` for (const auto *Avail : AvailabilityAttrs.take_front(availability_size)) ``` https://reviews.llvm.org/D33478 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits