[LLVMbugs] [Bug 20221] New: "member access into incomplete type" errors in msvc mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 6 11:18:04 PDT 2014


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

            Bug ID: 20221
           Summary: "member access into incomplete type" errors in msvc
                    mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This program builds fine with "regular" clang, but complains about incomplete
types with -target i386-apple-windows:

$ cat repro.cc
template <typename T> class RefPtr {
  T *m_ptr;

public:
  ~RefPtr() { m_ptr->deref(); }
};

class DeclaredOnly;

class Base {
public:
  virtual ~Base();
};

class ReplaceSelectionCommand : public Base {
  RefPtr<DeclaredOnly> m_insertionStyle;
public:
  virtual void trace();
  ReplaceSelectionCommand();
};

void foo() { new ReplaceSelectionCommand; }
$ $C -c repro.cc  
$ $C -c repro.cc  -target i386-apple-windows 
repro.cc:5:20: error: member access into incomplete type 'DeclaredOnly'
  ~RefPtr() { m_ptr->deref(); }
                   ^
repro.cc:15:7: note: in instantiation of member function
'RefPtr<DeclaredOnly>::~RefPtr' requested here
class ReplaceSelectionCommand : public Base {
      ^
repro.cc:8:7: note: forward declaration of 'DeclaredOnly'
class DeclaredOnly;
      ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140706/ffd04c2d/attachment.html>


More information about the llvm-bugs mailing list