[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/new/

https://reviews.llvm.org/D76096

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[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 Github Monorepo

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

https://reviews.llvm.org/D136712

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[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++ -E -dD -o empty empty.c

I'm just looking for compatibility with `gcc`/`g++` behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136712

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[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 applying it to the commit just prior 
(f2efb5742cc9f74ad73987760651e3d23894a416 
). When 
running `ninja clang-test`, the following tests fail:

  Failed Tests (8):
Clang :: CodeGen/2009-06-14-anonymous-union-init.c
Clang :: CodeGen/builtin-constant-p.c
Clang :: CodeGen/pascal-string.c
Clang :: CodeGenCXX/arm-swiftcall.cpp
Clang :: Sema/array-init.c
Clang :: Sema/builtins.c
Clang :: Sema/const-eval.c
Clang :: Sema/init.c


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76169

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits