[PATCH] D150966: [clang] Don't define predefined macros multiple times

John Brawn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 08:52:11 PDT 2023


john.brawn added a comment.

In D150966#4356403 <https://reviews.llvm.org/D150966#4356403>, @barannikov88 wrote:

> Is it possible/worth to add an assertion to Builder.defineMacro to enforce this one definition rule?

It just appends a string to a raw_ostream, so it's not possible to check what's previously been written.

In D150966#4356470 <https://reviews.llvm.org/D150966#4356470>, @barannikov88 wrote:

> Q: What is it the -Wsystem-header can warn about? I mean, no system header is included by the test, what can go wrong?

The <built-in> buffer is treated as a system header. I've expanded on the comment to explain this more.


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

https://reviews.llvm.org/D150966



More information about the cfe-commits mailing list