isuckatcs added a comment.

Do we really want to split these two functions apart to different test files? 
Is this really NFC?

The way `ExceptionEscapeCheck` works is that it creates an `ExceptionAnalyzer` 
upon instantiation.

//By the way upon looking at the constructor of the check I see that 
std::bad_alloc is always ignored.
Maybe we want to turn this into an option, so that users can enable it if they 
want.//

`ExceptionAnalyzer` caches functions based on their `FunctionDecl *` in
`std::map<const FunctionDecl *, ExceptionInfo> FunctionCache;`.

The `FunctionDecl` lives in the AST of the translation unit, so the same 
function declaration in two
different translation units will have different `FunctionDecl *`s. //Maybe 
`ODRHash` would be more
suitable to be used as key in the map.//

By moving throwing functions into a different TU than non-throwing functions, I 
think the correctness
of the caching inside `ExceptionAnalyzer` no longer will be tested properly. 
Maybe this is something
we want to preserve.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148458

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

Reply via email to