diff --git a/infer/src/IR/Io_infer.ml b/infer/src/IR/Io_infer.ml index b91e18f84..a10d63dba 100644 --- a/infer/src/IR/Io_infer.ml +++ b/infer/src/IR/Io_infer.ml @@ -28,100 +28,58 @@ struct let outc = Unix.out_channel_of_descr fd in let fmt = F.formatter_of_out_channel outc in let s = - "\n\ - \n\ - \n\ - " ^ +{|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>|} ^ fname ^ - "\n\ - \n\ - \ - \n\ - \ - \n" in +{| + + + +|} in F.fprintf fmt "%s" s; (fd, fmt) diff --git a/infer/src/backend/crashcontext.ml b/infer/src/backend/crashcontext.ml index d270c5ff0..4891cd2c0 100644 --- a/infer/src/backend/crashcontext.ml +++ b/infer/src/backend/crashcontext.ml @@ -27,8 +27,8 @@ let frame_id_of_summary stacktree = (Str.split (Str.regexp "(") stacktree.Stacktree_j.method_name) in match stacktree.Stacktree_j.location with | None -> - failwith "Attempted to take signature of a frame without location \ - information. This is undefined." + failwith + "Attempted to take signature of a frame without location information. This is undefined." | Some { line = Some line_num; file } -> F.sprintf "%s(%s:%d)" short_name (Filename.basename file) line_num | Some { file } -> diff --git a/infer/src/backend/dotty.ml b/infer/src/backend/dotty.ml index 51c329c7d..6bc23bba8 100644 --- a/infer/src/backend/dotty.ml +++ b/infer/src/backend/dotty.ml @@ -605,17 +605,19 @@ let print_kind f kind = | Lambda_pred (no, lev, array) -> match array with | false -> - F.fprintf f "style=dashed; color=blue \ - @\n state%iL%i \ - [label=\"INTERNAL STRUCTURE %i \", style=filled, color= lightblue]@\n" - !dotty_state_count !lambda_counter !lambda_counter ; + F.fprintf f + "%s @\n state%iL%i [label=\"INTERNAL STRUCTURE %i \", %s]@\n" + "style=dashed; color=blue" + !dotty_state_count !lambda_counter !lambda_counter + "style=filled, color= lightblue"; F.fprintf f "state%iL%i -> state%iL%i [color=\"lightblue \" arrowhead=none] @\n" !dotty_state_count !lambda_counter no lev; | true -> - F.fprintf f "style=dashed; color=blue \ - @\n state%iL%i \ - [label=\"INTERNAL STRUCTURE %i \", style=filled, color= lightblue]@\n" - !dotty_state_count !lambda_counter !lambda_counter ; + F.fprintf f + "%s @\n state%iL%i [label=\"INTERNAL STRUCTURE %i \", %s]@\n" + "style=dashed; color=blue" + !dotty_state_count !lambda_counter !lambda_counter + "style=filled, color= lightblue" ; (* F.fprintf f "state%iL%i -> struct%iL%i:%s [color=\"lightblue \" arrowhead=none] @\n" !dotty_state_count !lambda_counter no lev lab;*) incr dotty_state_count @@ -720,14 +722,14 @@ let rec print_struct f pe e te l coo c = F.fprintf f "subgraph structs_%iL%i {@\n" n lambda ; if !print_full_prop then F.fprintf f - " node [shape=record]; @\n struct%iL%i \ - [label=\"{<%s%iL%i> STRUCT: %a } | %a\" ] fontcolor=%s@\n" + " node [%s]; @\n struct%iL%i [label=\"{<%s%iL%i> STRUCT: %a } | %a\" ] fontcolor=%s@\n" + "shape=record" n lambda e_no_special_char n lambda (Sil.pp_exp_printenv pe) e (struct_to_dotty_str pe coo) l c else F.fprintf f - " node [shape=record]; @\n struct%iL%i \ - [label=\"{<%s%iL%i> OBJECT: %s } | %a\" ] fontcolor=%s@\n" + " node [%s]; @\n struct%iL%i [label=\"{<%s%iL%i> OBJECT: %s } | %a\" ] fontcolor=%s@\n" + "shape=record" n lambda e_no_special_char n lambda print_type (struct_to_dotty_str pe coo) l c; F.fprintf f "}@\n" @@ -736,8 +738,9 @@ and print_array f pe e1 e2 l coo c = let lambda = coo.lambda in let e_no_special_char = strip_special_chars (Exp.to_string e1) in F.fprintf f "subgraph structs_%iL%i {@\n" n lambda ; - F.fprintf f " node [shape=record]; @\n struct%iL%i \ - [label=\"{<%s%iL%i> ARRAY| SIZE: %a } | %a\" ] fontcolor=%s@\n" + F.fprintf f + " node [%s]; @\n struct%iL%i [label=\"{<%s%iL%i> ARRAY| SIZE: %a } | %a\" ] fontcolor=%s@\n" + "shape=record" n lambda e_no_special_char n lambda (Sil.pp_exp_printenv pe) e2 (get_contents pe coo) l c; F.fprintf f "}@\n" @@ -749,13 +752,13 @@ and print_sll f pe nesting k e1 coo = begin match k with | Sil.Lseg_NE -> - F.fprintf f "subgraph cluster_%iL%i { \ - style=filled; color=lightgrey; node [style=filled,color=white]; \ - label=\"list NE\";" n' lambda (*pp_nesting nesting*) + F.fprintf f + "subgraph cluster_%iL%i { %s node [style=filled,color=white]; label=\"list NE\";" + n' lambda "style=filled; color=lightgrey;" | Sil.Lseg_PE -> - F.fprintf f "subgraph cluster_%iL%i { \ - style=filled; color=lightgrey; node [style=filled,color=white]; \ - label=\"list PE\";" n' lambda (*pp_nesting nesting *) + F.fprintf f + "subgraph cluster_%iL%i { %s node [style=filled,color=white]; label=\"list PE\";" + n' lambda "style=filled; color=lightgrey;" end; F.fprintf f "state%iL%i [label=\"%a\"]@\n" n lambda (Sil.pp_exp_printenv pe) e1; let n' = !dotty_state_count in @@ -776,13 +779,13 @@ and print_dll f pe nesting k e1 e4 coo = begin match k with | Sil.Lseg_NE -> - F.fprintf f "subgraph cluster_%iL%i { \ - style=filled; color=lightgrey; node [style=filled,color=white]; \ - label=\"doubly-linked list NE\";" n' lambda (*pp_nesting nesting *) + F.fprintf f + "subgraph cluster_%iL%i { %s node [style=filled,color=white]; label=\"%s\";" + n' lambda "style=filled; color=lightgrey;" "doubly-linked list NE" | Sil.Lseg_PE -> - F.fprintf f "subgraph cluster_%iL%i { \ - style=filled; color=lightgrey; node [style=filled,color=white]; \ - label=\"doubly-linked list PE\";" n' lambda (*pp_nesting nesting *) + F.fprintf f + "subgraph cluster_%iL%i { %s node [style=filled,color=white]; label=\"%s\";" + n' lambda "style=filled; color=lightgrey;" "doubly-linked list PE" end; F.fprintf f "state%iL%i [label=\"%a\"]@\n" n lambda (Sil.pp_exp_printenv pe) e1; let n' = !dotty_state_count in @@ -859,8 +862,8 @@ and display_pure_info f pe prop = done in let pure = Prop.get_pure prop in F.fprintf f "subgraph {@\n"; - F.fprintf f " node [shape=box]; \ - @\n state_pi_%i [label=\"STACK \\n\\n %a\" color=orange style=filled]@\n" + F.fprintf f + " node [shape=box]; @\n state_pi_%i [label=\"STACK \\n\\n %a\" color=orange style=filled]@\n" !proposition_counter (Prop.pp_pi pe) pure; if !invisible_arrows then print_invisible_objects (); F.fprintf f "}@\n" diff --git a/infer/src/base/CommandDoc.ml b/infer/src/base/CommandDoc.ml index 448f3d051..bf05f4086 100644 --- a/infer/src/base/CommandDoc.ml +++ b/infer/src/base/CommandDoc.ml @@ -62,31 +62,27 @@ let mk_command_doc ~see_also:see_also_commands ?and_also ?environment:environmen let analyze = mk_command_doc ~title:"Infer Analysis" ~short_description:"analyze the files captured by infer" - ~synopsis:"$(b,infer) $(b,analyze) $(i,[options])\n\ - $(b,infer) $(i,[options])" + ~synopsis: +{|$(b,infer) $(b,analyze) $(i,[options]) +$(b,infer) $(i,[options])|} ~description:[`P "Analyze the files captured in the project results directory and report."] ~see_also:CLOpt.[Report; Run] let capture = mk_command_doc ~title:"Infer Compilation Capture" ~short_description:"capture source files for later analysis" - ~synopsis:"$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,buck) $(i,...)\n\ - $(b,infer) $(b,capture) $(b,--flavors) $(i,[options]) $(b,--) $(b,buck) $(i,...)\n\ - $(b,infer) $(b,capture) $(b,--buck-compilation-database) $(i,[no-]deps) \ - $(i,[options]) $(b,--) $(b,buck) $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--compilation-database) $(i,file)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--compilation-database-escaped) \ - $(i,file)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,gradle)/$(b,gradlew) \ - $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,javac) $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,make)/$(b,clang)/$(b,gcc) \ - $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,mvn)/$(b,mvnw) \ - $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,ndk-build) $(i,...)\n\ - $(b,infer) $(b,capture) $(i,[--no-xcpretty]) $(i,[options]) $(b,--) \ - $(b,xcodebuild) $(i,...)" + ~synopsis: +{|$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,buck) $(i,...) +$(b,infer) $(b,capture) $(b,--flavors) $(i,[options]) $(b,--) $(b,buck) $(i,...) +$(b,infer) $(b,capture) $(b,--buck-compilation-database) $(i,[no-]deps) $(i,[options]) $(b,--) $(b,buck) $(i,...) +$(b,infer) $(b,capture) $(i,[options]) $(b,--compilation-database) $(i,file) +$(b,infer) $(b,capture) $(i,[options]) $(b,--compilation-database-escaped) $(i,file) +$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,gradle)/$(b,gradlew) $(i,...) +$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,javac) $(i,...) +$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,make)/$(b,clang)/$(b,gcc) $(i,...) +$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,mvn)/$(b,mvnw) $(i,...) +$(b,infer) $(b,capture) $(i,[options]) $(b,--) $(b,ndk-build) $(i,...) +$(b,infer) $(b,capture) $(i,[--no-xcpretty]) $(i,[options]) $(b,--) $(b,xcodebuild) $(i,...)|} ~description:[ `P "Capture the build command or compilation database specified on the command line: infer \ intercepts calls to the compiler to read source files, translate them into infer's \ @@ -109,35 +105,36 @@ let compile = generates, which defeats the later capture of compilation commands by infer. Thus, to \ capture a CMake project, one should configure the project from within the infer build \ environment, for instance:"; - `Pre " \ - mkdir build && cd build\n \ - infer compile -- cmake ..\n \ - infer capture -- make"; + `Pre +{| mkdir build && cd build + infer compile -- cmake .. + infer capture -- make|}; `P "The same solution can be used for projects whose \"./configure\" script hardcodes the \ paths to the compilers, for instance:"; - `Pre " \ - infer compile -- ./configure\n \ - infer capture -- make"; + `Pre +{| infer compile -- ./configure + infer capture -- make|}; `P "Another solution for CMake projects is to use CMake's compilation databases, for \ instance:"; - `Pre " \ - mkdir build && cd build\n \ - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..\n \ - infer capture --compilation-database compile_commands.json"; + `Pre +{| mkdir build && cd build + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .. + infer capture --compilation-database compile_commands.json|}; ] ~see_also:CLOpt.[Capture] let infer = mk_command_doc ~title:"Infer Static Analyzer" ~short_description:"static analysis for Java and C/C++/Objective-C/Objective-C++" - ~synopsis:"$(b,infer) $(b,analyze) $(i,[options])\n\ - $(b,infer) $(b,capture) $(i,[options])\n\ - $(b,infer) $(b,compile) $(i,[options])\n\ - $(b,infer) $(b,report) $(i,[options])\n\ - $(b,infer) $(b,reportdiff) $(i,[options])\n\ - $(b,infer) $(b,run) $(i,[options])\n\ - $(b,infer) $(b,--compilation-database[-escaped]) $(i,file) $(i,[options])\n\ - $(b,infer) $(i,[options]) $(b,--) $(b,compile command)\n\ - $(b,infer) $(i,[options])" + ~synopsis: +{|$(b,infer) $(b,analyze) $(i,[options]) +$(b,infer) $(b,capture) $(i,[options]) +$(b,infer) $(b,compile) $(i,[options]) +$(b,infer) $(b,report) $(i,[options]) +$(b,infer) $(b,reportdiff) $(i,[options]) +$(b,infer) $(b,run) $(i,[options]) +$(b,infer) $(b,--compilation-database[-escaped]) $(i,file) $(i,[options]) +$(b,infer) $(i,[options]) $(b,--) $(b,compile command) +$(b,infer) $(i,[options])|} ~description:[ `P "Infer is a static analyzer. Given a collection of source files written in Java or in \ languages of the C family, and a command to build them, infer produces a list of \ @@ -209,10 +206,11 @@ let infer = mk_command_doc ~title:"Infer Static Analyzer" parent, etc., stopping at the first $(b,%s) file found." inferconfig_file inferconfig_file); `P "Example:"; - `Pre " {\ - \n \"cxx\": false,\ - \n \"infer-blacklist-files-containing\": [\"@generated\",\"@Generated\"]\ - \n }"; + `Pre +{| { + "cxx": false, + "infer-blacklist-files-containing": ["@generated","@Generated"] + }|}; ] ~see_also:(List.filter ~f:(function | CLOpt.Clang -> false | _ -> true) CLOpt.all_commands) ~and_also:", $(b,inferTraceBugs)" @@ -252,13 +250,15 @@ let reportdiff = let run = mk_command_doc ~title:"Infer Analysis of a Project" ~short_description:"capture source files, analyze, and report" - ~synopsis:"$(b,infer) $(b,run) $(i,[options])\n\ - $(b,infer) $(i,[options]) $(b,--) $(i,compile command)" + ~synopsis: +{|$(b,infer) $(b,run) $(i,[options]) +$(b,infer) $(i,[options]) $(b,--) $(i,compile command)|} ~description:[ `P "Calling \"$(b,infer) $(b,run) $(i,[options])\" is equivalent to performing the following \ sequence of commands:"; - `Pre "$(b,infer) $(b,capture) $(i,[options])\n\ - $(b,infer) $(b,analyze) $(i,[options])"; + `Pre +{|$(b,infer) $(b,capture) $(i,[options]) +$(b,infer) $(b,analyze) $(i,[options])|}; ] ~see_also:CLOpt.[Analyze; Capture; Report] diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 4e1a7b647..ab1f0d399 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -412,17 +412,19 @@ let () = let abs_struct = CLOpt.mk_int ~deprecated:["absstruct"] ~long:"abs-struct" ~default:1 ~meta:"int" - "Specify abstraction level for fields of structs:\n\ - - 0 = no\n\ - - 1 = forget some fields during matching (and so lseg abstraction)\n" +{|Specify abstraction level for fields of structs: +- 0 = no +- 1 = forget some fields during matching (and so lseg abstraction) +|} and abs_val = CLOpt.mk_int ~deprecated:["absval"] ~long:"abs-val" ~default:2 ~meta:"int" - "Specify abstraction level for expressions:\n\ - - 0 = no abstraction\n\ - - 1 = evaluate all expressions abstractly\n\ - - 2 = 1 + abstract constant integer values during join\n" +{|Specify abstraction level for expressions: +- 0 = no abstraction +- 1 = evaluate all expressions abstractly +- 2 = 1 + abstract constant integer values during join +|} and allow_leak = @@ -488,15 +490,13 @@ and analyzer = | Linters -> () in CLOpt.mk_symbol_opt ~deprecated:["analyzer"] ~long:"analyzer" ~short:'a' ~in_help:CLOpt.[Analyze, manual_generic; Run, manual_generic] - "Specify which analyzer to run (only one at a time is supported):\n\ - - $(b,infer): run the bi-abduction based checker, in particular to check for memory errors \ - (activated by default)\n\ - - $(b,checkers), $(b,eradicate): run the specified analysis\n\ - - $(b,capture): similar to specifying the $(b,capture) subcommand (DEPRECATED)\n\ - - $(b,compile): similar to specifying the $(b,compile) subcommand (DEPRECATED)\n\ - - $(b,crashcontext): experimental (see $(b,--crashcontext))\n\ - - $(b,linters): run linters based on the ast only (Objective-C and Objective-C++ only, \ - activated by default)" +{|Specify which analyzer to run (only one at a time is supported): +- $(b,infer): run the bi-abduction based checker, in particular to check for memory errors (activated by default) +- $(b,checkers), $(b,eradicate): run the specified analysis +- $(b,capture): similar to specifying the $(b,capture) subcommand (DEPRECATED) +- $(b,compile): similar to specifying the $(b,compile) subcommand (DEPRECATED) +- $(b,crashcontext): experimental (see $(b,--crashcontext)) +- $(b,linters): run linters based on the ast only (Objective-C and Objective-C++ only, activated by default)|} ~f:(function | CaptureOnly | CompileOnly as x -> let analyzer_str = List.find_map_exn string_to_analyzer @@ -621,17 +621,18 @@ and (annotation_reachability, and annotation_reachability_custom_pairs = CLOpt.mk_json ~long:"annotation-reachability-custom-pairs" ~in_help:CLOpt.[Analyze, manual_java] - "Specify custom sources/sink for the annotation reachability checker\n\ - Example format: for custom annotations com.my.annotation.{Source1,Source2,Sink1}\n\ - { \"sources\" : [\"Source1\", \"Source2\"], \"sink\" : \"Sink1\" }" +{|Specify custom sources/sink for the annotation reachability checker +Example format: for custom annotations com.my.annotation.{Source1,Source2,Sink1} +{ "sources" : ["Source1", "Source2"], "sink" : "Sink1" }|} and array_level = CLOpt.mk_int ~deprecated:["arraylevel"] ~long:"array-level" ~default:0 - ~meta:"int" "Level of treating the array indexing and pointer arithmetic:\n\ - - 0 = treats both features soundly\n\ - - 1 = assumes that the size of every array is infinite\n\ - - 2 = assumes that all heap dereferences via array indexing and pointer \ - arithmetic are correct\n" + ~meta:"int" +{|Level of treating the array indexing and pointer arithmetic: +- 0 = treats both features soundly +- 1 = assumes that the size of every array is infinite +- 2 = assumes that all heap dereferences via array indexing and pointer arithmetic are correct +|} and ast_file = CLOpt.mk_path_opt ~deprecated:["ast"] ~long:"ast-file" ~meta:"file" "AST file for the translation" @@ -902,11 +903,10 @@ and ( CLOpt.mk_int_opt ~long:"debug-level" ~in_help:all_generic_manuals ~meta:"level" ~f:(fun level -> set_debug_level level; level) - "Debug level (sets $(b,--bo-debug) $(i,level), $(b,--debug-level-analysis) $(i,level), \ - $(b,--debug-level-capture) $(i,level), $(b,--debug-level-linters) $(i,level)):\ - \n - 0: only basic debugging enabled\ - \n - 1: verbose debugging enabled\ - \n - 2: very verbose debugging enabled" +{|Debug level (sets $(b,--bo-debug) $(i,level), $(b,--debug-level-analysis) $(i,level), $(b,--debug-level-capture) $(i,level), $(b,--debug-level-linters) $(i,level)): + - 0: only basic debugging enabled + - 1: verbose debugging enabled + - 2: very verbose debugging enabled|} and debug_exceptions = CLOpt.mk_bool_group ~long:"debug-exceptions" @@ -1200,9 +1200,11 @@ and jobs = and join_cond = CLOpt.mk_int ~deprecated:["join_cond"] ~long:"join-cond" ~default:1 - ~meta:"int" "Set the strength of the final information-loss check used by the join:\n\ - - 0 = use the most aggressive join for preconditions\n\ - - 1 = use the least aggressive join for preconditions\n" + ~meta:"int" +{|Set the strength of the final information-loss check used by the join: +- 0 = use the most aggressive join for preconditions +- 1 = use the least aggressive join for preconditions +|} and latex = CLOpt.mk_path_opt ~deprecated:["latex"] ~long:"latex" @@ -1263,11 +1265,12 @@ and ml_buckets = CLOpt.mk_symbol_seq ~deprecated:["ml_buckets"; "-ml_buckets"] ~long:"ml-buckets" ~default:[`MLeak_cf] ~in_help:CLOpt.[Analyze, manual_clang] - "Specify the memory leak buckets to be checked in Objective-C/C++:\n\ - - $(b,cf) checks leaks from Core Foundation (activated by default),\n\ - - $(b,arc) from code compiled in ARC mode,\n\ - - $(b,narc) from code not compiled in ARC mode,\n\ - - $(b,cpp) from C++ code\n" +{|Specify the memory leak buckets to be checked in Objective-C/C++: +- $(b,cf) checks leaks from Core Foundation (activated by default), +- $(b,arc) from code compiled in ARC mode, +- $(b,narc) from code not compiled in ARC mode, +- $(b,cpp) from C++ code +|} ~symbols:ml_bucket_symbols ~eq:PVariant.(=) and models_mode = @@ -1321,8 +1324,7 @@ and patterns_skip_translation = and per_procedure_parallelism = CLOpt.mk_bool ~long:"per-procedure-parallelism" ~default:true - "Perform analysis with per-procedure parallelism.\n\ - Java is not supported." + "Perform analysis with per-procedure parallelism. Java is not supported." and pmd_xml = CLOpt.mk_bool ~long:"pmd-xml" @@ -1518,9 +1520,11 @@ and sourcepath = and spec_abs_level = CLOpt.mk_int ~deprecated:["spec_abs_level"] ~long:"spec-abs-level" ~default:1 - ~meta:"int" "Set the level of abstracting the postconditions of discovered specs:\n\ - - 0 = nothing special\n\ - - 1 = filter out redundant posts implied by other posts\n" + ~meta:"int" +{|Set the level of abstracting the postconditions of discovered specs: +- 0 = nothing special +- 1 = filter out redundant posts implied by other posts +|} and specs_library = let specs_library = diff --git a/infer/src/checkers/ThreadSafetyDomain.ml b/infer/src/checkers/ThreadSafetyDomain.ml index 7084be747..14a1ed175 100644 --- a/infer/src/checkers/ThreadSafetyDomain.ml +++ b/infer/src/checkers/ThreadSafetyDomain.ml @@ -255,7 +255,7 @@ let pp_summary fmt (thumbs_up, threads, locks, accesses, return_attributes) = F.fprintf fmt - "\nThumbsUp: %a, Threads: %a, Locks: %a \nAccesses %a \nReturn Attributes: %a\n" + "@\nThumbsUp: %a, Threads: %a, Locks: %a @\nAccesses %a @\nReturn Attributes: %a@\n" ThumbsUpDomain.pp thumbs_up ThreadsDomain.pp threads LocksDomain.pp locks @@ -265,7 +265,7 @@ let pp_summary fmt (thumbs_up, threads, locks, let pp fmt { thumbs_up; threads; locks; accesses; attribute_map; } = F.fprintf fmt - "\nThumbsUp: %a, Threads: %a, Locks: %a \nAccesses %a \nReturn Attributes: %a\n" + "@\nThumbsUp: %a, Threads: %a, Locks: %a @\nAccesses %a @\nReturn Attributes: %a@\n" ThumbsUpDomain.pp thumbs_up ThreadsDomain.pp threads LocksDomain.pp locks diff --git a/infer/src/clang/cAst_utils.ml b/infer/src/clang/cAst_utils.ml index aaecdd2dd..1662deb8b 100644 --- a/infer/src/clang/cAst_utils.ml +++ b/infer/src/clang/cAst_utils.ml @@ -70,7 +70,7 @@ let get_decl_opt decl_ptr_opt = let get_stmt stmt_ptr = let stmt = Int.Table.find ClangPointers.pointer_stmt_table stmt_ptr in - if Option.is_none stmt then L.internal_error "stmt with pointer %d not found\n" stmt_ptr; + if Option.is_none stmt then L.internal_error "stmt with pointer %d not found@\n" stmt_ptr; stmt let get_stmt_opt stmt_ptr_opt = @@ -110,7 +110,7 @@ let get_type type_ptr = match type_ptr with | Clang_ast_types.TypePtr.Ptr raw_ptr -> let typ = Int.Table.find ClangPointers.pointer_type_table raw_ptr in - if Option.is_none typ then L.internal_error "type with pointer %d not found\n" raw_ptr; + if Option.is_none typ then L.internal_error "type with pointer %d not found@\n" raw_ptr; typ | _ -> (* otherwise, function fails *) diff --git a/infer/src/integration/Maven.ml b/infer/src/integration/Maven.ml index 2699b8612..de53a12a8 100644 --- a/infer/src/integration/Maven.ml +++ b/infer/src/integration/Maven.ml @@ -15,25 +15,25 @@ let infer_profile_name = "infer-capture" let infer_profile = lazy (* indented so that users may copy it into their projects if they want to *) - (Printf.sprintf "\ -\n \ -\n %s\ -\n \ -\n \ -\n \ -\n org.apache.maven.plugins\ -\n maven-compiler-plugin\ -\n \ -\n javac\ -\n true\ -\n true\ -\n %s\ -\n \ -\n \ -\n \ -\n \ -\n \ - " infer_profile_name (Config.bin_dir ^/ CommandDoc.infer_exe_name)) + (Printf.sprintf {| + + %s + + + + org.apache.maven.plugins + maven-compiler-plugin + + javac + true + true + %s + + + + + |} + infer_profile_name (Config.bin_dir ^/ CommandDoc.infer_exe_name)) let pom_worklist = ref [CLOpt.init_work_dir]