[LLVMbugs] [Bug 12710] New: Change in destruction order

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 30 18:04:36 PDT 2012


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

             Bug #: 12710
           Summary: Change in destruction order
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            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


For


struct GuardObjectNotifier {
  ~GuardObjectNotifier();
};
template<typename T>
struct BaseAutoLock {
  BaseAutoLock(const GuardObjectNotifier& _notifier = GuardObjectNotifier()) ;
  ~BaseAutoLock();
};
void bar() {
  BaseAutoLock<int> lock;
}


We used to produce

  call void @_ZN19GuardObjectNotifierD1Ev(%struct.GuardObjectNotifier*
%ref.tmp) nounwind optsize
  call void @_ZN12BaseAutoLockIiED1Ev(%struct.BaseAutoLock* %lock) nounwind
optsize

We now produce

  call void @_ZN12BaseAutoLockIiED1Ev(%struct.BaseAutoLock* %lock) nounwind
optsize
  call void @_ZN19GuardObjectNotifierD1Ev(%struct.GuardObjectNotifier*
%ref.tmp) nounwind optsize

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