[PATCH] D81958: [clangd] Add library to semantically strip flags by name.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 12:39:56 PDT 2020


sammccall created this revision.
sammccall added reviewers: adamcz, hokein.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

This is designed for tweaking compile commands by specifying flags to add/remove
in a config file. Something like:

  CompileFlags: { Remove: -fcolor-diagnostics }

Having users tweak raw argv (e.g. with a regex) is going to end in tears: bugs
around clang-cl, xclang, aliases, joined-vs-separate args etc are inevitable.

This isn't in tooling because of the performance choices: build a big table
up-front to make subsequent actions fast. Maybe it should be though.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81958

Files:
  clang-tools-extra/clangd/CompileCommands.cpp
  clang-tools-extra/clangd/CompileCommands.h
  clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81958.271166.patch
Type: text/x-patch
Size: 15991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200616/eda18f0b/attachment-0001.bin>


More information about the cfe-commits mailing list