[cfe-dev] Clang: Suppress static analysis of system header files

Sujit Kamthe Sujit.Kamthe at kpitcummins.com
Fri Sep 28 00:31:25 PDT 2012

Hi Anna,
I want to suppress warnings for all the system header files which are referred e.g. stdio.h
It will be better if we have a flag to specify  system header files in include path and all the files specified by this flag should be ignored.

e.g. clang --analyze  -systemIncludes "C:\Program Files\Microsoft Visual Studio 10.0\VC\include" -I "<Normal Headers>" test.c
Here include files specified by SystemIncludes flag can be ignored from generating static analysis warnings if it is being referred in some source file but warnings will be generated for files which are specified using -I flag

Sujit Kamthe
BuildBox|KPITCummins Infosystems Ltd|Extn:3102 |Mobile:7709076120

From: Anna Zaks [mailto:ganna at apple.com]
Sent: Friday, September 28, 2012 12:33 PM
To: Sujit Kamthe
Cc: Clang Developers; Jordan Rose; Ted Kremenek
Subject: Re: [cfe-dev] Clang: Suppress static analysis of system header files

Hi Sujit,

Currently there is no such option. Since the static analyzer performs path sensitive checking, the underlining reason for an analyzer warning may not be at the line/file where the error is reported.

What is your use case for suppressing warnings in system/specified headers? Is there a particular warning you are trying to suppress?


On Sep 27, 2012, at 5:14 AM, Sujit Kamthe wrote:

Is there any flag or option which suppresses static analyzer warnings for system or specified header files.

Sujit Kamthe

Productivity & FE | Automotive and Engineering SBU | KPITCummins Infosystems Ltd|Board: +91 20 66525000 | Extn:3102 |Mobile:7709076120

This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems 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 Cummins Infosystems Ltd. does not accept any liability for virus infected mails. _______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu<mailto:cfe-dev at cs.uiuc.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120928/85b811c9/attachment.html>

More information about the cfe-dev mailing list