Ctor(Ctor *i) { Ctor(); // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? A temporary object is created here instead [misc-undelegated-constructor] Ctor(0); // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? Ctor(1, 2); // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: did you intend to call a delegated constructor? foo(); }
void AddRef(nsrefcnt refcnt) { mNewStats.mAddRefs++; if (refcnt == 1) { Ctor(); } AccountRefs(); }
Ctor::Ctor() { Ctor(1); // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: did you intend to call a delegated constructor? }