[Lldb-commits] [PATCH] D27394: Fix expression evaluation inside lambda functions for gcc

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 5 10:36:21 PST 2016


jingham added a comment.

This is legal C++:

  #include <stdio.h>
  
  int main(int argc, char **argv)
  {
    if (argc > 1)
      {
        struct foo
        {
          long int value;
        };
        foo my_foo = {10};
        printf ("Foo: %ld.\n", my_foo.value);
  
      }
    else
      {
        struct foo
        {
          short int value;
        };
        foo my_foo = {10};
        printf ("Foo: %d.\n", my_foo.value);
      }
    return 0;
  }

Isn't this patch going to cause problems with this sort of code?


https://reviews.llvm.org/D27394





More information about the lldb-commits mailing list