diff --git a/frama_Clang_option.ml b/frama_Clang_option.ml index 6eb91e91bc68c0ba50182483a937f0b49458e0d9..560fcd56f90eadec2a32b929c9a9e33905bb0b7e 100644 --- a/frama_Clang_option.ml +++ b/frama_Clang_option.ml @@ -142,11 +142,16 @@ module ParseableOutput = let option_name = "-cxx-parseable-output" let help = "set up Frama-C pretty-printer to output C code that can be reparsed by Frama-C" end) -let () = - ParseableOutput.add_set_hook - (fun _ f -> - let k = Kernel.dkey_print_attrs in - if f then Kernel.add_debug_keys k else Kernel.del_debug_keys k) + +let parseable_output_hook _ f = + let k = Kernel.dkey_print_attrs in + if f then begin + Kernel.add_debug_keys k; + Unmangling.set "none" + end + else Kernel.del_debug_keys k + +let () = ParseableOutput.add_set_hook parseable_output_hook module C_std_headers = String( diff --git a/tests/basic/printer.cpp b/tests/basic/printer.cpp index 8fc14516d38aa9fbb2f9fe9c01d440d44773a04c..cea6de5029e705209075820a15a335f108edeb48 100644 --- a/tests/basic/printer.cpp +++ b/tests/basic/printer.cpp @@ -1,6 +1,6 @@ /* run.config NOFRAMAC: -EXECNOW: LOG printer.res.c @frama-c@ @PTEST_FILE@ @CXX@ @MACHDEP@ -cxx-unmangling none -cxx-parseable-output -ocode @PTEST_RESULT@/printer.res.c -print +EXECNOW: LOG printer.res.c @frama-c@ @PTEST_FILE@ @CXX@ @MACHDEP@ -cxx-parseable-output -ocode @PTEST_RESULT@/printer.res.c -print EXECNOW: LOG printer.res2.c @frama-c@ @CXX@ @MACHDEP@ -cxx-unmangling without-qualifier @PTEST_RESULT@/printer.res.c -ocode @PTEST_RESULT@/printer.res2.c -print */