mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-04 14:17:07 +00:00 
			
		
		
		
	Adapt trunk change and write comments to PCH
This commit is contained in:
		
							parent
							
								
									61b361320b
								
							
						
					
					
						commit
						4743124370
					
				@ -332,10 +332,7 @@ void BuildPreamble(CompletionSession &session, CompilerInvocation &CI,
 | 
				
			|||||||
    return;
 | 
					    return;
 | 
				
			||||||
  CI.getDiagnosticOpts().IgnoreWarnings = false;
 | 
					  CI.getDiagnosticOpts().IgnoreWarnings = false;
 | 
				
			||||||
  CI.getFrontendOpts().SkipFunctionBodies = true;
 | 
					  CI.getFrontendOpts().SkipFunctionBodies = true;
 | 
				
			||||||
  CI.getLangOpts()->CommentOpts.ParseAllComments = true;
 | 
					  CI.getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
 | 
				
			||||||
#if LLVM_VERSION_MAJOR >= 7
 | 
					 | 
				
			||||||
  CI.getPreprocessorOpts().WriteCommentListToPCH = false;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  StoreDiags DC(main);
 | 
					  StoreDiags DC(main);
 | 
				
			||||||
  IntrusiveRefCntPtr<DiagnosticsEngine> DE =
 | 
					  IntrusiveRefCntPtr<DiagnosticsEngine> DE =
 | 
				
			||||||
 | 
				
			|||||||
@ -136,7 +136,7 @@ struct ProjectProcessor {
 | 
				
			|||||||
    const driver::JobList &Jobs = C->getJobs();
 | 
					    const driver::JobList &Jobs = C->getJobs();
 | 
				
			||||||
    if (Jobs.size() != 1)
 | 
					    if (Jobs.size() != 1)
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    const driver::ArgStringList &CCArgs = Jobs.begin()->getArguments();
 | 
					    const auto &CCArgs = Jobs.begin()->getArguments();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    auto CI = std::make_unique<CompilerInvocation>();
 | 
					    auto CI = std::make_unique<CompilerInvocation>();
 | 
				
			||||||
    CompilerInvocation::CreateFromArgs(*CI, CCArgs.data(),
 | 
					    CompilerInvocation::CreateFromArgs(*CI, CCArgs.data(),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user