AaronBallman wrote:
Oof, sorry for this falling off my radar!
> To demonstrate the uncertain behaviour, let's take a testcase which @shafik
> suggested.
>
> When we track the value of *out pointer though the code, we could see that.
> ```
> #define F() 66
> int x = F; // This 'F' seems make the `*out` non-null
>
> void g(int);
>
> void f() {
> F + 1; // but this 'F' seems to have `*out` ptr null
> g(F); // this one makes the `*out` ptr non-null
> }
> ```
>
> Even though F shouldn't have a typocorrection, given the context.
Unfortunately, I'm not certain why you get that behavior. I think we'd have to
get into a debugger and really dig around to find out. I would have expected
all three uses of `F` there to make `*out` ptr non-null. The only distinction I
can think of is that the odd-man-out is a discarded value expression. But why
that should matter for typo correction is a mystery to me currently.
https://github.com/llvm/llvm-project/pull/123495
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits