Improve error message for missing options include (#8154)
authorGereon Kremer <gkremer@cs.stanford.edu>
Thu, 24 Feb 2022 20:17:45 +0000 (21:17 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Feb 2022 20:17:45 +0000 (20:17 +0000)
This PR improves the error message if one tries to use options whose header have not been included.

src/options/mkoptions.py

index 8a7dbf6050d594b5482c7c19aa3d1be3f257a59e..da3e981178bd5fd2a70b9448086e4fafc1cdb77c 100644 (file)
@@ -206,7 +206,7 @@ class Option(object):
 
 def generate_holder_fwd_decls(modules):
     """Render forward declaration of holder structs"""
-    return concat_format('  struct Holder{id_cap};', modules)
+    return concat_format('  struct Holder{id_cap}; // include "{header}" if this is an incomplete type', modules)
 
 
 def generate_holder_mem_decls(modules):