[PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

Manman Ren via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 17:22:02 PDT 2016


manmanren added a comment.

This looks pretty good. Can you add a few more testing cases for templates such as @available inside the template function, @available enclosing the template instantiation?

Cheers,
Manman


================
Comment at: lib/Sema/SemaDeclAttr.cpp:6634
@@ +6633,3 @@
+  // branches.
+  if (CondVersion <= AvailabilityStack.back())
+    return Base::TraverseStmt(If->getThen()) &&
----------------
I wonder if it is better to combine this with the above if (!E->hasVersion()) i.e
if (!E->hasVersion() || E->getVersion() <= AvailabilityStack.back())


https://reviews.llvm.org/D23003





More information about the cfe-commits mailing list