2010/11/17 Marcin Świderski <[email protected]> > W dniu 17 listopada 2010 12:24 użytkownik Zhongxing Xu < > [email protected]> napisał: > > >> >> 2010/11/17 Marcin Świderski <[email protected]> >> >>> W dniu 17 listopada 2010 12:08 użytkownik Zhongxing Xu < >>> [email protected]> napisał: >>> >>>> >>>> >>>> 2010/11/17 Marcin Świderski <[email protected]> >>>> >>>> 2010/11/17 Zhongxing Xu <[email protected]> >>>>> >>>>>> On Tue, Nov 16, 2010 at 4:50 PM, Marcin Swiderski < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Author: sfider >>>>>>> Date: Tue Nov 16 02:50:38 2010 >>>>>>> New Revision: 119341 >>>>>>> >>>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=119341&view=rev >>>>>>> Log: >>>>>>> Refactored GRExprEngine::getCXXThisRegion to use >>>>>>> CXXMethodDecl::getThisType instead of calculating it by hand. >>>>>>> >>>>>> >>>>>> Please don't do this for now. CXXMethodDecl::getThisType() takes >>>>>> qualifiers into account. But in the analyzer, we sometimes analyze >>>>>> methods >>>>>> in isolation. So we always use unqualified type. >>>>>> >>>>> >>>>>> >>>>> What would this change impact? Maybe there should be a comment >>>>> regarding this, because it's counter-intuitive. >>>>> >>>> >>>> To be more precise, we cannot do this. We do not always have >>>> CXXMethodDecl. We sometimes only have CXXRecordDecl when visiting >>>> constructors. >>>> >>>> >>> But what did you meant by analyzing methods in isolation? What would be >>> impacted by using type of 'this' with const qualifier for methods that are >>> const qualified? >>> >> >> Using qualified this is not a problem itself. >> >> But in GRExprEngine::ProcessInitializer(), we only have CXXRecordDecl to >> create the 'this' region. So to uniform interface, we use CXXRecordDecl to >> create 'this' region. >> >> So if a checker will try to get CXXThisRegion based on > CXXMethodDecl::getThisType() returned type it will get different region then > the one used in state?
I think so.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
