ahatanak added a comment.
Do we want to enclose declaration statements in "if (@available)" too? I think
doing so can cause compilation errors.
int x = function();
++x; // if declaration is wrapped, this is an error because x is undeclared
in this scope.
Also, when function is used in a case clause, the whole case clause will be
wrapped in "if (@available)". This won't cause a compilation error, but it's
probably better to enclose only the statement of the case label.
switch (c) {
case1: t1 = function();
default: break;
}
Repository:
rL LLVM
https://reviews.llvm.org/D32424
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits