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

Sergei Barannikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 07:47:17 PDT 2023


barannikov88 added a comment.

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



================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1305
+    Builder.defineMacro("__ELF__");
+  }
+
----------------
Redundant braces.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150966



More information about the cfe-commits mailing list