[PATCH] D122524: [clang][AVR] Generate link warnings properly

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 27 10:37:56 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/Driver/avr-toolchain.c:39
+
+// RUN: %clang %s -### -target avr --sysroot %S/Inputs/basic_avr_tree -mmcu=atmega328 2>&1 | FileCheck --check-prefix=CHECK5 %s
+// CHECK5-NOT: warning: no target microcontroller specified on command line, cannot link standard libraries
----------------
`-target ` is legacy spelling. Better use `--target=` for new RUN lines.


================
Comment at: clang/test/Driver/avr-toolchain.c:40
+// RUN: %clang %s -### -target avr --sysroot %S/Inputs/basic_avr_tree -mmcu=atmega328 2>&1 | FileCheck --check-prefix=CHECK5 %s
+// CHECK5-NOT: warning: no target microcontroller specified on command line, cannot link standard libraries
+// CHECK5-NOT: warning: no avr-gcc installation can be found on the system, cannot link standard libraries
----------------
negative patterns easily go stale without being noticed.
Check whether you can just use `CHECK5-NOT: warning:` instead of specifying the full diagnostic.


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

https://reviews.llvm.org/D122524



More information about the cfe-commits mailing list