ualberta-smr/varclang

Empty ifdef outside of a function body causes presence condition to "leak"

Opened this issue · 1 comments

This also happens when there is an include inside the ifdef. For example:

#ifdef A
#include <iostream>
int i;
#endif

int main() {
  return i;
}

Gets parsed as:

int i; // In context: A
int main() {
    return i;
}
// In context: A

Note that int main() should not have presence condition A

This was fixed at some point. I'm not sure where