File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -85,14 +85,16 @@ public static int Main(string[] args)
8585 foreach ( var libFile in libFiles )
8686 {
8787 parserOptions . FileName = libFile ;
88- var parserResult = ClangParser . ParseLibrary ( parserOptions ) ;
89- if ( parserResult . Kind == ParserResultKind . Success )
88+ using ( var parserResult = ClangParser . ParseLibrary ( parserOptions ) )
9089 {
91- dependencies [ libFile ] = CppSharp . ClangParser . ConvertLibrary ( parserResult . Library ) . Dependencies ;
92- }
93- else
94- {
95- dependencies [ libFile ] = Enumerable . Empty < string > ( ) ;
90+ if ( parserResult . Kind == ParserResultKind . Success )
91+ {
92+ dependencies [ libFile ] = CppSharp . ClangParser . ConvertLibrary ( parserResult . Library ) . Dependencies ;
93+ }
94+ else
95+ {
96+ dependencies [ libFile ] = Enumerable . Empty < string > ( ) ;
97+ }
9698 }
9799 }
98100 var modules = new List < string >
Original file line number Diff line number Diff line change @@ -47,12 +47,14 @@ public override bool VisitLibrary(ASTContext library)
4747 var parserOptions = new ParserOptions ( ) ;
4848 parserOptions . addLibraryDirs ( dir ) ;
4949 parserOptions . FileName = inlines ;
50- var parserResult = ClangParser . ParseLibrary ( parserOptions ) ;
51- if ( parserResult . Kind == ParserResultKind . Success )
50+ using ( var parserResult = ClangParser . ParseLibrary ( parserOptions ) )
5251 {
53- var nativeLibrary = CppSharp . ClangParser . ConvertLibrary ( parserResult . Library ) ;
54- this . Driver . Symbols . Libraries . Add ( nativeLibrary ) ;
55- this . Driver . Symbols . IndexSymbols ( ) ;
52+ if ( parserResult . Kind == ParserResultKind . Success )
53+ {
54+ var nativeLibrary = CppSharp . ClangParser . ConvertLibrary ( parserResult . Library ) ;
55+ this . Driver . Symbols . Libraries . Add ( nativeLibrary ) ;
56+ this . Driver . Symbols . IndexSymbols ( ) ;
57+ }
5658 }
5759 return true ;
5860 }
Original file line number Diff line number Diff line change @@ -277,8 +277,6 @@ public void DocumentProperty(Property property)
277277 var name = macroExpansion . Text . Split ( ' ' ) [ 1 ] ;
278278 if ( name == property . Name || name == alternativeName )
279279 {
280- property . LineNumberStart = macroExpansion . LineNumberStart ;
281- property . LineNumberEnd = macroExpansion . LineNumberEnd ;
282280 property . Name = name ;
283281 this . DocumentQtProperty ( property ) ;
284282 return ;
You can’t perform that action at this time.
0 commit comments