[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    [cfe-dev] : Clang Static Code Analyzer does not report 'Switch' Statement as a branch condition.
From:       Prashant Purohit <Prashant.Purohit () kpit ! com>
Date:       2013-11-28 13:04:32
Message-ID: 1578c52f5b5245e2975beb6cd701c2f1 () SINPR03MB025 ! apcprd03 ! prod ! outlook ! com
[Download RAW message or body]

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) whic=
h 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 an=
d 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, o=
r use this message or any part thereof. If you receive this message in erro=
r, please notify the sender immediately and delete all copies of this messa=
ge. KPIT Technologies Ltd. does not accept any liability for virus infected=
 mails.

[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
	{font-family:Mangal}
@font-face
	{font-family:Mangal}
@font-face
	{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline}
span.EmailStyle17
	{font-family:"Calibri","sans-serif";
	color:windowtext}
.MsoChpDefault
	{font-family:"Calibri","sans-serif"}
@page WordSection1
	{margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
	{}
-->
</style>
</head>
<body lang="EN-IN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi all,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I am new to Clang \
Static Code analyzer internals.</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">&nbsp;</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">Currently, I am trying to get all the branch conditions in a \
function using &#8216;check::BranchCondition&#8217; call back function.</span></p> <p \
class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I am successful in \
detecting all the branch conditions like if, while, do..while, for and ternary \
operator condition except switch condition.</span></p> <p class="MsoNormal"><span \
lang="EN-US" style="color:#1F497D">&nbsp;</span></p> <p class="MsoNormal"><span \
lang="EN-US" style="color:#1F497D">I have checked this with already existing checks \
(e.g.- DumpTraversal) which uses &#8216;check::BranchCondition&#8217; call back \
function, these checks</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">also do not detect &#8216;switch&#8217; statements.</span></p> \
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">&nbsp;</span></p> <p \
class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Kindly help me in getting \
switch statements using &#8216;check::BranchCondition&#8217; call back \
function.</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">&nbsp;</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">Thanks,</span></p> <p class="MsoNormal"><span lang="EN-US" \
style="color:#1F497D">Prashant S. Purohit</span></p> </div>
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.
</body>
</html>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

--===============2641876358875845550==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic