erichkeane added a comment.

In D114425#3225892 <https://reviews.llvm.org/D114425#3225892>, @craig.topper 
wrote:

> I kind of wonder if we should detect the __int128 type being requested in 
> ASTContext::GetBuiltinType and return an error up to 
> Sema::LazilyCreateBuiltin. Probably requires a new error code and handling 
> for it in LazilyCreateBuiltin. I assume that would catch the bad builtin 
> earlier. As it stands now we'd still allow it if it constant folds away in 
> ExprConstant.cpp so that it never reaches CGBuiltin.cpp. But I'm not a 
> frontend expert. Adding more potential reviewers

I think I like that idea, "DecodeTypeFromStr" should probably test if __int128 
is supported.  Having us only diagnose in codegen is the wrong approach here, 
we need to reject it in Sema.

I would also want to see some IR-tests to show how this looks in IR, 
particularly one where it takes an __int128 as parameter (plus others that show 
the return value is valid?).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114425

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

Reply via email to