Hmm, I think you need to emit a definition, not just a declaration, when you 
see the first use of a static local variable. Here's a valid C++1y program that 
I think the current patch would reject (with a link error):

  static auto f() {
    static int n;
    struct S { int &operator()() { return n; } };
    return S();
  }
  
  int main() { return decltype(f())()(); }

http://reviews.llvm.org/D4787



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to