[all-commits] [llvm/llvm-project] ea2c14: [clang][cli] Simplify repetitive macro invocations
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Wed Feb 8 14:54:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ea2c144e85c7a6c29104c059b4b08aa9f9221a32
https://github.com/llvm/llvm-project/commit/ea2c144e85c7a6c29104c059b4b08aa9f9221a32
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M clang/lib/Frontend/CompilerInvocation.cpp
Log Message:
-----------
[clang][cli] Simplify repetitive macro invocations
Since we now only support Visual Studio 2019 16.7 and newer, we're able to use the `/Zc:preprocessor` flag that turns on the standards-conforming preprocessor. It (among other things) correctly expands `__VA_ARGS__` (see https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170#macro-arguments-are-unpacked). This enables us to get rid of some repetitive boilerplate in Clang's command-line parser/generator.
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D135128
More information about the All-commits
mailing list