summaryrefslogtreecommitdiff
path: root/test/Sema/MicrosoftCompatibility-x64.c
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-03-19 19:18:22 +0000
committerNico Weber <nicolasweber@gmx.de>2015-03-19 19:18:22 +0000
commit86877a86797ac4e347e43ae2eab6cad0944e59a4 (patch)
tree7b7af45a2545cdd70a83bd11dd928108f1b93248 /test/Sema/MicrosoftCompatibility-x64.c
parented642255720097e356e4e4d4e8fae3e1d6aa1bf4 (diff)
downloadclang-86877a86797ac4e347e43ae2eab6cad0944e59a4.tar.gz
Add -Wpartial-availability.
This warns when using decls that are not available on all deployment targets. For example, a call to - (void)ppartialMethod __attribute__((availability(macosx,introduced=10.8))); will warn if -mmacosx-version-min is set to less than 10.8. To silence the warning, one has to explicitly redeclare the method like so: @interface Whatever(MountainLionAPI) - (void)ppartialMethod; @end This way, one cannot accidentally call a function that isn't available everywhere. Having to add the redeclaration will hopefully remind the user to add an explicit respondsToSelector: call as well. Some projects build against old SDKs to get this effect, but building against old SDKs suppresses some bug fixes -- see http://crbug.com/463171 for examples. The hope is that SDK headers are annotated well enough with availability attributes that new SDK + this warning offers the same amount of protection as using an old SDK. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/MicrosoftCompatibility-x64.c')
0 files changed, 0 insertions, 0 deletions