[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map
Peter Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 11 09:55:23 PST 2019
Lekensteyn added a comment.
Could you add more tests to check the error message for bad options (missing `=`):
-fdebug-prefix-map=bad
-fmacro-prefix-map=bad
-ffile-prefix-map=bad
FWIW, GCC emits two errors for `-ffile-prefix-map=bad`.
Another edge case is `-ffile-prefix-map==foo/`, GCC currently uses this to prepend `foo/` to every path. Not sure if that is intentional, but that is the current behavior (one which is also replicated by this patch I believe).
Could you also mark review comments that are completed as "done"? It should make the diff easier to read (I hope) :)
================
Comment at: include/clang/Basic/DiagnosticDriverKinds.td:118
"invalid deployment target for -stdlib=libc++ (requires %0 or later)">;
-def err_drv_invalid_argument_to_fdebug_prefix_map : Error<
- "invalid argument '%0' to -fdebug-prefix-map">;
+def err_drv_invalid_argument_to_prefix_map : Error<
+ "invalid argument '%1' to -%0">;
----------------
Maybe rename `_to_prefix_map` to `_to_option`? (And maybe swap the order of parameters so `%0` comes before `%1`?)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D49466/new/
https://reviews.llvm.org/D49466
More information about the cfe-commits
mailing list