Commits

Georg Brandl  committed b9fd48a

Complain about unparseable C++ references.

  • Participants
  • Parent commits 1ff3f93

Comments (0)

Files changed (1)

File sphinx/domains/cpp.py

                                 contnode, name)
 
         parser = DefinitionParser(target)
-        # XXX: warn?
         try:
             expr = parser.parse_type().get_name()
             parser.skip_ws()
             if not parser.eof or expr is None:
-                return None
+                raise DefinitionError('')
         except DefinitionError:
+            refdoc = node.get('refdoc', fromdocname)
+            env.warn(refdoc, 'unparseable C++ definition: %r' % target,
+                     node.line)
             return None
 
         parent = node['cpp:parent']