Files
codeql/cpp/ql/test/library-tests/string_analysis/StringAnalysis.ql
2019-05-20 15:08:28 +01:00

15 lines
301 B
Plaintext

/**
* @name StringAnalysis
* @kind table
*/
import cpp
from AnalysedString s, string str
where
if s.(StringLiteral).getUnspecifiedType().(DerivedType).getBaseType() instanceof Wchar_t then (
str = "[?]"
) else (
str = s.toString()
)
select s.getLocation().toString(), str, s.getMaxLength()