Commit Graph

17 Commits

Author SHA1 Message Date
Ted Kremenek c54dc9515d Turn 'SecuritySyntaxChecker' into a "meta" security checker for insecure APIs. Now
multiple checks are exposed as separate checkers, but CheckerManager only creates
one Checker object.

llvm-svn: 148525
2012-01-20 01:44:29 +00:00
Ted Kremenek 81ce1c8a99 Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses.
llvm-svn: 142782
2011-10-24 01:32:45 +00:00
Benjamin Kramer b89514a9b8 Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.

llvm-svn: 141971
2011-10-14 18:45:37 +00:00
Anna Zaks fedf5dfc71 [analyzer] Warn about the use of insecure, deprecated vfork() function PR11053 (http://llvm.org/bugs/show_bug.cgi?id=11053).
A patch by Graham Lee!

llvm-svn: 141643
2011-10-11 04:34:54 +00:00
Anna Zaks c29bed3989 [analyzer] Refactor PathDiagnosticLocation: Make 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
2011-09-20 21:38:35 +00:00
Douglas Gregor e8bbc12152 Extend the ASTContext constructor to delay the initialization of
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
2011-09-02 00:18:52 +00:00
Ted Kremenek 417d566775 Remove dead code.
llvm-svn: 138183
2011-08-20 01:15:28 +00:00
Chris Lattner 0e62c1cc0b remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.

llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Lenny Maiorani de909e4946 Add security syntax checker for strcat() which causes the Static Analyzer to 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
2011-04-05 20:18:46 +00:00
Lenny Maiorani fca2e9618a Refactoring the security checker a little bit so that each CallExpr check 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
2011-04-03 05:07:11 +00:00
Lenny Maiorani 6ffe738f24 Add security syntax checker for strcpy() which causes the Static Analyzer to 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
2011-03-31 22:09:14 +00:00
Lenny Maiorani 70568c2be7 Fix spelling in a comment. (test commit)
llvm-svn: 128670
2011-03-31 21:26:55 +00:00
Argyrios Kyrtzidis 6a5674ffa6 [analyzer] Rename CheckerV2 -> Checker.
llvm-svn: 126726
2011-03-01 01:16:21 +00:00
Argyrios Kyrtzidis af45aca670 [analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:
DeadStoresChecker
  ObjCMethSigsChecker
  ObjCUnusedIvarsChecker
  SizeofPointerChecker
  ObjCDeallocChecker
  SecuritySyntaxChecker

llvm-svn: 125779
2011-02-17 21:39:33 +00:00
Ted Kremenek f8cbac4b91 Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'.
This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries.

llvm-svn: 125251
2011-02-10 01:03:03 +00:00
Douglas Gregor 45e84b0053 NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch from
Joerg Sonnenberger!

llvm-svn: 123669
2011-01-17 19:16:24 +00:00
Ted Kremenek d99bd55a5e Chris Lattner has strong opinions about directory
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
2010-12-23 19:38:26 +00:00