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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to