[cfe-dev] how to use clang::ento::ProgramState::contains | static analyzer

Alexander Droste alexander.ra.droste at googlemail.com
Sat Apr 4 06:34:14 PDT 2015


Hey everyone,

while having a look at the SimpleStreamChecker example
in the checkers folder of the static analyzer I can't figure
out how to use the contains function.

I would expect it to work like the get function so it could be called 
like this:

//...
SymbolRef FileDesc = Call.getArgSVal(0).getAsSymbol();
ProgramStateRef State = C.getState();
bool b = State->contains<StreamMap>(FileDesc);

But trying to compile I get an error saying:
no member named 'Contains' in'clang::ento::ProgramStateTrait<(anonymous 
namespace)::StreamMap>'...

Is there another function I have to implement to get this working?

--Alex



More information about the cfe-dev mailing list