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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to