2 of them were missing the ":" on the end.
Adding them broke the test so I had to add a new prefix just for the
warning runs only.
I manually checked the first RUNs and there is no warning emitted, as
expected.
Commit 56b038f887f3("[BPF][clang] Ignore stack protector options for BPF
target") added a test for its corresponding functionality.
Douglas Yung found that the test will fail with the release build
buildbot due to different func argument patterns (from %msg
to %0). This patch fixed the issue by using pattern [0-9a-z]+
which allows both %msg and %0.
Stack protector builtin functions are not implemented for BPF target,
thus compiling programs with one of the following options would result
in an error:
-fstack-protector
-fstack-protector-all
-fstack-protector-strong
This commit adds logic to ignore these options for BPF target.
Searching through DiagnosticDriverKinds.td shows that all messages for
such kind of behavior are implemented as warnings, this commit follows
the suit.
Here is an example of the diagnostic message:
clang-16: warning: ignoring '-fstack-protector' option as it is not currently supported for target 'bpf' [-Woption-ignored]
Differential Revision: https://reviews.llvm.org/D142046