summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-2/+2
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Silence static analyzer issue by documenting that in this contextTed Kremenek2012-10-121-0/+1
| | | | | | | that a DeclRefExpr can never return a null decl. We possibly should hoist this into getDecl() itself. llvm-svn: 165841
* clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman2012-08-081-0/+1
| | | | llvm-svn: 161546
* Revert "Tweak insecureAPI analyzer checks to have the ability to be ↵Ted Kremenek2012-06-291-2/+8
| | | | | | | | individually disabled." Jordan Rose corrected me that this actually isn't needed. llvm-svn: 159462
* Tweak insecureAPI analyzer checks to have the ability to be individually ↵Ted Kremenek2012-06-291-8/+2
| | | | | | | | | | | | disabled. The solution is a bit inefficient: it creates N checkers, one for each check, and each check does a dispatch on the function name. This is redundant, but we can fix this once we have the proper ability to enable/disable subchecks. Fixes <rdar://problem/11780180>. llvm-svn: 159459
* Include the "issue context" (e.g. function or method) where a static ↵Ted Kremenek2012-04-041-21/+33
| | | | | | | | analyzer issue occurred in the plist output. Fixes <rdar://problem/11004527> llvm-svn: 154030
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-6/+6
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* [analyzer] Change the warning to suggest 'strlcat/strlcpy' asAnna Zaks2012-01-311-2/+2
| | | | | | replacements for 'starcat/strcpy' instead of 'strncat/strncpy'. llvm-svn: 149406
* Implement checker that looks for calls to mktemps and friends that have ↵Ted Kremenek2012-01-201-3/+101
| | | | | | fewer than 6 Xs. Implements <rdar://problem/6336672>. llvm-svn: 148531
* Turn 'SecuritySyntaxChecker' into a "meta" security checker for insecure ↵Ted Kremenek2012-01-201-6/+59
| | | | | | | | | APIs. Now multiple checks are exposed as separate checkers, but CheckerManager only creates one Checker object. llvm-svn: 148525
* Rename AnalysisContext to AnalysisDeclContext. Not only is this name more ↵Ted Kremenek2011-10-241-3/+3
| | | | | | accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-5/+5
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* [analyzer] Warn about the use of insecure, deprecated vfork() function ↵Anna Zaks2011-10-111-0/+22
| | | | | | | | PR11053 (http://llvm.org/bugs/show_bug.cgi?id=11053). A patch by Graham Lee! llvm-svn: 141643
* [analyzer] Refactor PathDiagnosticLocation: Make ↵Anna Zaks2011-09-201-15/+38
| | | | | | | | PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) llvm-svn: 140182
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Remove dead code.Ted Kremenek2011-08-201-12/+0
| | | | llvm-svn: 138183
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add security syntax checker for strcat() which causes the Static Analyzer to ↵Lenny Maiorani2011-04-051-57/+91
| | | | | | | | generate a warning any time the strcat() function is used with a note suggesting to use a function which provides bounded buffers. CWE-119. Also, brings the security syntax checker more inline with coding standards. llvm-svn: 128916
* Refactoring the security checker a little bit so that each CallExpr check ↵Lenny Maiorani2011-04-031-60/+44
| | | | | | doesn't get called for each CallExpr. Instead it does a switch and only runs the check for the proper identifier. Slight speed improvement (probably significant on very large ASTs), and should make it easier and more clear to add more checks for other CallExpr's later. llvm-svn: 128785
* Add security syntax checker for strcpy() which causes the Static Analyzer to ↵Lenny Maiorani2011-03-311-0/+54
| | | | | | generate a warning any time the strcpy() function is used with a note suggesting to use a function which provides bounded buffers. llvm-svn: 128679
* Fix spelling in a comment. (test commit)Lenny Maiorani2011-03-311-1/+1
| | | | llvm-svn: 128670
* [analyzer] Rename CheckerV2 -> Checker.Argyrios Kyrtzidis2011-03-011-2/+2
| | | | llvm-svn: 126726
* [analyzer] Use the new registration mechanism on the ↵Argyrios Kyrtzidis2011-02-171-6/+17
| | | | | | | | | | | | | non-path-sensitive-checkers: DeadStoresChecker ObjCMethSigsChecker ObjCUnusedIvarsChecker SizeofPointerChecker ObjCDeallocChecker SecuritySyntaxChecker llvm-svn: 125779
* Split 'include/clang/StaticAnalyzer' into ↵Ted Kremenek2011-02-101-1/+1
| | | | | | | | 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries. llvm-svn: 125251
* NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch fromDouglas Gregor2011-01-171-1/+4
| | | | | | Joerg Sonnenberger! llvm-svn: 123669
* Chris Lattner has strong opinions about directoryTed Kremenek2010-12-231-0/+503
layout. :) Rename the 'EntoSA' directories to 'StaticAnalyzer'. Internally we will still use the 'ento' namespace for the analyzer engine (unless there are further sabre rattlings...). llvm-svn: 122514
OpenPOWER on IntegriCloud