File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ bool CallOrObjCMessage::hasNonZeroCallbackArg() const {
139
139
FD = Ctor->getConstructor ();
140
140
141
141
const CallExpr * CE = CallE.get <const CallExpr *>();
142
- FD = dyn_cast <FunctionDecl>(CE->getCalleeDecl ());
142
+ FD = dyn_cast_or_null <FunctionDecl>(CE->getCalleeDecl ());
143
143
144
144
// If calling using a function pointer, assume the function does not
145
145
// have a callback. TODO: We could check the types of the arguments here.
Original file line number Diff line number Diff line change @@ -829,6 +829,12 @@ void r11160612_6(StWithCallback St) {
829
829
dealocateMemWhenDoneByRef (& St , x );
830
830
}
831
831
832
+ int mySub (int , int );
833
+ int myAdd (int , int );
834
+ int fPtr (unsigned cond , int x ) {
835
+ return (cond ? mySub : myAdd )(x , x );
836
+ }
837
+
832
838
// ----------------------------------------------------------------------------
833
839
// Below are the known false positives.
834
840
You can’t perform that action at this time.
0 commit comments