[cfe-dev] Bug in LocationContextManager

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Tue Nov 3 00:41:01 PST 2009


Hi Ted,

Ted Kremenek schrieb:
> Since this version of 'Profile' is defined as 'virtual' in 
> llvm::FoldingSetNode, it is implicit defined as virtual in 
> LocationContext.
No, that's IMHO not right. FoldingSetImpl::Node, to which 
llvm::FoldingSetNode is typedefed to, has no Profile method at all. 
Instead there is a static dispatch in FoldingSetTrait which normally 
redirects to a Profile method of the instantiated class. Thus the 
virtual keyword is needed in LocationContext (believe me, it solved the 
bug ;-).

Best Olaf




More information about the cfe-dev mailing list