[PATCH] D48266: [Driver] Add -fno-digraphs

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 18 13:30:46 PDT 2018


rsmith added inline comments.


================
Comment at: lib/Driver/ToolChains/Clang.cpp:3973
   Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
+  Args.AddLastArg(CmdArgs, options::OPT_fdigraphs, options::OPT_fno_digraphs);
   Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names);
----------------
Use `Args.hasFlag` to determine if `-fdigraphs` or `-fno-digraphs` was specified last, then `CmdArgs.push_back("-fno-digraphs")` if digraphs are disabled. (There are lots of examples of that in this file that you can follow.)

What should `-fdigraphs` do under `-std=c89`? I think produing a "this flag is not compatible with that flag" diagnostic would make sense for that case.


Repository:
  rC Clang

https://reviews.llvm.org/D48266





More information about the cfe-commits mailing list