[cfe-commits] Refactor BasicConstraintManager

Ted Kremenek kremenek at apple.com
Thu Feb 12 14:51:03 PST 2009


On Feb 12, 2009, at 10:57 AM, Ben Laurie wrote:

> All fixed, I hope.

Looks great!  If it isn't too much trouble, can you make two changes?

1)   'AnalysisConsumer.cpp', 'SimpleConstraintManager.h', and  
'SimpleConstraintManager.cpp' are still using tabs.  If you can fix  
that it would be wonderful.

2) Also (in AnalysisConsumer.cpp):

        if (ManagerRegistry::ConstraintMgrCreator != 0)
          CreateConstraintMgr = ManagerRegistry::ConstraintMgrCreator;
+      else if(UseRanges)
+        CreateConstraintMgr = CreateRangeConstraintManager;


please do 'if (UseRanges)' (add a space).  It's really minor, but it's  
consistent.

Also, for now, #ifdef out these lines as Clang will not link because  
'CreateRangeConstraintManager' doesn't exist.  e.g:

        if (ManagerRegistry::ConstraintMgrCreator != 0)
          CreateConstraintMgr = ManagerRegistry::ConstraintMgrCreator;
#if 0
       else if(UseRanges)
         CreateConstraintMgr = CreateRangeConstraintManager;
#endif
        else
          CreateConstraintMgr = CreateBasicConstraintManager;

Once "ManagerRegistry" gets hooked up completely perhaps we can remove  
some of these lines.

Otherwise, this looks really great.  I'm excited to try out the  
RangeConstraintManager when it gets hooked up.



More information about the cfe-commits mailing list