[PATCH] D32424: Add a fix-it for -Wunguarded-availability

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 03:13:14 PDT 2017


arphaman created this revision.

This patch adds a fix-it for the -Wunguarded-availability warning. This fix-it is similar to the Swift one: it suggests that you wrap the statement in an `if (@available)` check. The produced fixits are indented (just like the Swift ones) to make them look nice in Xcode's fix-it preview.


Repository:
  rL LLVM

https://reviews.llvm.org/D32424

Files:
  include/clang/Lex/Lexer.h
  lib/Lex/Lexer.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/FixIt/fixit-availability.c
  test/FixIt/fixit-availability.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32424.96364.patch
Type: text/x-patch
Size: 13030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170424/d9a91f5f/attachment.bin>


More information about the cfe-commits mailing list