aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-12Only check NSArray/NSDictionary boxing method params once.Jordy Rose
Once we've found a "good" method, we don't need to check its argument types again. (Even if we might have later found a "bad" method, we were already caching the method we first looked up.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-1280-col violations and minor reformatting. No functionality change.Jordy Rose
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-12Clean up ObjC boxing method checks by reducing duplicated code.Jordy Rose
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-12Remove unused variable. Thanks to Dmitri Gribenko for noticing it.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156715 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-12Don't crash on boxed strings when +stringWithUTF8String: is missing.Jordy Rose
Also, unify some diagnostics for boxed expressions that have the same form. Fixes PR12804. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156713 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-12[analyzer] RetainCountChecker: track ObjC boxed expression objects.Jordy Rose
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156699 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Teach the parser to deal with multiple spellings for the sameDouglas Gregor
attribute, rather than requiring multiple cases in consumers of this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156666 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11[analyzer] Test variable modified types.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11[analyzer] Do not walk the types for call graph construction.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156661 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11[analyzer] Test objC boxing.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156660 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11[analyzer] Add buffer overflow test case.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156659 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Make sure that we recognize __attribute__((align)) as a synonym forDouglas Gregor
__attribute__((aligned)). Fixes <rdar://problem/11435441>, a regression I introduced in r156003. This is the narrow fix; a more comprehensive fix is coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156657 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11When diagnosing inaccessible temporary destructors in decltype expressions, useRichard Smith
the correct type and the correct source location in the diagnostic. Spotted by Johannes Schaub! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156654 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Merge branch 'format-string-braced-init'Matt Beaumont-Gay
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156653 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Coerce byval aggregate arguments to integers whose size matches the integerAkira Hatanaka
register size of the target architecture. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11The Lexer constructor expects a source location at the start of theArgyrios Kyrtzidis
file buffer, not at the start of lexing. Fixes assertion hit in format diagnostics. rdar://11418366 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156647 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Fix handling of vector return types.Akira Hatanaka
A vector should be returned via the hidden pointer argument except if its size is equal to or smaller than 16-bytes and the target ABI is N32 or N64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156642 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Hexagon V5 intrinsics support in clang.Sirish Pande
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156630 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11PR11857: When the wrong number of arguments are provided for a functionRichard Smith
which expects exactly one argument, include the name of the argument in the diagnostic text. Patch by Terry Long! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156607 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Add a test case for going through typedefs until we reach "BOOL", that ↵Argyrios Kyrtzidis
NSAPI::isObjCTypedef() is doing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156604 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Fix a recent regression with the merging of format attributes.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156597 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11For final output files create them with mode 0664 to match otherEric Christopher
compilers and expected defaults. Part of rdar://11325849 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis
numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156583 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Include line that was meant to be in my last commit.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156582 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Fix insidious RegionStore bug where we (a) didn't handle vector types and ↵Ted Kremenek
(b) had a horrible bug in GetLazyBindings where we falsely appended a field suffix when traversing 3 or more layers of lazy bindings. I don't have a reduced test case yet; but I have added the original source to an internal regression test suite. I'll see about coming up with a reduced test case. Fixes <rdar://problem/11405978> (for real). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156580 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[analyzer] Exit early if constraint solver is given a non-integer symbolAnna Zaks
to reason about. As part of taint propagation, we now allow creation of non-integer symbolic expressions like a cast from int to float. Addresses PR12511 (radar://11215362). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156578 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Hexagon V5 FP support.Sirish Pande
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156567 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Don't crash when using objc boxed expression with parsing error.Argyrios Kyrtzidis
rdar://11426994 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156565 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10When AST-dumping the ObjCBoxedExpr node, also print out what selector it chose.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156564 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Provide a man page for scan-build. Patch by James Lowden!Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156559 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[preprocessor] Make sure that MacroExpands callbacks are always in source order.Argyrios Kyrtzidis
Fixes assertion hit in the preprocessing record. rdar://11426523 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156557 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Test for previously checked in patch.Fariborz Jahanian
// rdar://11374235 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156552 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Fix an assertion hit when the serialized diagnostics writer receive a diagnosticArgyrios Kyrtzidis
from the frontend when the location is invalid and the SourceManager null. Instead of keeping the SourceManager object in DiagnosticRenderer, propagate it to the calls accordingly (as reference when it is expected to not be null, or pointer when it may be null). This effectively makes DiagnosticRenderer not tied to a specific SourceManager, removing a hack from TextDiagnosticPrinter. rdar://11386874 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Warn about visibility attributes in typedefs.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10Fix an old (2009) FIXME:Rafael Espindola
// FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. This was already being done for variables, but for functions we were merging then first and then applying the attributes. To avoid duplicating merging logic, some of the helpers in SemaDeclAttr.cpp become methods that can handle merging two attributes in one decl or inheriting attributes from one decl to another. With this change we are now able to produce errors for variables with incompatible visibility attributes or warn about unused dllimports in variables. This changes the attribute list iteration back to being in reverse source code order, as that matches what decl merging does and avoids differentiating the two cases is the merge*Attr methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156531 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[analyzer] Do not highlight the range of the statement in case of leak.Anna Zaks
We report a leak at a point a leaked variable is no longer accessible. The statement that happens to be at that point is not relevant to the leak diagnostic and, thus, should not be highlighted. radar://11178519 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156530 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09RecursiveASTVisitor:Richard Smith
We don't create any declaration to mark the explicit instantiation of function templates other than the instantiation itself, so visit that when traversing the function template decl. This is a temporary fix, pending the creation of a Decl node to represent the explicit instantiation. Patch by Daniel Jasper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156522 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09objective-c. Fixes a 'fixit' where location ofFariborz Jahanian
'*' on objective-c class name was misplaced. // rdar://11311333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156517 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09hopefully fix a bunch of ARM buildbot failuresNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156513 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Pull some cases of initialization with self-reference warnings out ofRichard Trieu
-Wconditional-uninitialized into -Wuninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156512 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Push the knowledge that we are parsing a type-id/type-name further into theRichard Smith
parser, and use it to emit better diagnostics in cases where an identifer can't be looked up as a type name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Stop AltiVec parsing from going down the 'implicit int' codepath as part of itsRichard Smith
normal parse for token sequences like 'vector pixel foo'. This incidentally also fixes a couple of wrong-parse issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Roll logic into a single if statement, per David's suggestion.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Use the triple directly, rather then getTriple().Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Pass a target triple explicitly to check platform specific macros definitions.Simon Atanasyan
That allows to run the tests on all platforms successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156500 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Now the proper fix for r156497. Sorry for the churn.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Move the iOSVersionMin string to a header so as to avoid a dangling pointer.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156497 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Fix -Wdelete-non-virtual-dtor in Tooling code.David Blaikie
Also, add an anchor as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156495 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Update test case for new default of 3.0Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Implement PPC64TargetCodeGenInfo.Roman Divacky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156491 91177308-0d34-0410-b5e6-96231b3b80d8