[all-commits] [llvm/llvm-project] 8eb8c9: [clangd] Add library to semantically strip flags b...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Jul 14 06:44:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eb8c92eb46908ee9c64dfc4a2f49501b085f682
      https://github.com/llvm/llvm-project/commit/8eb8c92eb46908ee9c64dfc4a2f49501b085f682
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M clang-tools-extra/clangd/CompileCommands.cpp
    M clang-tools-extra/clangd/CompileCommands.h
    M clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp

  Log Message:
  -----------
  [clangd] Add library to semantically strip flags by name.

Summary:
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.

Reviewers: adamcz, hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81958




More information about the All-commits mailing list