Add an isDefn
field to the tags table in the database (and fix a warning)
#24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch extends the sqlite database with a new field
isDefn
, which is populated by calling the libclang API functionA potential issue with this patch is that the database is not versioned, and if the new server is run against an old database, things silently fail. I don't know if a return code from sqlite is not being checked or exactly what the issue might be.
Ideally an API version number would be stored in the database and if the server detects an old database, a new column would be added (and perhaps all the tags entries removed). Unfortunately I don't know nough sqlite to make this happen. But if you want to pursue it, I can ask for help.
I also don't know how to extend the internal unit tests to test for this case. But 'make test' continues to pass, and I have eyeballed a database for my application and the results look good!
The patch also fixes a compiler warning.