- Aug 07, 2011
-
-
John McCall authored
otherwise required. llvm-svn: 137029
-
Alexis Hunt authored
because we don't support them yet. llvm-svn: 137027
-
- Aug 06, 2011
-
-
John McCall authored
ActOnStartOfSwitchStmt (i.e. before binding up a full-expression) instead of ActOnFinishSwitchStmt. Among other things, this means that property l-values are properly converted inside the full-expression. llvm-svn: 137014
-
Ted Kremenek authored
[analyzer] Start sketching out a new BugReporterVisitor that inspects branches and other expressions to generate interesting path events in diagnostics. llvm-svn: 137012
-
John McCall authored
aren't actually going to make a normal cleanup for. Sometimes we optimistically create branches to such blocks for fixups, and then we resolve the fixup to somewhere within the cleanup's scope, and then the cleanup is actually not reachable for some reason. The process of resolving the fixup leaves us with switches whose default edge leads to the cleanup; we can replace that with unreachable, then (in many cases) turn the switch into an unconditional branch. Fixes PR10467. llvm-svn: 137011
-
Benjamin Kramer authored
llvm-svn: 137009
-
Ted Kremenek authored
[analyzer] Simplify logic for ExprEngine::VisitUnaryExprOrTypeTraitExpr to avoid recursion to subexpression. This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper. llvm-svn: 137006
-
Ted Kremenek authored
[analyzer] Change SymbolReaper to store region roots implied by the Environment, allowing it be queried when determining if symbols derived from regions are still live. llvm-svn: 137005
-
Anna Zaks authored
KeychainAPI checker: Track SymbolMetadata instead of MemRegion in checker state so that we could clear the state on evalDeadSymbols; also track the return value. llvm-svn: 137003
-
Ted Kremenek authored
llvm-svn: 136998
-
Kaelyn Uhrain authored
case situations with the unary operators & and *. Also extend the array bounds checking to work with pointer arithmetic; the pointer arithemtic checking can be turned on using -Warray-bounds-pointer-arithmetic. The changes to where CheckArrayAccess gets called is based on some trial & error and a bunch of digging through source code and gdb backtraces in order to have the check performed under as many situations as possible (such as for variable initializers, arguments to function calls, and within conditional in addition to the simpler cases of the operands to binary and unary operator) while not being called--and triggering warnings--more than once for a given ArraySubscriptExpr. llvm-svn: 136997
-
Jonathan D. Turner authored
Add workaround for built va list (and other builtins) so that running ReadAST multiple times does not immediately throw an error. llvm-svn: 136995
-
Chad Rosier authored
This fixes cases where the anonymous bitfield is followed by a bitfield member. E.g., struct t4 { char foo; long : 0; char bar : 1; }; rdar://9859156 llvm-svn: 136991
-
Jonathan D. Turner authored
llvm-svn: 136987
-
- Aug 05, 2011
-
-
Roman Divacky authored
llvm-svn: 136971
-
Chandler Carruth authored
arrays. This now suppresses the warning only in the case of a one-element array as the last field in a struct where the array size is a literal '1' rather than any macro expansion or template parameter. This doesn't distinguish between the language standard in use to allow code which dates from C89 era to compile without the warning even in C99 and C++ builds. We could add a separate warning (under a different flag) with fixit hints to switch to a flexible array, but its not clear that this would be desirable. Much of the code using this idiom is striving for maximum portability. Tests were also fleshed out a bit, and the diagnostic itself tweaked to be more pretty w.r.t. single elment arrays. This is more ugly than I would like due to APInt's not being supported by the diagnostic rendering engine. A pseudo-patch for this was proposed by Nicola Gigante, but I reworked it both for several correctness issues and for code style. Sorry this was so long in coming. llvm-svn: 136965
-
Chandler Carruth authored
1-element character arrays which are serving as flexible arrays. This is the initial step, which is to restrict the 1-element array whitelist to arrays that are member declarations. I'll refine it from here based on the proposed patch. llvm-svn: 136964
-
Abramo Bagnara authored
llvm-svn: 136963
-
Anna Zaks authored
KeychainAPI checker: Generate an error on double allocation. Pull out getAsPointeeMemoryRegion so that it could be reused. llvm-svn: 136952
-
Matt Beaumont-Gay authored
llvm-svn: 136950
-
John McCall authored
releasing the collection. llvm-svn: 136949
-
Kaelyn Uhrain authored
functions when performing function overload resolution. llvm-svn: 136948
-
Fariborz Jahanian authored
argument to bool. // rdar://9899834 llvm-svn: 136946
-
Chad Rosier authored
llvm-svn: 136944
-
Kaelyn Uhrain authored
when performing typo correction involving any overloaded template functions. The added test cases, while currently demontrating sub-optimal behavior, will not trigger any messages without the 1-line change to SemaExpr.cpp. llvm-svn: 136943
-
Matt Beaumont-Gay authored
it can be controlled with a distinct flag. llvm-svn: 136941
-
Ted Kremenek authored
llvm-svn: 136939
-
- Aug 04, 2011
-
-
Anna Zaks authored
KeychainAPI checker: Track additional pair of SecKeychain APIs. Also, keep exploring the transition on which a call to allocator function failed (to be able to find errors in examples like ErrorCodesFromDifferentAPISDoNotInterfere). llvm-svn: 136930
-
Chad Rosier authored
llvm-svn: 136929
-
Fariborz Jahanian authored
situation. When a class explicitly or implicitly (through inheritance) "conformsTo" two protocols which conflict (have methods which conflict). This is 2nd part of // rdar://6191214. llvm-svn: 136927
-
Douglas Gregor authored
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>. llvm-svn: 136911
-
Chad Rosier authored
llvm-svn: 136907
-
Douglas Gregor authored
clearly called out, and add the missing local -> global selector map output. llvm-svn: 136903
-
Douglas Gregor authored
the last of the ID/offset/index mappings that I know of. Unfortunately, the "gap" method of testing doesn't work here due to the way the preprocessing record performs iteration. We'll do more testing once multi-AST loading is possible. llvm-svn: 136902
-
Douglas Gregor authored
ASTReader::ReadMacroRecord(). No functionality change. llvm-svn: 136893
-
Chad Rosier authored
llvm-svn: 136892
-
Kaelyn Uhrain authored
Having a function declaration and definition with different types for a parameter where the types have same (textual) name can occur when an unqualified type name resolves to types in different namespaces in each location. The error messages have been extended by adding notes that point to the first parameter of the function definition that doesn't match the declaration, instead of a generic "member declaration nearly matches". The generic message is still used in cases where the mismatch is not in the paramenter list, such as mismatched cv qualifiers on the member function itself. llvm-svn: 136891
-
Anna Zaks authored
KeychainAPI checker: Refactor to make it easier to add more allocator/deallocator API pairs. Add the allocator function ID to the checker state. Better comments. llvm-svn: 136889
-
Douglas Gregor authored
so that we use ID zero as a sentinel for "no result". This matches the convention set by all of the other global IDs. llvm-svn: 136885
-
Douglas Gregor authored
Add some missing record names to the AST output. No functionality change, but llvm-bcanalyzer will be a little more informative now for AST files llvm-svn: 136883
-