[all-commits] [llvm/llvm-project] 63e7af: [Clang][NeonEmitter] emit ret decl first for -Wdec...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Fri Apr 1 21:51:26 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 63e7af77ec42de9ac0b2fca6f7876b6b67c40050
      https://github.com/llvm/llvm-project/commit/63e7af77ec42de9ac0b2fca6f7876b6b67c40050
  Author: Nick Desaulniers <ndesaulniers at google.com>
  Date:   2022-04-01 (Fri, 01 Apr 2022)

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

  Log Message:
  -----------
  [Clang][NeonEmitter] emit ret decl first for -Wdeclaration-after-statement

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

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D122189

(cherry picked from commit 5a2e56b70e2fa7ad0d82e54bc4c741b16f05e475)




More information about the All-commits mailing list