data: Fixed error locations not saved with absolute filepaths in CDB projects

This commit is contained in:
Eberhard Graether
2016-08-29 23:30:59 +02:00
parent 0143268f90
commit d4131ce92c
@@ -1,6 +1,7 @@
#include "data/parser/cxx/CxxDiagnosticConsumer.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Tooling/Tooling.h"
#include "data/parser/ParseLocation.h"
#include "data/parser/ParserClient.h"
@@ -73,7 +74,7 @@ void CxxDiagnosticConsumer::HandleDiagnostic(clang::DiagnosticsEngine::Level lev
const clang::SourceManager& sourceManager = info.getSourceManager();
clang::PresumedLoc presumedLocation = sourceManager.getPresumedLoc(info.getLocation());
filePath = presumedLocation.getFilename();
filePath = clang::tooling::getAbsolutePath(presumedLocation.getFilename());
line = presumedLocation.getLine();
column = presumedLocation.getColumn();
}