[cfe-commits] r171857 - in /cfe/trunk: lib/AST/ASTContext.cpp test/SemaCXX/visibility.cpp
Rafael Espindola
rafael.espindola at gmail.com
Tue Jan 8 06:58:33 PST 2013
Author: rafael
Date: Tue Jan 8 08:58:32 2013
New Revision: 171857
URL: http://llvm.org/viewvc/llvm-project?rev=171857&view=rev
Log:
Clear the LV cache when setting the instantiated from link.
Fixes pr14835.
Added:
cfe/trunk/test/SemaCXX/visibility.cpp
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=171857&r1=171856&r2=171857&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Jan 8 08:58:32 2013
@@ -949,6 +949,7 @@
"Already noted what static data member was instantiated from");
InstantiatedFromStaticDataMember[Inst]
= new (*this) MemberSpecializationInfo(Tmpl, TSK, PointOfInstantiation);
+ Inst->ClearLVCache();
}
FunctionDecl *ASTContext::getClassScopeSpecializationPattern(
Added: cfe/trunk/test/SemaCXX/visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/visibility.cpp?rev=171857&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/visibility.cpp (added)
+++ cfe/trunk/test/SemaCXX/visibility.cpp Tue Jan 8 08:58:32 2013
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only %s
+
+namespace test1 {
+ template <class C>
+ struct C2
+ {
+ static int p __attribute__((visibility("hidden")));
+ };
+ int f() {
+ return C2<int>::p;
+ }
+}
More information about the cfe-commits
mailing list