possibly bug in LocationCheck


I think I found a bug in clang/include/clang/Analysis/ProgramPoint.h:224.

static bool classof(const ProgramPoint *location) {
unsigned k = location->getKind();
return k == PreLoadKind || PreStoreKind;

Shouldn’t it be “return (k == PreLoadKind) || (k == PreStoreKind);”?
Or is this intended?

– Marius Wachtler

No, that's a bug. It hasn't triggered anywhere yet since we don't have any instances yet of isa<LocationCheck>, but once we did this would be a serious problem. Fixed in r88949.

Thanks so much for pointing this out!