[cfe-commits] r59956 - in /cfe/trunk: include/clang/Analysis/PathSensitive/SVals.h lib/Analysis/SVals.cpp
Ted Kremenek
kremenek at apple.com
Mon Nov 24 10:58:26 PST 2008
Hi Zhongxing,
Looks great. One thing we should start doing is better documenting
these utility methods with doxygen comments. We have a bunch of
variants now of methods like 'MakeVal', so it's probably worth
investing some time in providing some documentation as we add these
methods.
Ted
On Nov 24, 2008, at 1:38 AM, Zhongxing Xu wrote:
> Author: zhongxingxu
> Date: Mon Nov 24 03:38:21 2008
> New Revision: 59956
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59956&view=rev
> Log:
> Add utility methods.
>
> Modified:
> cfe/trunk/include/clang/Analysis/PathSensitive/SVals.h
> cfe/trunk/lib/Analysis/SVals.cpp
>
> Modified: cfe/trunk/include/clang/Analysis/PathSensitive/SVals.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/SVals.h?rev=59956&r1=59955&r2=59956&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Analysis/PathSensitive/SVals.h (original)
> +++ cfe/trunk/include/clang/Analysis/PathSensitive/SVals.h Mon Nov
> 24 03:38:21 2008
> @@ -174,12 +174,17 @@
> static NonLoc MakeVal(BasicValueFactory& BasicVals, unsigned X,
> bool isUnsigned);
>
> + static NonLoc MakeVal(BasicValueFactory& BasicVals, uint64_t X,
> + unsigned BitWidth, bool isUnsigned);
> +
> static NonLoc MakeVal(BasicValueFactory& BasicVals, uint64_t X,
> QualType T);
>
> static NonLoc MakeVal(BasicValueFactory& BasicVals,
> IntegerLiteral* I);
>
> static NonLoc MakeVal(BasicValueFactory& BasicVals, const
> llvm::APInt& I,
> bool isUnsigned);
> +
> + static NonLoc MakeVal(BasicValueFactory& BasicVals, const
> llvm::APSInt& I);
>
> static NonLoc MakeIntTruthVal(BasicValueFactory& BasicVals, bool b);
>
>
> Modified: cfe/trunk/lib/Analysis/SVals.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SVals.cpp?rev=59956&r1=59955&r2=59956&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Analysis/SVals.cpp (original)
> +++ cfe/trunk/lib/Analysis/SVals.cpp Mon Nov 24 03:38:21 2008
> @@ -248,6 +248,11 @@
> isUnsigned));
> }
>
> +NonLoc NonLoc::MakeVal(BasicValueFactory& BasicVals, uint64_t X,
> + unsigned BitWidth, bool isUnsigned) {
> + return nonloc::ConcreteInt(BasicVals.getValue(X, BitWidth,
> isUnsigned));
> +}
> +
> NonLoc NonLoc::MakeVal(BasicValueFactory& BasicVals, uint64_t X,
> QualType T) {
> return nonloc::ConcreteInt(BasicVals.getValue(X, T));
> }
> @@ -263,6 +268,10 @@
> return nonloc::ConcreteInt(BasicVals.getValue(I, isUnsigned));
> }
>
> +NonLoc NonLoc::MakeVal(BasicValueFactory& BasicVals, const
> llvm::APSInt& I) {
> + return nonloc::ConcreteInt(BasicVals.getValue(I));
> +}
> +
> NonLoc NonLoc::MakeIntTruthVal(BasicValueFactory& BasicVals, bool b) {
> return nonloc::ConcreteInt(BasicVals.getTruthValue(b));
> }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list