[all-commits] [llvm/llvm-project] bf9921: [clangd] Disable predefined macros in tests. NFC

Sam McCall via All-commits all-commits at lists.llvm.org
Mon May 9 05:45:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf9921adb9304b90f21f087c1ea2ef178d9c57dd
      https://github.com/llvm/llvm-project/commit/bf9921adb9304b90f21f087c1ea2ef178d9c57dd
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-05-09 (Mon, 09 May 2022)

  Changed paths:
    M clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
    M clang-tools-extra/clangd/unittests/TestTU.cpp

  Log Message:
  -----------
  [clangd] Disable predefined macros in tests. NFC

These aren't needed. With them the generated predefines buffer is 13KB.
For every TestTU, we must:
 - generate the buffer (3 times: parsing preamble, scanning preamble, main file)
 - parse the buffer (again 3 times)
 - serialize all the macros it defines in the PCH
 - compress the buffer itself to write it into the PCH
 - decompress it from the PCH

Avoiding this reduces unit test time by ~25%.

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




More information about the All-commits mailing list