[cfe-dev] : Clang Static Code Analyzer does not report 'Switch' Statement as a branch condition.

Prashant Purohit Prashant.Purohit at kpit.com
Thu Nov 28 05:04:32 PST 2013


Hi all,

I am new to Clang Static Code analyzer internals.

Currently, I am trying to get all the branch conditions in a function using 'check::BranchCondition' call back function.
I am successful in detecting all the branch conditions like if, while, do..while, for and ternary operator condition except switch condition.

I have checked this with already existing checks (e.g.- DumpTraversal) which uses 'check::BranchCondition' call back function, these checks
also do not detect 'switch' statements.

Kindly help me in getting switch statements using 'check::BranchCondition' call back function.

Thanks,
Prashant S. Purohit
This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131128/2fac0865/attachment.html>


More information about the cfe-dev mailing list