martong added a comment.

In D77641#1969291 <https://reviews.llvm.org/D77641#1969291>, @Szelethus wrote:

> I suspect your change made compiler errors a bit nicer as well, so you don't 
> get one giant "Well, this huuuuuge single argument doesn't match any of the 
> assignment operators".


The reason why I added `addToFunctionSummaryMap` calls is because we have to do 
a lookup and based on the lookup result we either map the summary or not. (I 
did not have any problems with the compiler diagnostics regarding the 
initializer list.)

> We don't have any function names that have multiple summaries just yet, 
> correct?

No, we already have a few: e.g. `read`, `write`. The reason is that we may not 
know what is the real type of `ssize_t` in different platforms, so rather we 
add `int`, `long` and `long long` return type variants. (An alternative 
solution could be to support lookup for types as well, so we'd lookup `ssize_t` 
in this case.)

> Also, this change is NFC, right? Could you make a tag about that to the 
> revision title in the future?

Well, there are functional changes. We exercise the lookup mechanism that we 
had not done before. We do not add a summary to the map if we cannot lookup the 
matching prototype. This could lead to different behavior in some cases, hard 
to find one, but at least in CTU if the ASTImporter assembled an AST where the 
Decls are not added properly to their DeclContext, then lookup would not find a 
function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77641



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

Reply via email to