erik.pilkington added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2889
+ "use if (%select{@available|__builtin_available}0) instead">,
+ InGroup<DiagGroup<"unsupported-availability-guard">>;
----------------
Might be a bit more clear if you mention in words that @available can only be
the sole condition to the if? This is probably fine though.
================
Comment at: lib/Sema/SemaExpr.cpp:15747
+ // warn when it's used inappropriately (i.e. not if(@available)).
+ if (getCurFunctionOrMethodDecl())
+ getEnclosingFunction()->HasPotentialAvailabilityViolations = true;
----------------
I believe this will not be set if we're rebuilding a templated function, we
should also flag this from `TransformObjCAvailabilityCheckExpr` in
TreeTransform.h.
Repository:
rL LLVM
https://reviews.llvm.org/D33450
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits