[PATCH] D91295: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfde3edeae47: Frontend: Remove unused parameter from 
ASTUnit… (authored by dexonsmith).
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91295/new/

https://reviews.llvm.org/D91295

Files:
  clang/include/clang/Frontend/ASTUnit.h
  clang/lib/Frontend/ASTUnit.cpp
  clang/tools/libclang/Indexing.cpp


Index: clang/tools/libclang/Indexing.cpp
===
--- clang/tools/libclang/Indexing.cpp
+++ clang/tools/libclang/Indexing.cpp
@@ -617,9 +617,7 @@
   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);
 
Index: clang/lib/Frontend/ASTUnit.cpp
===
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -1520,8 +1520,7 @@
 ASTUnit *Unit, bool Persistent, StringRef ResourceFilesPath,
 bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
 unsigned PrecompilePreambleAfterNParses, bool CacheCodeCompletionResults,
-bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile,
-std::unique_ptr *ErrAST) {
+bool UserFilesAreVolatile, std::unique_ptr *ErrAST) {
   assert(CI && "A CompilerInvocation is required");
 
   std::unique_ptr OwnAST;
@@ -1544,8 +1543,7 @@
 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
Index: clang/include/clang/Frontend/ASTUnit.h
===
--- clang/include/clang/Frontend/ASTUnit.h
+++ clang/include/clang/Frontend/ASTUnit.h
@@ -756,7 +756,6 @@
   CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
   unsigned PrecompilePreambleAfterNParses = 0,
   bool CacheCodeCompletionResults = false,
-  bool IncludeBriefCommentsInCodeCompletion = false,
   bool UserFilesAreVolatile = false,
   std::unique_ptr *ErrAST = nullptr);
 


Index: clang/tools/libclang/Indexing.cpp
===
--- clang/tools/libclang/Indexing.cpp
+++ clang/tools/libclang/Indexing.cpp
@@ -617,9 +617,7 @@
   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);
 
Index: clang/lib/Frontend/ASTUnit.cpp
===
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -1520,8 +1520,7 @@
 ASTUnit *Unit, bool Persistent, StringRef ResourceFilesPath,
 bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
 unsigned PrecompilePreambleAfterNParses, bool CacheCodeCompletionResults,
-bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile,
-std::unique_ptr *ErrAST) {
+bool UserFilesAreVolatile, std::unique_ptr *ErrAST) {
   assert(CI && "A CompilerInvocation is required");
 
   std::unique_ptr OwnAST;
@@ -1544,8 +1543,7 @@
 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
Index: clang/include/clang/Frontend/ASTUnit.h
===
--- clang/include/clang/Frontend/ASTUnit.h
+++ clang/include/clang/Frontend/ASTUnit.h
@@ -756,7 +756,6 @@
   CaptureDiagsKind 

[PATCH] D91295: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC

2020-11-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91295/new/

https://reviews.llvm.org/D91295

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D91295: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision.
dexonsmith added reviewers: JDevlieghere, jansvoboda11.
Herald added subscribers: ributzka, arphaman.
dexonsmith requested review of this revision.

Drop `IncludeBriefCommentsInCodeCompletion` since it is always `false`.


https://reviews.llvm.org/D91295

Files:
  clang/include/clang/Frontend/ASTUnit.h
  clang/lib/Frontend/ASTUnit.cpp
  clang/tools/libclang/Indexing.cpp


Index: clang/tools/libclang/Indexing.cpp
===
--- clang/tools/libclang/Indexing.cpp
+++ clang/tools/libclang/Indexing.cpp
@@ -617,9 +617,7 @@
   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);
 
Index: clang/lib/Frontend/ASTUnit.cpp
===
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -1513,8 +1513,7 @@
 ASTUnit *Unit, bool Persistent, StringRef ResourceFilesPath,
 bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
 unsigned PrecompilePreambleAfterNParses, bool CacheCodeCompletionResults,
-bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile,
-std::unique_ptr *ErrAST) {
+bool UserFilesAreVolatile, std::unique_ptr *ErrAST) {
   assert(CI && "A CompilerInvocation is required");
 
   std::unique_ptr OwnAST;
@@ -1537,8 +1536,7 @@
 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
Index: clang/include/clang/Frontend/ASTUnit.h
===
--- clang/include/clang/Frontend/ASTUnit.h
+++ clang/include/clang/Frontend/ASTUnit.h
@@ -757,7 +757,6 @@
   CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
   unsigned PrecompilePreambleAfterNParses = 0,
   bool CacheCodeCompletionResults = false,
-  bool IncludeBriefCommentsInCodeCompletion = false,
   bool UserFilesAreVolatile = false,
   std::unique_ptr *ErrAST = nullptr);
 


Index: clang/tools/libclang/Indexing.cpp
===
--- clang/tools/libclang/Indexing.cpp
+++ clang/tools/libclang/Indexing.cpp
@@ -617,9 +617,7 @@
   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);
 
Index: clang/lib/Frontend/ASTUnit.cpp
===
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -1513,8 +1513,7 @@
 ASTUnit *Unit, bool Persistent, StringRef ResourceFilesPath,
 bool OnlyLocalDecls, CaptureDiagsKind CaptureDiagnostics,
 unsigned PrecompilePreambleAfterNParses, bool CacheCodeCompletionResults,
-bool IncludeBriefCommentsInCodeCompletion, bool UserFilesAreVolatile,
-std::unique_ptr *ErrAST) {
+bool UserFilesAreVolatile, std::unique_ptr *ErrAST) {
   assert(CI && "A CompilerInvocation is required");
 
   std::unique_ptr OwnAST;
@@ -1537,8 +1536,7 @@
 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
Index: clang/include/clang/Frontend/ASTUnit.h
===
--- clang/include/clang/Frontend/ASTUnit.h
+++ clang/include/clang/Frontend/ASTUnit.h
@@ -757,7 +757,6 @@
   CaptureDiagsKind CaptureDiagnostics = CaptureDiagsKind::None,
   unsigned