• Nikolai Kosjar's avatar
    Clang: Pass on file paths with native separators · 36e7f454
    Nikolai Kosjar authored
    libclang 3.8 seems to be sensitive to file paths separators [1]. On Windows,
    this led to not updated document annotations and/or crashes after reparsing.
    
    When passing file paths to libclang, convert to native separators.
    When getting file paths from libclang, convert back.
    
    This handles:
     * main file path
     * file paths of the unsaved files
     * -I<DIR> arguments, the resource path (for builtins) and the paths to the
       wrapped qt headers
     * included header files from libclang
     * source locations from libclang
    
    Also, minimize the conversion in SourceLocation to a minimum by making
    filePath() lazy.
    
    [1] https://llvm.org/bugs/show_bug.cgi?id=28381
    
    Change-Id: If5866f34a6fdc6b34b16c022d3988e8e6eae2a0a
    Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
    36e7f454
Name
Last commit
Last update
..
images Loading commit data...
test Loading commit data...
ClangCodeModel.json.in Loading commit data...
README Loading commit data...
clangactivationsequencecontextprocessor.cpp Loading commit data...
clangactivationsequencecontextprocessor.h Loading commit data...
clangactivationsequenceprocessor.cpp Loading commit data...
clangactivationsequenceprocessor.h Loading commit data...
clangassistproposal.cpp Loading commit data...
clangassistproposal.h Loading commit data...
clangassistproposalitem.cpp Loading commit data...
clangassistproposalitem.h Loading commit data...
clangassistproposalmodel.cpp Loading commit data...
clangassistproposalmodel.h Loading commit data...
clangbackendipcintegration.cpp Loading commit data...
clangbackendipcintegration.h Loading commit data...
clangcodemodel.pro Loading commit data...
clangcodemodel.qbs Loading commit data...
clangcodemodel.qrc Loading commit data...
clangcodemodel_dependencies.pri Loading commit data...
clangcodemodelplugin.cpp Loading commit data...
clangcodemodelplugin.h Loading commit data...
clangcodemodelunittestfiles.pri Loading commit data...
clangcompletionassistinterface.cpp Loading commit data...
clangcompletionassistinterface.h Loading commit data...
clangcompletionassistprocessor.cpp Loading commit data...
clangcompletionassistprocessor.h Loading commit data...
clangcompletionassistprovider.cpp Loading commit data...
clangcompletionassistprovider.h Loading commit data...
clangcompletionchunkstotextconverter.cpp Loading commit data...
clangcompletionchunkstotextconverter.h Loading commit data...
clangcompletioncontextanalyzer.cpp Loading commit data...
clangcompletioncontextanalyzer.h Loading commit data...
clangconstants.h Loading commit data...
clangdiagnosticfilter.cpp Loading commit data...
clangdiagnosticfilter.h Loading commit data...
clangdiagnosticmanager.cpp Loading commit data...
clangdiagnosticmanager.h Loading commit data...
clangdiagnostictooltipwidget.cpp Loading commit data...
clangdiagnostictooltipwidget.h Loading commit data...
clangeditordocumentparser.cpp Loading commit data...
clangeditordocumentparser.h Loading commit data...
clangeditordocumentprocessor.cpp Loading commit data...
clangeditordocumentprocessor.h Loading commit data...
clangfixitoperation.cpp Loading commit data...
clangfixitoperation.h Loading commit data...
clangfixitoperationsextractor.cpp Loading commit data...
clangfixitoperationsextractor.h Loading commit data...
clangfunctionhintmodel.cpp Loading commit data...
clangfunctionhintmodel.h Loading commit data...
clanghighlightingmarksreporter.cpp Loading commit data...
clanghighlightingmarksreporter.h Loading commit data...
clangisdiagnosticrelatedtolocation.h Loading commit data...
clangmodelmanagersupport.cpp Loading commit data...
clangmodelmanagersupport.h Loading commit data...
clangpreprocessorassistproposalitem.cpp Loading commit data...
clangpreprocessorassistproposalitem.h Loading commit data...
clangprojectsettings.cpp Loading commit data...
clangprojectsettings.h Loading commit data...
clangprojectsettingswidget.cpp Loading commit data...
clangprojectsettingswidget.h Loading commit data...
clangprojectsettingswidget.ui Loading commit data...
clangtextmark.cpp Loading commit data...
clangtextmark.h Loading commit data...
clangutils.cpp Loading commit data...
clangutils.h Loading commit data...