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

David Spickett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 09:13:00 PDT 2022


DavidSpickett added a comment.

Can you post a bit of the header diff before/after? I think I know what it looks like but just to be sure.



================
Comment at: clang/test/Sema/arm-neon-decl-after-stmt.c:3
+// RUN:  -Wdeclaration-after-statement -fsyntax-only -verify %s
+// REQUIRES: aarch64-registered-target || arm-registered-target
+// https://github.com/llvm/llvm-project/issues/54062
----------------
Does `armebv7` work when you only have aarch64?

It probably does just by virtue of aarch64 not knowing what v7 is and defaulting to v8 but double check what happens there.

If the emitter is used for both arm and aarch64 then testing one would be acceptable. Since you can't really do an if has arm do this else in a lit test like this.


================
Comment at: clang/utils/TableGen/NeonEmitter.cpp:1855
     emitOpeningBrace();
+    emitReturnVarDecl();
     emitShadowedArgs();
----------------
Comment the reason for doing the return var first


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122189



More information about the cfe-commits mailing list