When triggering code completion within a file that is included in the middle of a declaration in another file, clang would crash while parsing the code.
This occurred with real-world code; there was an enum declaration that included a header in the middle of its declaration to specify the enum members.
Can you use CurLexer->cutOffLexing() instead?