This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix an assertion fail in CStringSyntaxChecker
ClosedPublic

Authored by xazax.hun on Feb 1 2017, 2:35 AM.

Details

Summary

Right now CStringSytanxChecker assumes that the argument of a sizeof expression is an expression. The argument can also be a type. In this case an assertion fail will be triggered when the SubExpression is being queried. I fixed this issue and did other minor cleanups in the checker.

Diff Detail

Event Timeline

xazax.hun created this revision.Feb 1 2017, 2:35 AM
dcoughlin accepted this revision.Feb 1 2017, 2:39 PM

This looks good to me. Thanks for fixing this!

This revision is now accepted and ready to land.Feb 1 2017, 2:39 PM
This revision was automatically updated to reflect the committed changes.