[PATCH] D122325: [Clang][NeonEmitter] emit ret decl first for -Wdeclaration-after-statement

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 09:29:13 PDT 2022


nickdesaulniers created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The generated arm_neon.h header isn't -Wdeclaration-after-statement
compliant when targeting -mbig-endian. Update the generator to declare
the return value, if any, first before any other arguments that might
need to be "reversed" from little endian to big.

Another approach would have been to try to ignore this warning in system
headers, though that might not be precise for tokens involved in macro
expansion. See also: https://reviews.llvm.org/D116833#3236209.

Link: https://github.com/ClangBuiltLinux/linux/issues/1603
Fixes: https://github.com/llvm/llvm-project/issues/54062


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122325

Files:
  clang/test/CodeGen/aarch64-neon-ldst-one.c
  clang/test/CodeGen/arm_neon_intrinsics.c
  clang/test/Sema/arm-neon-decl-after-stmt.c
  clang/utils/TableGen/NeonEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122325.417660.patch
Type: text/x-patch
Size: 96953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220323/9cb3046b/attachment-0001.bin>


More information about the cfe-commits mailing list