Skip to content

Commit c997407

Browse files
committed
Run clang with original optimizer
1 parent fe61e41 commit c997407

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

infer/src/clang/Capture.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,12 @@ let cc1_capture clang_cmd =
190190

191191

192192
let capture clang_cmd =
193-
if ClangCommand.can_attach_ast_exporter clang_cmd then
193+
if ClangCommand.can_attach_ast_exporter clang_cmd then (
194194
(* this command compiles some code; replace the invocation of clang with our own clang and
195195
plugin *)
196-
cc1_capture clang_cmd
196+
cc1_capture clang_cmd ; (* to create AST *)
197+
run_clang clang_cmd Utils.echo_in ; (* to run clang with original optimizer *)
198+
() )
197199
else if Option.exists Config.buck_mode ~f:BuckMode.is_clang_compilation_db then
198200
(* when running with buck's compilation-database, skip commands where frontend cannot be
199201
attached, as they may cause unnecessary compilation errors *)

0 commit comments

Comments
 (0)