Thanks for noticing. I will fix this. I will commit changes in this patch in few chunks later today. For each chunk I will add test cases (the ones I've send with the patch) to one file in test/Analysis folder, so each commit will introduce regression tests for itself.
Is this okay? W dniu 30 września 2010 04:43 użytkownik Zhongxing Xu <[email protected] > napisał: > Hi Marcin, > > + // Check if type is a C++ class with non-trivial destructor. > > + const RecordType* RT = QT.getTypePtr()->getAs<RecordType>(); > + if (!RT || cast<CXXRecordDecl>(RT->getDecl())->hasTrivialDestructor()) > + return Scope; > > RecordType is not necessarily CXXRecordType. cast<CXXRecordDecl> would > cause crashes. We could do something like this: > > if (const RecordType *RT = QT->getAs<RecordType>()) > if (CXXRecordDecl *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) > if (!ClassDecl->hasTrivialDestructor()) { > > // Add the variable to scope > Scope = createOrReuseLocalScope(Scope); > Scope->addVar(VD); > ScopePos = Scope->begin(); > } > return Scope; > > 2010/9/28 Marcin Świderski <[email protected]> > >> Patch adds implicit destructors generation for objects with automatic >> storage duration. Patch is rather big, but it contains all cases (that I >> thought of), as it will be easier to review as a whole IMO. While commiting >> I can divide it to smaller chuncks. >> >> I've added some test cases. They can be later used to create regresion >> tests. >> >> Please approve for commit. >> >> Marcin >> > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
