clang icon indicating copy to clipboard operation
clang copied to clipboard

Injection of namespace-scoped members cause linker errors

Open asutton opened this issue 7 years ago • 0 comments

For example, this program:

constexpr {
  -> { void foo() { }; }
}

int main() {
  foo() { }
}

results in an undefined reference for foo. In looking at the IR, the definition is not emitted even though the declaration in the AST is marked as used.

asutton avatar Apr 10 '17 13:04 asutton