ejschwartz commited on
Commit
888e607
·
1 Parent(s): 9389f49

Return results even when parsing fails...

Browse files
Files changed (1) hide show
  1. main.py +15 -15
main.py CHANGED
@@ -15,21 +15,21 @@ def predict(decompiled_code):
15
  with open(code_file_name, "w") as f:
16
  f.write('#include "/home/ReSym/clang-parser/defs.hh"\n' + decompiled_code)
17
 
18
- # First use clang to see if parsing failed
19
- output = subprocess.run([
20
- "/usr/lib/llvm-12/bin/clang",
21
- "-std=gnu17",
22
- "-c",
23
- code_file_name,
24
- "-o",
25
- "/dev/null"
26
- ],
27
- text=True,
28
- capture_output=True,
29
- )
30
- print(f"clang output: {output}")
31
- print(output.stderr)
32
- assert output.returncode == 0, f"Clang failed to parse: {output}"
33
 
34
  output = subprocess.run(
35
  [
 
15
  with open(code_file_name, "w") as f:
16
  f.write('#include "/home/ReSym/clang-parser/defs.hh"\n' + decompiled_code)
17
 
18
+ # # First use clang to see if parsing failed
19
+ # output = subprocess.run([
20
+ # "/usr/lib/llvm-12/bin/clang",
21
+ # "-std=gnu17",
22
+ # "-c",
23
+ # code_file_name,
24
+ # "-o",
25
+ # "/dev/null"
26
+ # ],
27
+ # text=True,
28
+ # capture_output=True,
29
+ # )
30
+ # print(f"clang output: {output}")
31
+ # print(output.stderr)
32
+ # assert output.returncode == 0, f"Clang failed to parse: {output}"
33
 
34
  output = subprocess.run(
35
  [