[clang] cfde3ed - Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 14:47:29 PST 2020
Author: Duncan P. N. Exon Smith
Date: 2020-11-13T17:47:17-05:00
New Revision: cfde3edeae4730aa44642c4835bcfa5a857ea8d4
URL: https://github.com/llvm/llvm-project/commit/cfde3edeae4730aa44642c4835bcfa5a857ea8d4
DIFF: https://github.com/llvm/llvm-project/commit/cfde3edeae4730aa44642c4835bcfa5a857ea8d4.diff
LOG: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC
Drop `IncludeBriefCommentsInCodeCompletion` since it is always `false`.
Differential Revision: https://reviews.llvm.org/D91295
Added:
Modified:
clang/include/clang/Frontend/ASTUnit.h
clang/lib/Frontend/ASTUnit.cpp
clang/tools/libclang/Indexing.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h
index 50ab86ebad97..5595b8c7bcae 100644
--- a/clang/include/clang/Frontend/ASTUnit.h
+++ b/clang/include/clang/Frontend/ASTUnit.h
@@ -756,7 +756,6 @@ class ASTUnit {
CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
unsigned PrecompilePreambleAfterNParses = 0,
bool CacheCodeCompletionResults = false,
- bool IncludeBriefCommentsInCodeCompletion = false,
bool UserFilesAreVolatile = false,
std::unique_ptr<ASTUnit> *ErrAST = nullptr);
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index e1aa3682a2b7..a112117d1c06 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -1520,8 +1520,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(
ASTUnit *Unit, bool Persistent, StringRef ResourceFilesPath,
bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
unsigned PrecompilePreambleAfterNParses, bool CacheCodeCompletionResults,
- bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile,
- std::unique_ptr<ASTUnit> *ErrAST) {
+ bool UserFilesAreVolatile, std::unique_ptr<ASTUnit> *ErrAST) {
assert(CI && "A CompilerInvocation is required");
std::unique_ptr<ASTUnit> OwnAST;
@@ -1544,8 +1543,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(
AST->PreambleRebuildCountdown = PrecompilePreambleAfterNParses;
AST->TUKind = Action ? Action->getTranslationUnitKind() : TU_Complete;
AST->ShouldCacheCodeCompletionResults = CacheCodeCompletionResults;
- AST->IncludeBriefCommentsInCodeCompletion
- = IncludeBriefCommentsInCodeCompletion;
+ AST->IncludeBriefCommentsInCodeCompletion = false;
// Recover resources if we crash before exiting this method.
llvm::CrashRecoveryContextCleanupRegistrar<ASTUnit>
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index f0303fdcd825..0e83ec6ca799 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -617,9 +617,7 @@ static CXErrorCode clang_indexSourceFile_Impl(
std::move(CInvok), CXXIdx->getPCHContainerOperations(), Diags,
IndexAction.get(), UPtr, Persistent, CXXIdx->getClangResourcesPath(),
OnlyLocalDecls, CaptureDiagnostics, PrecompilePreambleAfterNParses,
- CacheCodeCompletionResults,
- /*IncludeBriefCommentsInCodeCompletion=*/false,
- /*UserFilesAreVolatile=*/true);
+ CacheCodeCompletionResults, /*UserFilesAreVolatile=*/true);
if (DiagTrap.hasErrorOccurred() && CXXIdx->getDisplayDiagnostics())
printDiagsToStderr(UPtr);
More information about the cfe-commits
mailing list