hliao added a comment.

just explain what's the issue is and hope that help reviewers to get this fix 
quick.

- In `Sema::DiagnoseAlwaysNonNullPointer`, we issue warnings if a `nonnull` 
parameter is used in null checking. It need the function declaration to check 
parameter attributes. That usually works but fails if that function decl is not 
ready yet.
- In template instantiation, we first create the function prototype followed by 
instantiating the function body. When the function prototype is being formed, 
we may create binary or other expressions  for semantic checking. But, in that 
phase, i.e. `Sema::SubstFunctionDeclType`, we don't have the a fully 
specialized function prototype yet to check the parameter number and run into 
the assertion @ line 11596.

Hope that help to get the picture of this fix. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59900



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

Reply via email to