[LLVMbugs] [Bug 9323] New: Elided undefined copy constructors still marked as used, and warned when internal

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 24 20:32:53 PST 2011


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

           Summary: Elided undefined copy constructors still marked as
                    used, and warned when internal
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu


% cat x.cc                      
namespace {
  struct Uncopyable {
    Uncopyable() {}
  private:
    Uncopyable(const Uncopyable&);
  };
}
void f(const Uncopyable&);
void test5() {
  Uncopyable x;
  f(x);
};

% ./bin/clang -fsyntax-only x.cc
x.cc:8:6: warning: function 'f' has internal linkage but is not defined
void f(const Uncopyable&);
     ^
x.cc:11:3: note: used here
  f(x);
  ^
1 warning generated.


We support this pattern to cope with silly C++ code w.r.t. the standard
requirement of an accessible copy ctor, we should cope with it when warning on
internal linkage as well.

-- 
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