NoQ added a comment.

Oh, i see what you did here. I thought you're evaluating the argument, but 
you're evaluating the whole builtin function call. In this case you don't need 
the else-branch: `EvaluateAsInt` will always succeed. Moreover, you can merge 
your code with the `BI__builtin_object_size` case, which is also fully 
evaluated at compile-time.

Actually, maybe we should use that approach to evaluate more builtin functions, 
and all C++ //constexpr// function calls as well, in the engine or in a 
checker. It would be a nice thing to tackle eventually.


https://reviews.llvm.org/D42745



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

Reply via email to