summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaAttr.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-01-12 06:42:30 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-01-12 06:42:30 +0000
commit838dc597e25614c653a062a124b06a04d6b7f5eb (patch)
tree2c93daa5ee846c400fdfdc9b335b829f74048958 /lib/Sema/SemaAttr.cpp
parentbcfdd263b79c766db9154b009bd831ef83090c83 (diff)
Disable caching of visibility.
The testcase in pr14929 shows that this is extremely hard to do. If we choose to apply the attribute, that causes the visibility of some decls to change and that can happen really late (during codegen). Current gcc warns and ignores the attribute in this testcase with a warning. This suggest that the correct solution is to find a point in the compilation where we can compute the visibility and * assert it was never computed before * reject any attempts to compute it again in the future (with warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r--lib/Sema/SemaAttr.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp
index 3bfb8f22b4..b212b3fee0 100644
--- a/lib/Sema/SemaAttr.cpp
+++ b/lib/Sema/SemaAttr.cpp
@@ -321,7 +321,6 @@ void Sema::AddPushedVisibilityAttribute(Decl *D) {
= (VisibilityAttr::VisibilityType) rawType;
SourceLocation loc = Stack->back().second;
- ND->ClearLVCache();
D->addAttr(::new (Context) VisibilityAttr(loc, Context, type));
}