This is an archive of the discontinued LLVM Phabricator instance.

[Clang][NeonEmitter] emit ret decl first for -Wdeclaration-after-statement
AbandonedPublic

Authored by nickdesaulniers on Mar 23 2022, 9:29 AM.

Details

Reviewers
None
Summary

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

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 9:29 AM
nickdesaulniers requested review of this revision.Mar 23 2022, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 9:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript