[cfe-dev] Check builtin function possible immediate argument

Vedant Kumar via cfe-dev cfe-dev at lists.llvm.org
Wed May 24 10:23:49 PDT 2017


Hi,

Does Expr::isIntegerConstantExpr fit your need?

vedant

> On May 24, 2017, at 4:40 AM, 陳韋任 via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi All,
> 
>   I have builtin functions whose argument could be variable or immediate (constant), and I would like to
> check the range of argument if it's immediate. Sema::SemaBuiltinConstantArgRange [1] more or less
> fits my need. But seems it requires the argument must be immediate, it will throw "argument must be
> constant" otherwise.
> 
>   I am wondering if there is other function achieve my goal, or my understanding about SemaBuiltinConstantArgRange
> is wrong. Thanks.
> 
> [1] https://clang.llvm.org/doxygen/SemaChecking_8cpp_source.html <https://clang.llvm.org/doxygen/SemaChecking_8cpp_source.html>
> 
> Regards,
> chenwj
> 
> -- 
> Wei-Ren Chen (陳韋任)
> Homepage: https://people.cs.nctu.edu.tw/~chenwj <https://people.cs.nctu.edu.tw/~chenwj>_______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170524/f95334d2/attachment.html>


More information about the cfe-dev mailing list