diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-01-08 22:31:36 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-01-08 22:31:36 +0000 |
| commit | b68dd4717e1e47a67e42b6a0fbde0df545340a61 (patch) | |
| tree | b10b7257eadcd8825d290805e53c510a2763e7d2 /clang/lib/Sema | |
| parent | 27614589dc6d214d7a69a1ad8dc3db3803b2b53e (diff) | |
| download | bcm5719-llvm-b68dd4717e1e47a67e42b6a0fbde0df545340a61.tar.gz bcm5719-llvm-b68dd4717e1e47a67e42b6a0fbde0df545340a61.zip | |
Clear LV cache when dropping availability attributes.
llvm-svn: 171906
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index a13da7c9412..225ee24d0fc 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -2043,6 +2043,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range, VersionTuple MergedDeprecated = Deprecated; VersionTuple MergedObsoleted = Obsoleted; bool FoundAny = false; + bool DroppedAny = false; if (D->hasAttrs()) { AttrVec &Attrs = D->getAttrs(); @@ -2077,6 +2078,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range, Diag(OldAA->getLocation(), diag::warn_mismatched_availability); Diag(Range.getBegin(), diag::note_previous_attribute); Attrs.erase(Attrs.begin() + i); + DroppedAny = true; --e; continue; } @@ -2096,6 +2098,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range, MergedIntroduced2, MergedDeprecated2, MergedObsoleted2)) { Attrs.erase(Attrs.begin() + i); + DroppedAny = true; --e; continue; } @@ -2107,6 +2110,9 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range, } } + if (DroppedAny) + D->ClearLVCache(); + if (FoundAny && MergedIntroduced == Introduced && MergedDeprecated == Deprecated && |

