Attention is currently required from: Julius Werner. Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57009 )
Change subject: tests: Fix function mocking for clang ......................................................................
Patch Set 1:
(1 comment)
File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/57009/comment/f165386b_4caae9c9 PS1, Line 60: TEST_CFLAGS += $(if $(filter clang,$(shell $(HOSTCC) --version)),,-Werror) In the llvm-project at clang/lib/Sema/Sema.cpp:1167 [1] there is a check that generates those warnings. We could add a new diagnostic flag e.g. "-Wno-weak-identifier-undeclared" and add check:
if (!Diags.isIgnored(diag::warn_weak_identifier_undeclared, SourceLocation())) Diag(WeakID.second.getLocation(), diag::warn_weak_identifier_undeclared) << WeakID.first;
Next we would have to add commandline flag for it to: lang/include/clang/Basic/DiagnosticGroups.td:
def WarnWeakIdentifierUndeclared : DiagGroup<"warn_weak_identifier_undeclared">
clang/include/clang/Basic/DiagnosticSemaKinds.td:
def warn_weak_identifier_undeclared : Warning< "weak identifier %0 never declared">, InGroup<WarnWeakIdentifierUndeclared>;
Probably there will also be a need for new tests or updates of old ones. I am sure, we have to remove warn_weak_identifier_undeclared from clang/test/Misc/warning-flags.c
[1] https://github.com/llvm/llvm-project/blob/acc58504952f0e2ca48a44d868f684e3b1...