Skip to content
  • Nikolai Kosjar's avatar
    Clang: Fix dot-arrow-correction for not-yet-parsed unsaved content · 05c1efd8
    Nikolai Kosjar authored
    The issue was re-producible with e.g.:
    
        void g()
        {
            // Type 'foo.' as fast as possible in the next line
    
        }
    
    This led to "foo->" with completion results as if there was no "foo." at
    all in that line.
    
    We relied on a correct position for
    translationUnit.sourceLocationAtWithoutReparsing(), but the just typed
    characters were not yet reparsed. And we do not want to reparse at that
    point since takes too long. We already determine the utf8 position for
    the dot character, so simply use that instead.
    
    This completes commit 17c1325c
    
    .
    
    Change-Id: I669888b5c17ee63b2aec7b16c9921f9d79e281f9
    Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
    05c1efd8