Fixes for Clang 10 compatibility (closes #965) (#968)

Primarily FrontendAction now gets passed as unique_ptr, but also StringRef was added in a few places. See https://releases.llvm.org/10.0.0/tools/clang/docs/ReleaseNotes.html#internal-api-changes and http://llvm.org/docs/ProgrammersManual.html#the-stringref-class Also, llvm::make_unique is now std::make_unique: https://reviews.llvm.org/D66259 because LLVM requires C++14.
This commit is contained in:
Louis St-Amour
2020-06-07 16:18:58 +02:00
committed by GitHub
parent 43a6b1308b
commit a12deb2056
17 changed files with 32 additions and 27 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
#include <clang/AST/DeclCXX.h>
#include <clang/AST/DeclTemplate.h>
#include <clang/Lex/Preprocessor.h>
#include <clang/Basic/FileManager.h>
#include "CanonicalFilePathCache.h"
#include "FilePath.h"
@@ -130,10 +131,10 @@ std::wstring utility::getFileNameOfFileEntry(const clang::FileEntry* entry)
std::wstring fileName = L"";
if (entry != nullptr && entry->isValid())
{
fileName = utility::decodeFromUtf8(entry->tryGetRealPathName());
fileName = utility::decodeFromUtf8(entry->tryGetRealPathName().str());
if (fileName.empty())
{
fileName = utility::decodeFromUtf8(entry->getName());
fileName = utility::decodeFromUtf8(entry->getName().str());
}
else
{