[PATCH] D67606: Change signature of __builtin_rotateright64 back to unsigned

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 01:29:55 PDT 2019


hans added a comment.

A simpler way to test this might be to check for conversion warnings in the existing clang/test/CodeGen/avr-builtins.c test, for example like as above. I think that's better since it covers more of the signatures, e.g. the rotateleft ones too.

  diff --git a/clang/test/CodeGen/avr-builtins.c b/clang/test/CodeGen/avr-builtins.c
  index cbba6b2f2a2..0d9ce91ad69 100644
  --- a/clang/test/CodeGen/avr-builtins.c
  +++ b/clang/test/CodeGen/avr-builtins.c
  @@ -1,5 +1,9 @@
   // RUN: %clang_cc1 -triple avr-unknown-unknown -emit-llvm -o - %s | FileCheck %s
   
  +// Check that the parameter types match.
  +// RUN: %clang_cc1 -triple avr-unknown-unknown -Wconversion -verify %s
  +// expected-no-diagnostics
  +
   unsigned char bitrev8(unsigned char data) {
       return __builtin_bitreverse8(data);
   }


Repository:
  rC Clang

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

https://reviews.llvm.org/D67606





More information about the cfe-commits mailing list