mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-04 14:17:07 +00:00 
			
		
		
		
	Misc
This commit is contained in:
		
							parent
							
								
									18e5d5c498
								
							
						
					
					
						commit
						ac09b085ff
					
				@ -21,6 +21,7 @@ limitations under the License.
 | 
				
			|||||||
#include "test.hh"
 | 
					#include "test.hh"
 | 
				
			||||||
#include "working_files.hh"
 | 
					#include "working_files.hh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <clang/Basic/Version.h>
 | 
				
			||||||
#include <llvm/Support/CommandLine.h>
 | 
					#include <llvm/Support/CommandLine.h>
 | 
				
			||||||
#include <llvm/Support/CrashRecoveryContext.h>
 | 
					#include <llvm/Support/CrashRecoveryContext.h>
 | 
				
			||||||
#include <llvm/Support/FileSystem.h>
 | 
					#include <llvm/Support/FileSystem.h>
 | 
				
			||||||
@ -69,6 +70,9 @@ void CloseLog() { fclose(ccls::log::file); }
 | 
				
			|||||||
int main(int argc, char **argv) {
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
  TraceMe();
 | 
					  TraceMe();
 | 
				
			||||||
  sys::PrintStackTraceOnErrorSignal(argv[0]);
 | 
					  sys::PrintStackTraceOnErrorSignal(argv[0]);
 | 
				
			||||||
 | 
					  cl::SetVersionPrinter([](raw_ostream &OS) {
 | 
				
			||||||
 | 
					    OS << clang::getClangToolFullVersion("ccls") << "\n";
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (auto &I : TopLevelSubCommand->OptionsMap)
 | 
					  for (auto &I : TopLevelSubCommand->OptionsMap)
 | 
				
			||||||
    if (I.second->Category != &C)
 | 
					    if (I.second->Category != &C)
 | 
				
			||||||
 | 
				
			|||||||
@ -21,18 +21,13 @@ limitations under the License.
 | 
				
			|||||||
#include <functional>
 | 
					#include <functional>
 | 
				
			||||||
#include <memory>
 | 
					#include <memory>
 | 
				
			||||||
#include <optional>
 | 
					#include <optional>
 | 
				
			||||||
#include <unordered_map>
 | 
					 | 
				
			||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace ccls {
 | 
					namespace ccls {
 | 
				
			||||||
struct CompletionManager;
 | 
					struct CompletionManager;
 | 
				
			||||||
struct Config;
 | 
					 | 
				
			||||||
struct GroupMatch;
 | 
					 | 
				
			||||||
struct VFS;
 | 
					struct VFS;
 | 
				
			||||||
struct IncludeComplete;
 | 
					struct IncludeComplete;
 | 
				
			||||||
struct MultiQueueWaiter;
 | 
					 | 
				
			||||||
struct Project;
 | 
					struct Project;
 | 
				
			||||||
struct DB;
 | 
					 | 
				
			||||||
struct WorkingFile;
 | 
					struct WorkingFile;
 | 
				
			||||||
struct WorkingFiles;
 | 
					struct WorkingFiles;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -196,12 +191,12 @@ struct ReplyOnce {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct MessageHandler {
 | 
					struct MessageHandler {
 | 
				
			||||||
 | 
					  CompletionManager *clang_complete = nullptr;
 | 
				
			||||||
  DB *db = nullptr;
 | 
					  DB *db = nullptr;
 | 
				
			||||||
 | 
					  IncludeComplete *include_complete = nullptr;
 | 
				
			||||||
  Project *project = nullptr;
 | 
					  Project *project = nullptr;
 | 
				
			||||||
  VFS *vfs = nullptr;
 | 
					  VFS *vfs = nullptr;
 | 
				
			||||||
  WorkingFiles *wfiles = nullptr;
 | 
					  WorkingFiles *wfiles = nullptr;
 | 
				
			||||||
  CompletionManager *clang_complete = nullptr;
 | 
					 | 
				
			||||||
  IncludeComplete *include_complete = nullptr;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  llvm::StringMap<std::function<void(Reader &)>> method2notification;
 | 
					  llvm::StringMap<std::function<void(Reader &)>> method2notification;
 | 
				
			||||||
  llvm::StringMap<std::function<void(Reader &, ReplyOnce &)>> method2request;
 | 
					  llvm::StringMap<std::function<void(Reader &, ReplyOnce &)>> method2request;
 | 
				
			||||||
 | 
				
			|||||||
@ -566,7 +566,7 @@ void Standalone(const std::string &root) {
 | 
				
			|||||||
    int entries = 0;
 | 
					    int entries = 0;
 | 
				
			||||||
    for (auto &[_, folder] : project.root2folder)
 | 
					    for (auto &[_, folder] : project.root2folder)
 | 
				
			||||||
      entries += folder.entries.size();
 | 
					      entries += folder.entries.size();
 | 
				
			||||||
      printf("entries: %5d\n", entries);
 | 
					    printf("entries: %5d\n", entries);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  while (1) {
 | 
					  while (1) {
 | 
				
			||||||
    (void)on_indexed->DequeueAll();
 | 
					    (void)on_indexed->DequeueAll();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user