martong added a comment.

Hmm, seems like the conflicting prototype (i.e. the obsolescent use of zero 
parameters) is needed to reproduce the assertion failure. That makes me wonder, 
how does the redecl chain of `b` looks like? Is `void b()` chained with `void 
b(int*)`, or are they represented independently from each other? I guess they 
form the same redecl chain. Which drives us to the next questions.
When the analyzer reaches the CallExpr `b(&buffer)` which FunctionDecl does it 
see? Is it `b()` or `b(int*)`? My bet, it sees and works with `b()`. Could we 
detect if the arguments of the CallExpr does not match the parameters of the 
FunctionDecl? And if that is the case, could we iterate through the redecl 
chain to find an appropriate matching FunctionDecl? That would be `b(int*)` in 
this case ... and the original `bindArray()` should work then.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136162/new/

https://reviews.llvm.org/D136162

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to