[PATCH] D125172: [clangd] Disable predefined macros in tests. NFC

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 02:08:07 PDT 2022


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: clang-tools-extra/clangd/unittests/TestTU.cpp:44
+  // In tests, we don't need predefined macros (__GNUC__, __CHAR_BIT__) etc.
+  // There are hundreds, and we'd generate, parse, serialize, and re-parse them!
+  Argv = {"clang", "-Xclang", "-undef"};
----------------
NIT: maybe mention that not doing this actually saves a big fraction of test time. It might not be obvious that this type of work is **that** expensive even for hundreds of predefined macros.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125172/new/

https://reviews.llvm.org/D125172



More information about the cfe-commits mailing list