User Details
- User Since
- Mar 7 2017, 4:39 AM (271 w, 4 d)
Aug 24 2017
There are 105 alarms running the checker on the LibreOffice, 92 True positive, 13 not sure.
Aug 22 2017
- Highlight pure virtual even in non-pure-only mode;
- Add change to the header.
Aug 21 2017
- Fix the errors of the tests;
- Add -analyzer-output=text to the run-line;
- Change the message of the visitor's diagnostic piece.
Aug 19 2017
- Rename reportbug();
- Change message "Pure function" to "pure virtual function";
- Fixing: expected-warning;
+enum class ObjectState : bool { CtorCalled, DtorCalled };
+} // end namespace
Aug 13 2017
Fix the Assertion Failed when run the checker to check the building of LibreOffice.
Jul 26 2017
- Change the bugtype, just like the older checker.
Jul 14 2017
- Change two maps to one map.
- Move the declarations of PSM and SVB after the next early return.
- Delete the variable std::string DeclName.
- Delete last return in reportbug().
Jul 12 2017
- Change function name to start with a lower case letter.
- Use StringRef instead of `const char * ' for ReportBug() const.
- Correct the braces for single statement blocks.
- Change IsVirtualCall(const CallExpr *CE) to be a free static function.
- Rename some variables.
- Improve the BugReporterVisitor, enclose the declaration names in single quotes.
- Hoist getSValBuilder() from the if statements.
- Fix some code duplications.
- Use the CXXMemberCall instead CXXInstanceCall in the CheckPreCall.
- Remove IsVirtualCall(CE) from if statements.
- Fix the error of the visitnode() method which may throw a wrong call graph for the code blow.
Jul 9 2017
Look forward to your review.
- Use the map of object to ctor/dtor to check the virtual call.
- Use CXXInstanceCall and getCXXThisVal method to get the 'this' instead of getThisSVal().
- Correct some format errors.
- Change the two bugtype to one.
- Use the generateErrorNode() for the pure virtual call.
- Change the test case for the new expression.
- Change the two bugtype to one.
- Use the generateErrorNode() for the pure virtual call.
- Change the test case for the new expression.
Jul 6 2017
- Rename the BugType.
- Correct the code style to be clang format.
- Rename the arguments to start with uppercase letter.
- Add the support to check for the constructor called by the New expr.
You don't need to put effort to review the code, because I will make some changes to the bug report system and the GDM of the checker which has not been done now.
Jun 27 2017
-Fix the bug of the virtual call during a function call of the object.
-Add flag for the PUREONLY.
Jun 24 2017
Add license to VirtualCallChecker.cpp
Jun 21 2017
> Oh, I think I see how it works now. How about:
struct A; struct X { void callFooOfA(A*); }; struct A { A() { X x; x.virtualMethod(); // this virtual call is ok x.callFooOfA(this) } virtual foo(); }; void X::callFooOfA(A* a) { a->foo(); // Would be good to warn here. } int main() { A a; }
Yes, you are right, the checker doesn't warn on the a->foo();. I will fix this error soon.
Jun 20 2017
Correct some error in VirtualCallChecker.cpp.
Complete the test case.
Add run line in the test case.
Add test case for the virtual call checker.
What about:
struct A { A() { X x; x.virtualMethod(); // this virtual call is ok foo(); // should warn here } virtual foo(); } int main() { A a; }Does the checker warn on the second call?
I do not see any test cases for this patch. Could you add them as well?
I add the test case just now.
Add test case for the patch