Looks good. Please commit.

Thanks for fixing,
Anna.
On Jun 11, 2013, at 9:49 AM, Argyrios Kyrtzidis <[email protected]> wrote:

> + Anna.
> 
> On Jun 11, 2013, at 1:30 AM, Pavel Labath <[email protected]> wrote:
> 
>> Hi klimek,
>> 
>> "register" functions for the checker were caching the checker objects in a
>> static variable. This caused problems when the function is called with a
>> different CheckerManager.
>> 
>> http://llvm-reviews.chandlerc.com/D955
>> 
>> Files:
>>  lib/StaticAnalyzer/Checkers/CStringChecker.cpp
>> 
>> Index: lib/StaticAnalyzer/Checkers/CStringChecker.cpp
>> ===================================================================
>> --- lib/StaticAnalyzer/Checkers/CStringChecker.cpp
>> +++ lib/StaticAnalyzer/Checkers/CStringChecker.cpp
>> @@ -2018,10 +2018,7 @@
>> 
>> #define REGISTER_CHECKER(name) \
>> void ento::register##name(CheckerManager &mgr) {\
>> -  static CStringChecker *TheChecker = 0; \
>> -  if (TheChecker == 0) \
>> -    TheChecker = mgr.registerChecker<CStringChecker>(); \
>> -  TheChecker->Filter.Check##name = true; \
>> +  mgr.registerChecker<CStringChecker>()->Filter.Check##name = true; \
>> }
>> 
>> REGISTER_CHECKER(CStringNullArg)
>> <Mail Attachment>_______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to