diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-26 12:10:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-26 12:10:19 +0000 |
commit | 1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163 (patch) | |
tree | 7d76db523a10e3129396b86ecaf8198bca494d01 /clang/lib/Sema/SemaAttr.cpp | |
parent | 34d00052cbfd6747026f77128950de4462803d65 (diff) | |
download | bcm5719-llvm-1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163.tar.gz bcm5719-llvm-1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163.zip |
On Mac OS X, the presence of an 'availability' attribute for that
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.
llvm-svn: 128336
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 794b0b1f1cf..4fad1730487 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -297,7 +297,7 @@ void Sema::AddPushedVisibilityAttribute(Decl *D) { if (!VisContext) return; - if (D->hasAttr<VisibilityAttr>()) + if (isa<NamedDecl>(D) && cast<NamedDecl>(D)->getExplicitVisibility()) return; VisStack *Stack = static_cast<VisStack*>(VisContext); |