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

2022-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think it is excessive to add so many RUN lines. I do not understand much about AVR -mcpu. That said, I created D122553 for what I think should be done for the `-c/-S/-fsyntax-only` condition. More tests would just be excessive. CHA

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

2022-03-27 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 418481. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122524/new/ https://reviews.llvm.org/D122524 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index: clang/test/Driver/avr-toolchain.c ==

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

2022-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:379 !Args.hasArg(options::OPT_nodefaultlibs) && + !Args.hasArg(options::OPT_S) && !Args.hasArg(options::OPT_c /* does not apply when not linking */)) { This is insuf

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

2022-03-27 Thread Fangrui Song via Phabricator via cfe-commits
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 comm