clang warning for non-POD globals

7 views
Skip to first unread message

Kostya Serebryany

unread,
May 24, 2011, 3:05:36 PM5/24/11
to clang, Abhishek Arya
Folks, 

Do we have a clang warning about non-POD globals?
In particular, I want to see all global/static objects that have a non-trivial DTOR.

Thanks, 

--kcc 

Nico Weber

unread,
May 24, 2011, 11:03:23 PM5/24/11
to Kostya Serebryany, clang, Abhishek Arya
Hi Kostya,

I don't think we have this at the moment. It should be pretty easy to
add a check for that to the plugin (look at the toplevel decls, and
use CXXRecordDecl::isPOD()). A low-tech way would be to just add a
warning for this, and then do a local clobber build and see which
files fail to build.

Nico

Reply all
Reply to author
Forward
0 new messages