aboutsummaryrefslogtreecommitdiff
path: root/libgrust/rustc-lib/stdarch/crates/assert-instr-macro/build.rs
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2025-11-03 21:42:59 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2025-11-03 21:42:59 -0500
commit0a2c4b6dd2019d144df49227fce950e10ae62b09 (patch)
tree25ce7d32abbc93550946629bf48775b0145b9431 /libgrust/rustc-lib/stdarch/crates/assert-instr-macro/build.rs
parentdf2c1f7c6ba30d4fdb0b06661dbcb764538d5aff (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
analyzer: add event kinds for special control flow [PR122544]HEADtrunkmaster
The SARIF 3.38.8 "kinds" property has some verbs for expressing control flow, but is missing some of the awkward special cases. The spec says "If none of these values are appropriate, a SARIF producer MAY use any value." This patch adds the following new values: * "throw" for throwing an exception * "catch" for catching an exception * "unwind" for unwinding stack frame(s) during exception-handling * "setjmp" for calls to setjmp * "longjmp" for calls to longjmp that rewind the program counter/stack to the location of a previous setjmp call gcc/analyzer/ChangeLog: PR analyzer/122544 * checker-event.cc (catch_cfg_edge_event::get_meaning): New. (setjmp_event::get_meaning): New. (rewind_event::get_meaning): New. (throw_event::get_meaning): New. (unwind_event::get_meaning): New. * checker-event.h (catch_cfg_edge_event::get_meaning): New decl. (setjmp_event::get_meaning): New decl. (rewind_event::get_meaning): New decl. (throw_event::get_meaning): New decl. (unwind_event::get_meaning): New decl. gcc/ChangeLog: PR analyzer/122544 * diagnostics/paths.cc (event::meaning::maybe_get_verb_str): Handle the new verbs. * diagnostics/paths.h (event::meaning::verb): Add new values for special control flow operations. (event::meaning::meaning): Add ctor taking just a verb. gcc/testsuite/ChangeLog: PR analyzer/122544 * g++.dg/analyzer/exception-path-1-sarif.py: New test script. * g++.dg/analyzer/exception-path-1.C: Add SARIF output, and use the above to check it. * g++.dg/analyzer/exception-path-unwind-multiple-2-sarif.py: New test script. * g++.dg/analyzer/exception-path-unwind-multiple-2.C: Add SARIF output, and use the above to check it. * gcc.dg/analyzer/setjmp-3-sarif.py: New test script. * gcc.dg/analyzer/setjmp-3.c: Add SARIF output, and use the above to check it. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libgrust/rustc-lib/stdarch/crates/assert-instr-macro/build.rs')
0 files changed, 0 insertions, 0 deletions