Skip to content
Snippets Groups Projects
Commit 83360c0d authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch 'feature/andre/include-stdlib-normalize-path' into 'master'

[Kernel] normalize paths in some pretty-printed #include directives

Closes #720

See merge request frama-c/frama-c!3013
parents 3daa61d0 14cf2c5f
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,10 @@ let print_global g =
let print_std_includes fmt globs =
if not (Kernel.PrintLibc.get ()) then begin
let extract_file acc = function
| AStr s -> Datatype.String.Set.add s acc
| AStr s ->
(* These strings are filepaths, so we normalize and prettify them *)
let s = Filepath.Normalized.(to_pretty_string (of_string s)) in
Datatype.String.Set.add s acc
| _ -> Kernel.warning "Unexpected attribute parameter for fc_stdlib"; acc
in
let add_file acc g =
......
/* run.config
FILTER: sed -e 's|#include *"\([^/]*[/]\)*\([^/]*\)"|#include "PTESTS_DIR/\2"|'
OPT: -cpp-extra-args="-I @PTEST_DIR@" -ocode @PTEST_DIR@/result/@PTEST_NAME@.c -print -then -ocode="" @PTEST_DIR@/result/@PTEST_NAME@.c -print
*/
......
[kernel] Parsing tests/syntax/anon_enum_libc.c (with preprocessing)
[kernel] Parsing tests/syntax/result/anon_enum_libc.c (with preprocessing)
/* Generated by Frama-C */
#include "PTESTS_DIR/anon_enum_libc.h"
#include "tests/syntax/anon_enum_libc.h"
struct __anonstruct_s1_1 {
int x ;
float y ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment