woboq / moc-ng

A reimplementation of Qt's moc using libclang. Contains both a drop-in remplacement, and a plugin for the clang compiler.
https://woboq.com/blog/moc-with-clang.html
GNU General Public License v3.0
204 stars 23 forks source link

Provide diagnostic kind i.e. -Wmoc-no-enum-names (disable by default) #4

Open nanoant opened 11 years ago

nanoant commented 11 years ago

Currently plugin emits lots of warnings coming from Qt 5.0.2 headers here. I guess this might be right behavior, but it makes is pretty useless for app developer, since problem is in Qt headers not in the app.

So please provide Clang diagnostic kind that is disabled by default and can be enabled via -Wmoc-no-enum-names.

I think this needs somehow to provide our own .td tblgen file.

ogoffart commented 11 years ago

Those warnings have already been fixed in Qt 5.1. If there are still some warning in official header, I think they should be fixed 'upstream'.

nanoant commented 11 years ago

Thanks for the info, I'll check Qt 5.1 then. Anyway just to make it production ready, I think that moc-ng warning should go into their own category.

However I couldn't find any reasonable example how to achieve that easily in Clang plugin.