14 lines · c
1// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-output text -verify %s 2 3void clang_analyzer_warnIfReached(void);4 5// https://github.com/llvm/llvm-project/issues/891856void binding_to_label_loc() {7 char *b = &&MyLabel; // expected-note {{'b' initialized here}}8MyLabel:9 *b = 0;10 // expected-warning@-1 {{Dereference of the address of a label}}11 // expected-note@-2 {{Dereference of the address of a label}}12 clang_analyzer_warnIfReached(); // no-warning: Unreachable due to fatal error.13}14