NoQ added inline comments.

================
Comment at: 
clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/lit.local.cfg:6
+
+config.substitutions.append(('PYTHON_EXE', python_executable));
----------------
I might be overthinking/cargo-culting, but folks seem to never expose the 
python executable on its own, instead make a substitution for the entire tool. 
They also seem to use `config.python_executable` instead of `sys.executable`, 
though it's probably always the same no matter how they override it. Still, I 
might be missing some weird interactions. I think it's better to just do 
whatever everyone else does, something along the lines of
```
config.substitutions.append(
  (
    "%analyze_safe_buffer_debug_notes",
    "'%s' %s % (
      config.python_executable,
      os.path.join(config.clang_src_dir, "utils", 
"analyze_safe_buffer_debug_notes.py")
    )
  )
)```

Also forward slashes will probably fail on Windows, so I can see how 
`os.path.join` is necessary. Though I suspect we will anyway end up with 
`UNSUPPORTED: system-windows` or `REQUIRES: shell` one way or another.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158561/new/

https://reviews.llvm.org/D158561

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D158561: [-Wunsafe... Artem Dergachev via Phabricator via cfe-commits

Reply via email to