mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-04 06:15:20 +00:00 
			
		
		
		
	Fix skipped region in clang 6.0.0; add repology badge; remove -latomic
This commit is contained in:
		
							parent
							
								
									4e8d21e306
								
							
						
					
					
						commit
						1d6c718bae
					
				
							
								
								
									
										17
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								README.md
									
									
									
									
									
								
							@ -1,7 +1,7 @@
 | 
				
			|||||||
# cquery
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[](https://gitter.im/cquery-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
					[](https://gitter.im/cquery-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# cquery
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cquery is a highly-scalable, low-latency language server for C/C++/Objective-C. It is tested
 | 
					cquery is a highly-scalable, low-latency language server for C/C++/Objective-C. It is tested
 | 
				
			||||||
and designed for large code bases like
 | 
					and designed for large code bases like
 | 
				
			||||||
[Chromium](https://chromium.googlesource.com/chromium/src/). cquery provides
 | 
					[Chromium](https://chromium.googlesource.com/chromium/src/). cquery provides
 | 
				
			||||||
@ -14,14 +14,13 @@ some extra features to boot:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  * code completion (with both signature help and snippets)
 | 
					  * code completion (with both signature help and snippets)
 | 
				
			||||||
  * finding definition/references
 | 
					  * finding definition/references
 | 
				
			||||||
  * type hierarchy (parent type, derived types, expandable tree view)
 | 
					  * call (caller/callee) hierarchy, inheritance (base/derived) hierarchy, member hierarchy
 | 
				
			||||||
  * finding base/derived methods/classes, call tree
 | 
					 | 
				
			||||||
  * symbol rename
 | 
					  * symbol rename
 | 
				
			||||||
  * document and global symbol search
 | 
					  * [document symbols](src/messages/text_document_document_symbol.cc) and approximate search of [workspace symbol](src/messages/workspace_symbol.cc)
 | 
				
			||||||
  * hover tooltips showing symbol type
 | 
					  * [hover information](src/messages/text_document_hover.cc)
 | 
				
			||||||
  * diagnostics
 | 
					  * diagnostics
 | 
				
			||||||
  * code actions (clang FixIts)
 | 
					  * code actions (clang FixIts)
 | 
				
			||||||
  * darken/fade code disabled by preprocessor
 | 
					  * preprocessor skipped regions
 | 
				
			||||||
  * #include auto-complete, undefined type include insertion, include quick-jump
 | 
					  * #include auto-complete, undefined type include insertion, include quick-jump
 | 
				
			||||||
    (goto definition, document links)
 | 
					    (goto definition, document links)
 | 
				
			||||||
  * auto-implement functions without a definition
 | 
					  * auto-implement functions without a definition
 | 
				
			||||||
@ -29,6 +28,10 @@ some extra features to boot:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# >>> [Getting started](https://github.com/jacobdufault/cquery/wiki/Getting-started) (CLICK HERE) <<<
 | 
					# >>> [Getting started](https://github.com/jacobdufault/cquery/wiki/Getting-started) (CLICK HERE) <<<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<a href="https://repology.org/metapackage/cquery">
 | 
				
			||||||
 | 
					  <img src="https://repology.org/badge/vertical-allrepos/cquery.svg" alt="Packaging status" align="right">
 | 
				
			||||||
 | 
					</a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Limitations
 | 
					# Limitations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cquery is able to respond to queries quickly because it caches a huge amount of
 | 
					cquery is able to respond to queries quickly because it caches a huge amount of
 | 
				
			||||||
 | 
				
			|||||||
@ -361,9 +361,11 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) {
 | 
				
			|||||||
    CXSourceRangeList* skipped = clang_getSkippedRanges(param->tu->cx_tu, file);
 | 
					    CXSourceRangeList* skipped = clang_getSkippedRanges(param->tu->cx_tu, file);
 | 
				
			||||||
    for (unsigned i = 0; i < skipped->count; ++i) {
 | 
					    for (unsigned i = 0; i < skipped->count; ++i) {
 | 
				
			||||||
      Range range = ResolveCXSourceRange(skipped->ranges[i]);
 | 
					      Range range = ResolveCXSourceRange(skipped->ranges[i]);
 | 
				
			||||||
 | 
					#if CINDEX_VERSION < 45  // Before clang 6.0.0
 | 
				
			||||||
      // clang_getSkippedRanges reports start one token after the '#', move it
 | 
					      // clang_getSkippedRanges reports start one token after the '#', move it
 | 
				
			||||||
      // back so it starts at the '#'
 | 
					      // back so it starts at the '#'
 | 
				
			||||||
      range.start.column -= 1;
 | 
					      range.start.column -= 1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
      db->skipped_by_preprocessor.push_back(range);
 | 
					      db->skipped_by_preprocessor.push_back(range);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    clang_disposeSourceRangeList(skipped);
 | 
					    clang_disposeSourceRangeList(skipped);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								wscript
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								wscript
									
									
									
									
									
								
							@ -339,7 +339,6 @@ def build(bld):
 | 
				
			|||||||
  if sys.platform.startswith('linux'):
 | 
					  if sys.platform.startswith('linux'):
 | 
				
			||||||
    # For __atomic_* when lock free instructions are unavailable
 | 
					    # For __atomic_* when lock free instructions are unavailable
 | 
				
			||||||
    # (either through hardware or OS support)
 | 
					    # (either through hardware or OS support)
 | 
				
			||||||
    lib.append('atomic')
 | 
					 | 
				
			||||||
    lib.append('pthread')
 | 
					    lib.append('pthread')
 | 
				
			||||||
    # loguru calls dladdr
 | 
					    # loguru calls dladdr
 | 
				
			||||||
    lib.append('dl')
 | 
					    lib.append('dl')
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user