[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-28 Thread Tom Hughes via Phabricator via cfe-commits
tomhughes added a comment. More context: https://issuetracker.google.com/254916723 I take back my earlier comment about it applying for both C and C++. Checking locally I see the behavior @MaskRay describes: `_GNU_SOURCE` not defined: gcc -E -dD -o empty empty.c `_GNU_SOURCE` defined: g+

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-25 Thread Tom Hughes via Phabricator via cfe-commits
tomhughes added inline comments. Comment at: clang/lib/Basic/Targets/ARM.cpp:697-698 Builder.defineMacro("__ELF__"); +if (Opts.CPlusPlus) + Builder.defineMacro("_GNU_SOURCE"); + } I think this should apply to both C and C++ Repository: rG LLVM

[PATCH] D76169: [WIP][AST] Allow ExprConstant to evaluate structs in C.

2021-10-19 Thread Tom Hughes via Phabricator via cfe-commits
tomhughes added a comment. I took the tests from https://reviews.llvm.org/D76096 and combined it with this change. As mentioned in the last comment 606a734755d1fb6c35a17680d0c251f834b79334 causes conflicts, so I tried apply

[PATCH] D76096: [clang] allow const structs to be constant expressions in initializer lists

2021-10-04 Thread Tom Hughes via Phabricator via cfe-commits
tomhughes added a comment. I'm hitting this in the codebase that I'm working on as well. What are the next steps (besides reformatting)? It's not completely clear to me from the comments. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096