|
|
|
@ -80,6 +80,7 @@ let store_issues source_file =
|
|
|
|
|
LintIssues.store_issues lint_issues_file !LintIssues.errLogMap
|
|
|
|
|
|
|
|
|
|
let do_frontend_checks source_file ast =
|
|
|
|
|
try
|
|
|
|
|
Logging.out "Start linting file %s\n" (DB.source_file_to_string source_file);
|
|
|
|
|
match ast with
|
|
|
|
|
| Clang_ast_t.TranslationUnitDecl(_, decl_list, _, _) ->
|
|
|
|
@ -93,3 +94,7 @@ let do_frontend_checks source_file ast =
|
|
|
|
|
store_issues source_file;
|
|
|
|
|
Logging.out "End linting file %s\n" (DB.source_file_to_string source_file)
|
|
|
|
|
| _ -> assert false (* NOTE: Assumes that an AST alsways starts with a TranslationUnitDecl *)
|
|
|
|
|
with
|
|
|
|
|
| Assert_failure (file, line, column) ->
|
|
|
|
|
Logging.out "Fatal error: exception Assert_failure(%s, %d, %d)\n%!" file line column;
|
|
|
|
|
exit 1
|
|
|
|
|