Currently not possible, since todo objects are only searched in contexts specified by checkboxes (so only in comments, lines and identifiers at the time of writing). Support for what you want is in the JetBrains boot tracker, since the RSRP-71440 #warnings cannot be recorded on the TODO list - note that in May 2011, the version of the target fix was pushed from 5.1 to an undefined future version.
source share