[LLVMbugs] [Bug 13338] New: #pragma visibility processed too late

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 11 20:50:23 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13338

             Bug #: 13338
           Summary: #pragma visibility processed too late
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In
------------------------------
template <class T>
struct foo {
  static void bar();
};
#pragma GCC visibility push(hidden)
class zed {
  zed(const zed &);
};
void bah() {
  foo<zed>::bar();
}
--------------------------------

We produce a default symbol for foo<zed>::bar, but if zed's copy constructor is
commented we produce a hidden one. The problem is that the type visibility is
cached while parsing the copy constructor declaration but the attribute is only
applied at the end of the class.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list