19 lines · cpp
1// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s \2// RUN: -analyze-function="Window::overloaded(int)"3 4// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s \5// RUN: -analyze-function="c:@S@Window@F@overloaded#I#"6 7// RUN: %clang_extdef_map %s | FileCheck %s8// CHECK-DAG: 27:c:@S@Window@F@overloaded#I#9// CHECK-DAG: 27:c:@S@Window@F@overloaded#C#10// CHECK-DAG: 27:c:@S@Window@F@overloaded#d#11 12void clang_analyzer_warnIfReached();13 14struct Window {15 void overloaded(double) { clang_analyzer_warnIfReached(); } // not analyzed, thus not reachable16 void overloaded(char) { clang_analyzer_warnIfReached(); } // not analyzed, thus not reachable17 void overloaded(int) { clang_analyzer_warnIfReached(); } // expected-warning {{REACHABLE}}18};19