martinboehme wrote:

> Is this the right place to add this check? It doesn't seem like there's any 
> C++-specific logic here.
> 
> Presumably the real incompatibility is `clang::CFG` or one of the consumers 
> of `dataflow::ControlFlowContext`?

Much of the logic in the dataflow framework assumes that the AST comes from a 
C++ compilation. For example, the code in Transfer.cpp makes a lot of 
assumptions around this, but other places do too.

`ControlFlowContext::build()` is a good central place to check whether the 
language is C++ and abort with a meaningful error message if it isn't.



https://github.com/llvm/llvm-project/pull/65301
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to