- Aug 23, 2011
-
-
Jordy Rose authored
[analyzer] Migrate the handling of retain-count-related RetEffects and ArgEffects from CFRefCount to RetainReleaseChecker. No intended functionality change. llvm-svn: 138309
-
Anna Zaks authored
[analyzer] MacOSKeychainAPIChecker: Users of KeyChain API often use free() to deallocate the password. Catch this error explicitly and generate the error message at the place where free() is called. llvm-svn: 138296
-
- Aug 22, 2011
-
-
Fariborz Jahanian authored
llvm-svn: 138276
-
Anna Zaks authored
Static Analyzer Diagnostics: Allow checkers to add ExtraDescriptiveText, now renamed into ExtraText, to the diagnostic without subclassing BugReport. llvm-svn: 138272
-
Fariborz Jahanian authored
objc's decl context. llvm-svn: 138267
-
Ted Kremenek authored
Do not perform check for missing '[super dealloc]' under ARC as calling -dealloc is illegal in that mode. llvm-svn: 138261
-
Anna Zaks authored
llvm-svn: 138259
-
Eli Friedman authored
llvm-svn: 138257
-
Fariborz Jahanian authored
llvm-svn: 138253
-
Fariborz Jahanian authored
a context switching object. llvm-svn: 138248
-
Nico Weber authored
This matches gcc's logic. Half of PR10661. llvm-svn: 138240
-
Chandler Carruth authored
const int &x = x; This crashed by inifinetly recursing within the lvalue evaluation routine. I've added a (somewhat) braindead way of preventing this recursion. If folks have better suggestions for how to avoid it I'm all ears. That said, we have some work to do. This doesn't trigger a single warning for uninitialized, self-initialized or otherwise completely wrong code. In some senses, the crash was almost better. llvm-svn: 138239
-
Argyrios Kyrtzidis authored
llvm-svn: 138235
-
Fariborz Jahanian authored
failures are resolved. llvm-svn: 138234
-
Argyrios Kyrtzidis authored
Currently getMacroArgExpandedLocation is very inefficient and for the case of a location pointing at the main file it will end up checking almost all of the SLocEntries. Make it faster: -Use a map of macro argument chunks to their expanded source location. The map is for a single source file, it's stored in the file's ContentCache and lazily computed, like the source lines cache. -In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track of the number of FileIDs (files and macros) that were created during preprocessing of that particular file SLocEntry. This is useful when computing the macro argument map in skipping included files while scanning for macro arg FileIDs that lexed from a specific source file. Due to padding, the new field does not increase the size of SLocEntry. llvm-svn: 138225
-
- Aug 21, 2011
-
-
Jordy Rose authored
[analyzer] Migrate the aliasing effects of CFRetain and CFMakeCollectable from CFRefCount to RetainReleaseChecker. No intended functionality change. llvm-svn: 138223
-
Jordy Rose authored
[analyzer] Remove FIXME; Ted reminded me that -init is not guaranteed to return its receiver and pretending that it does won't actually buy us anything. (Comment change only.) llvm-svn: 138221
-
Jordy Rose authored
[analyzer] Migrate return value handling from CFRefCount to ExprEngine. This seems to result in a minor performance hit, but I think that will go away again once we eliminate TransferFuncs from function calls entirely. llvm-svn: 138220
-
Jordy Rose authored
llvm-svn: 138215
-
- Aug 20, 2011
-
-
Benjamin Kramer authored
llvm-svn: 138214
-
Jordy Rose authored
[analyzer] RetainReleaseChecker always wants region change updates. There's no need for a flag, at least not right now. llvm-svn: 138212
-
Jordy Rose authored
llvm-svn: 138211
-
Jordy Rose authored
[analyzer] Move handling of hardcoded noreturn ("panic") methods from CFRefCount to NoReturnFunctionChecker. No functionality change intended. llvm-svn: 138210
-
Chad Rosier authored
llvm-svn: 138200
-
Ted Kremenek authored
[analyzer] Handle reads of ObjCPropertyRefExprs implicitly in Environment. No need to bind an explicit value and create a new node. llvm-svn: 138196
-
Ted Kremenek authored
[analyzer] Simplify ExprEngine::VisitBinaryOperator() by removing recursive visit to subexpressions (which is no longer needed). llvm-svn: 138195
-
Ted Kremenek authored
of the analysis (e.g., analysis of C expressions, analysis of Objective-C expressions, and so on). llvm-svn: 138194
-
Ted Kremenek authored
llvm-svn: 138193
-
Douglas Gregor authored
different modules) more robust. It already handled (simple) merges of the set of declarations attached to that identifier, so add a test case that shows us getting two different declarations for the same identifier (one struct, one function) from different modules, and are able to use both of them. llvm-svn: 138189
-
Douglas Gregor authored
llvm-svn: 138188
-
Douglas Gregor authored
modules (those that no other module depends on) and performs a search over all of the modules, visiting a new module only when all of the modules that depend on it have already been visited. The visitor can abort the search for all modules that a module depends on, which allows us to minimize the number of lookups necessary when performing a search. Switch identifier lookup from a linear walk over the set of modules to this module visitation operation. The behavior is the same for simple PCH and chained PCH, but provides the proper search order for modules. Verified with printf debugging, since we don't have enough in place to actually test this. llvm-svn: 138187
-
Anna Zaks authored
Static Analyzer Diagnostics: Move the responsibility for generating the endOfPath diagnostic piece from BugReport to BugReporterVisitor. Switch CFRefCount to use visitors in order to generate the endOfPath piece. llvm-svn: 138184
-
Ted Kremenek authored
llvm-svn: 138183
-
Anna Zaks authored
Static Analyzer Diagnostics: Switch CFRefCount to using the new visitor API. BugReport no longer needs to inherit from BugReporterVisitor. llvm-svn: 138142
-
Argyrios Kyrtzidis authored
for tokens that are lexed consecutively from the same FileID, instead of creating a SLocEntry for each token. e.g for assert(foo == bar); there will be a single SLocEntry for the "foo == bar" chunk and locations for the 'foo', '==', 'bar' tokens will point inside that chunk. For parsing SemaExpr.cpp, this reduced the number of SLocEntries by 25%. llvm-svn: 138129
-
Argyrios Kyrtzidis authored
Rename TokenLexer::getMacroExpansionLocation -> getExpansionLocForMacroDefLoc, no functionality change. llvm-svn: 138128
-
Argyrios Kyrtzidis authored
llvm-svn: 138127
-
Anna Zaks authored
Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*). 1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well. 2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor. 3) Modify all the checkers to use the new API. llvm-svn: 138126
-
- Aug 19, 2011
-
-
Douglas Gregor authored
llvm-svn: 138079
-
Matt Beaumont-Gay authored
llvm-svn: 138074
-