Use CallEvent and CallDescription everywhere. Unhardcode argument numbers in AcquireLock() etc. Have a list of supported functions in one place. Other misc cleanup. No functional change intended anywhere.
Diff Detail
Event Timeline
How about committing the refactor of the code without test modifications. And committing changes to the test separately?
I like this refactoring. I wrote some things that are not clear for me inline.
lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | ||
---|---|---|
107 | In the code below lock is always Call.getSVal(ArgNo). Should we remove it and put SVal acquisition into callees? | |
108 | According to naming conventions , it should be Lock and IsTryLock. But I'm not sure that this corresponds to the file's code style so I do not insist. | |
188 | break? | |
262 | Could you add comments describing what arguments should do? I.e. `/* ArgNo= */ 0, /* Lock= */...? It's hard to remember what do these parameters correspond to. |
This patch has already landed as rG152bc7ffdcd8f62b2279803642f162610154cd2e. I forgot the magic word.
In the code below lock is always Call.getSVal(ArgNo). Should we remove it and put SVal acquisition into callees?