diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2016-08-16 17:44:11 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2016-08-16 17:44:11 +0000 |
commit | 5cd57177a51abc7b0bfe18f70566572dbccab9a0 (patch) | |
tree | 37e54d241289b11708d39bd977a59b43c3a31e42 /clang/lib/Sema/ScopeInfo.cpp | |
parent | c98ef718eab85e44701a23f63c1e69eb6e43cc51 (diff) | |
download | bcm5719-llvm-5cd57177a51abc7b0bfe18f70566572dbccab9a0.tar.gz bcm5719-llvm-5cd57177a51abc7b0bfe18f70566572dbccab9a0.zip |
[ObjC] Warn on unguarded use of partial declaration
This commit adds a traversal of the AST after Sema of a function that diagnoses
unguarded references to declarations that are partially available (based on
availability attributes). This traversal is only done when we would otherwise
emit -Wpartial-availability.
This commit is part of a feature I proposed here:
http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html
Differential revision: https://reviews.llvm.org/D23003
llvm-svn: 278826
Diffstat (limited to 'clang/lib/Sema/ScopeInfo.cpp')
-rw-r--r-- | clang/lib/Sema/ScopeInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/ScopeInfo.cpp b/clang/lib/Sema/ScopeInfo.cpp index 4b2e13e20de..76240bcbfc9 100644 --- a/clang/lib/Sema/ScopeInfo.cpp +++ b/clang/lib/Sema/ScopeInfo.cpp @@ -29,6 +29,7 @@ void FunctionScopeInfo::Clear() { HasIndirectGoto = false; HasDroppedStmt = false; HasOMPDeclareReductionCombiner = false; + HasPotentialAvailabilityViolations = false; ObjCShouldCallSuper = false; ObjCIsDesignatedInit = false; ObjCWarnForNoDesignatedInitChain = false; |