[PATCH] D21502: Fix heuristics skipping invalid ctor-initializers with C++11

Olivier Goffart via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 25 04:52:42 PDT 2016


ogoffart added a comment.

Regarding this:

  struct Foo {
    Foo() : some_long_x(0), some_| {}
    int some_long_x, some_long_y;
  };

That should work fine because the token before the { is the code completion token, not an identifier.  This is basicaly tested by the test with CHECK-CC2.

However, this does not work because if the completion is within an identifier, the Lexer will abort by calling cutOffLexing from Lexer::LexIdentifier


https://reviews.llvm.org/D21502





More information about the cfe-commits mailing list