Browse Source

cppparser: Fix recursion in expanding function macro arguments

See #1635
rdb 1 year ago
parent
commit
38a3048479
1 changed files with 5 additions and 0 deletions
  1. 5 0
      dtool/src/cppparser/cppPreprocessor.cxx

+ 5 - 0
dtool/src/cppparser/cppPreprocessor.cxx

@@ -2184,6 +2184,11 @@ expand_manifest(const CPPManifest *manifest, const YYLTYPE &loc) {
   for (string &arg : args) {
   for (string &arg : args) {
     std::set<const CPPManifest *> expanded;
     std::set<const CPPManifest *> expanded;
     expanded.insert(manifest);
     expanded.insert(manifest);
+    for (const InputFile &infile : _files) {
+      if (infile._ignore_manifest) {
+        expanded.insert(infile._manifest);
+      }
+    }
     r_expand_manifests(arg, false, loc, expanded);
     r_expand_manifests(arg, false, loc, expanded);
   }
   }