I create a minimal sample project(no compiler, only contains a script), but I can't reproduce.
Basically there are three kinds of things when a project is loaded:
1, get the gcc's preprocessor directives (by calling the gcc -dM -E), but this only happens the compiler is valid.
2, get the files
After parsing the above two(parsing is done in thread pool), here comes the step 3:
3, run a task to mark some tokens in the TokenTree as local.
I believe in your case, both 1 and 2 are empty, so we don't have any chance to run step 3, so the m_NeedMarkFileAsLocal never get chance to reset.