forked from qt-creator/qt-creator
Clang: Fix build with clang-8
Clang-Tidy checks and Clazy flags updated. CLANG-UPGRADE-CHECK done. Change-Id: I1ca585c5c3c77a7f183719df9c262603150914e8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "clangrefactoringbackend_global.h"
|
||||
|
||||
#include <clang/AST/AST.h>
|
||||
#include <clang/AST/ASTContext.h>
|
||||
#include <clang/AST/RecursiveASTVisitor.h>
|
||||
@@ -161,7 +163,7 @@ std::vector<const clang::NamedDecl *> namedDeclarationsAt(const clang::ASTContex
|
||||
|
||||
auto declarations = Context.getTranslationUnitDecl()->decls();
|
||||
for (auto ¤tDeclation : declarations) {
|
||||
const auto &fileLocation = currentDeclation->getLocStart();
|
||||
const auto &fileLocation = currentDeclation->getBeginLoc();
|
||||
const auto &fileName = sourceManager.getFilename(fileLocation);
|
||||
if (fileName == currentFile) {
|
||||
visitor.TraverseDecl(currentDeclation);
|
||||
|
||||
@@ -92,8 +92,9 @@ newFrontendActionFactory(Factory *consumerFactory,
|
||||
m_sourceFileCallbacks(sourceFileCallbacks)
|
||||
{}
|
||||
|
||||
std::unique_ptr<clang::ASTConsumer>
|
||||
CreateASTConsumer(clang::CompilerInstance &instance, StringRef inFile) override {
|
||||
std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(clang::CompilerInstance &instance,
|
||||
llvm::StringRef inFile) override
|
||||
{
|
||||
return m_consumerFactory->newASTConsumer(instance, inFile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user