Re: semanticdb typecache error

Eric Ludlam <[email protected]> Tue, 13 Sep 2016 19:26:25 -0400
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
On 09/03/2016 03:56 AM, Vyacheslav Gonakhchyan wrote:
> typedef PRInt64 PRTime;

I tried this in a short .hpp file in /tmp, and looked in the cache file. 
  It looks like it saved correctly for me.  Not sure what might 
transform it into the bad case.

The error case you displayed:

 > ((((0) (0) "PRTime")) type (:superclasses ("PRInt64" type (:type
"class") nil nil) :type "typedef") nil [3439 3462])

is vaguely similar to how the preprocessor handles some named symbols, 
though that system usually expands correctly, unless you have something 
special.

It is also possible there is a nugget of code somewhere editing the raw 
table structures without doing a copy of the tags.  Something like this 
has occasionally popped up, but no one was ever able to reproduce after 
flushing the cache file.  There is a small bit in the 'save' section 
that identifies one bad case in preprocessor table and refuses to save. 
It might be possible to do something similar here, but then your save 
file would just have missing data, instead of bad data.

Can you reproduce?

You can run 'semantic-sanity-check' in a buffer to make sure that buffer 
is ok.

If you load semantic/db-debug.el, you can run 
`semanticdb-database-sanity-check' to see if everything is in order.  If 
this function successfully flags your error (I don't recall the full set 
of checks it does) and if one or the other isn't to slow, we could 
augment some operation to identify when the problem shows up. 
Otherwise, not sure how else I can help.

Eric

------------------------------------------------------------------------------