Files
codeql/cpp/ql/test/library-tests/conversions/conversions.ql
Jonas Jensen 85df60ea65 C++: Replace import default with import cpp
Some tests still used the old name for the top-level library.
2020-05-25 19:07:28 +02:00

18 lines
447 B
Plaintext

import cpp
string getValueCategoryString(Expr expr) {
if expr.isLValueCategory()
then result = "lval"
else
if expr.isXValueCategory()
then result = "xval"
else
if expr.hasLValueToRValueConversion()
then result = "prval(load)"
else result = "prval"
}
from Cast cast
select cast, cast.getSemanticConversionString(), getValueCategoryString(cast),
cast.getType().toString(), cast.getExpr().getType().toString()