mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-21 16:09:40 +00:00
Don't reject macro definitions in system headers
Before, an assert() macro expansion jumps to __assert_fail but not assert. This is because OnIndexReference finds a reference to __assert_fail but VisitMacroDefinitionAndExpansions rejects the expansion.
This commit is contained in:
parent
48e88950e1
commit
11aa09fac2
@ -923,9 +923,6 @@ ClangCursor::VisitResult VisitMacroDefinitionAndExpansions(ClangCursor cursor,
|
|||||||
// Resolve location, find IndexFile instance.
|
// Resolve location, find IndexFile instance.
|
||||||
CXSourceRange cx_source_range =
|
CXSourceRange cx_source_range =
|
||||||
clang_Cursor_getSpellingNameRange(cursor.cx_cursor, 0, 0);
|
clang_Cursor_getSpellingNameRange(cursor.cx_cursor, 0, 0);
|
||||||
CXSourceLocation start = clang_getRangeStart(cx_source_range);
|
|
||||||
if (clang_Location_isInSystemHeader(start))
|
|
||||||
break;
|
|
||||||
CXFile file;
|
CXFile file;
|
||||||
Range decl_loc_spelling = Resolve(cx_source_range, &file);
|
Range decl_loc_spelling = Resolve(cx_source_range, &file);
|
||||||
IndexFile* db = ConsumeFile(param, file);
|
IndexFile* db = ConsumeFile(param, file);
|
||||||
|
Loading…
Reference in New Issue
Block a user