From 206dbe55155304943e807aa627c32dbc030673db Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 5 Aug 2019 12:23:39 +0000 Subject: [PATCH] [clang][NFC] Remove unused private variable 'CI' in CrossTranslationUnit.h It seems because of the recent refactorings this variable has become unused and now we get this warning in the build logs: In file included from llvm/clang/lib/CrossTU/CrossTranslationUnit.cpp:12: llvm/clang/include/clang/CrossTU/CrossTranslationUnit.h:200:21: warning: private field 'CI' is not used [-Wunused-private-field] CompilerInstance &CI; ^ I'll remove them for now to get the builds back to green. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367840 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/CrossTU/CrossTranslationUnit.h | 1 - lib/CrossTU/CrossTranslationUnit.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/clang/CrossTU/CrossTranslationUnit.h b/include/clang/CrossTU/CrossTranslationUnit.h index f5a5212640..b6a199329a 100644 --- a/include/clang/CrossTU/CrossTranslationUnit.h +++ b/include/clang/CrossTU/CrossTranslationUnit.h @@ -197,7 +197,6 @@ private: ImporterMapTy ASTUnitImporterMap; - CompilerInstance &CI; ASTContext &Context; std::shared_ptr ImporterSharedSt; /// Map of imported FileID's (in "To" context) to FileID in "From" context diff --git a/lib/CrossTU/CrossTranslationUnit.cpp b/lib/CrossTU/CrossTranslationUnit.cpp index 512778de56..f43180a2a2 100644 --- a/lib/CrossTU/CrossTranslationUnit.cpp +++ b/lib/CrossTU/CrossTranslationUnit.cpp @@ -188,7 +188,7 @@ template static bool hasBodyOrInit(const T *D) { } CrossTranslationUnitContext::CrossTranslationUnitContext(CompilerInstance &CI) - : CI(CI), Context(CI.getASTContext()), ASTStorage(CI), + : Context(CI.getASTContext()), ASTStorage(CI), CTULoadThreshold(CI.getAnalyzerOpts()->CTUImportThreshold) {} CrossTranslationUnitContext::~CrossTranslationUnitContext() {} -- 2.40.0