summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the mangling of a ref-qualifier on a function type so thatJohn McCall2012-05-151-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | it is placed in a position which is never ambiguous with a reference-to-function type. This follows some recent discussion and ensuing proposal on cxx-abi-dev. It is not necessary to change the mangling of CV-qualifiers because you cannot apply CV-qualification in the normal sense to a function type. It is not necessary to change the mangling of ref-qualifiers on method declarations because they appear in an unambiguous location. In addition, mangle CV-qualifiers and ref-qualifiers on function types when they occur in positions other than member pointers (that is, when they appear as template arguments). This is a minor ABI break with previous releases of clang. It is not considered critical because (1) ref-qualifiers are relatively rare, since AFAIK we're the only implementing compiler, and (2) they're particularly likely to come up in contexts that do not rely on the ODR for correctness. We apologize for any inconvenience; this is the right thing to do. llvm-svn: 156794
* [objcmt] When rewriting to subscripting syntax, make sure we putArgyrios Kyrtzidis2012-05-141-2/+26
| | | | | | | | the receiver in parentheses when necessary. Part of rdar://11438360 llvm-svn: 156789
* objc: allow typedef'ing an id to a pointer to a c-struct only.Fariborz Jahanian2012-05-141-6/+16
| | | | | | // rdar://11356439 llvm-svn: 156788
* Recover properly from a redundant 'typename' before a non-nested name. This isRichard Smith2012-05-141-5/+17
| | | | | | | permitted as a Microsoft extension. Patch by William Wilson! (Plus some minor tweaking by me.) llvm-svn: 156786
* [objcmt] When rewriting to array/dictionary literals, add an explicitArgyrios Kyrtzidis2012-05-142-1/+67
| | | | | | | | cast to 'id' for any argument that requires it. Part of rdar://11438360. llvm-svn: 156782
* Implement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and theRichard Smith2012-05-142-7/+15
| | | | | | expression is treated as an lvalue. llvm-svn: 156781
* Teach the driver on Linux to respect -nodefaultlibs.Chandler Carruth2012-05-141-13/+16
| | | | | | Patch from Andrew C. Morrow. llvm-svn: 156771
* [analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.Jordy Rose2012-05-141-0/+18
| | | | | | | | | | We check the address of the last element accessed, but with 0 calculating that address results in element -1. This patch bails out early (and avoids a bunch of other work at that). Fixes PR12807. llvm-svn: 156769
* Refactor all theRafael Espindola2012-05-133-100/+80
| | | | | | | | | if (Inherited) Attr->setInherited(true); To a central location. llvm-svn: 156728
* Produce a warning for mismatched section attributes. Completest pr9356.Rafael Espindola2012-05-132-3/+20
| | | | llvm-svn: 156727
* Add support for __attribute__((hot)) and __attribute__((cold)).Benjamin Kramer2012-05-122-0/+46
| | | | | | | | Currently cold functions are marked with the "optsize" attribute in CodeGen so they are always optimized for size. The hot attribute is just ignored, LLVM doesn't have a way to express hotness at the moment. llvm-svn: 156723
* Only check NSArray/NSDictionary boxing method params once.Jordy Rose2012-05-121-83/+89
| | | | | | | | 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.) llvm-svn: 156719
* 80-col violations and minor reformatting. No functionality change.Jordy Rose2012-05-121-60/+64
| | | | llvm-svn: 156718
* Clean up ObjC boxing method checks by reducing duplicated code.Jordy Rose2012-05-121-83/+54
| | | | llvm-svn: 156717
* Remove unused variable. Thanks to Dmitri Gribenko for noticing it.Rafael Espindola2012-05-121-2/+0
| | | | llvm-svn: 156715
* Don't crash on boxed strings when +stringWithUTF8String: is missing.Jordy Rose2012-05-121-5/+28
| | | | | | | | Also, unify some diagnostics for boxed expressions that have the same form. Fixes PR12804. llvm-svn: 156713
* [analyzer] RetainCountChecker: track ObjC boxed expression objects.Jordy Rose2012-05-122-6/+52
| | | | llvm-svn: 156699
* Teach the parser to deal with multiple spellings for the sameDouglas Gregor2012-05-111-1/+0
| | | | | | | attribute, rather than requiring multiple cases in consumers of this information. llvm-svn: 156666
* [analyzer] Do not walk the types for call graph construction.Anna Zaks2012-05-111-0/+1
| | | | llvm-svn: 156661
* Make sure that we recognize __attribute__((align)) as a synonym forDouglas Gregor2012-05-111-0/+1
| | | | | | | | __attribute__((aligned)). Fixes <rdar://problem/11435441>, a regression I introduced in r156003. This is the narrow fix; a more comprehensive fix is coming. llvm-svn: 156657
* When diagnosing inaccessible temporary destructors in decltype expressions, useRichard Smith2012-05-111-4/+4
| | | | | | | the correct type and the correct source location in the diagnostic. Spotted by Johannes Schaub! llvm-svn: 156654
* Merge branch 'format-string-braced-init'Matt Beaumont-Gay2012-05-111-1/+7
| | | | llvm-svn: 156653
* Coerce byval aggregate arguments to integers whose size matches the integerAkira Hatanaka2012-05-111-35/+44
| | | | | | | register size of the target architecture. llvm-svn: 156650
* The Lexer constructor expects a source location at the start of theArgyrios Kyrtzidis2012-05-112-5/+6
| | | | | | | | file buffer, not at the start of lexing. Fixes assertion hit in format diagnostics. rdar://11418366 llvm-svn: 156647
* Fix handling of vector return types.Akira Hatanaka2012-05-111-1/+1
| | | | | | | 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. llvm-svn: 156642
* Hexagon V5 intrinsics support in clang.Sirish Pande2012-05-111-155/+751
| | | | llvm-svn: 156630
* PR11857: When the wrong number of arguments are provided for a functionRichard Smith2012-05-112-8/+20
| | | | | | | which expects exactly one argument, include the name of the argument in the diagnostic text. Patch by Terry Long! llvm-svn: 156607
* Fix a recent regression with the merging of format attributes.Rafael Espindola2012-05-112-20/+31
| | | | llvm-svn: 156597
* For final output files create them with mode 0664 to match otherEric Christopher2012-05-111-1/+2
| | | | | | | | compilers and expected defaults. Part of rdar://11325849 llvm-svn: 156592
* [objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis2012-05-102-3/+68
| | | | | | | | numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 llvm-svn: 156583
* Include line that was meant to be in my last commit.Ted Kremenek2012-05-101-1/+2
| | | | llvm-svn: 156582
* Fix insidious RegionStore bug where we (a) didn't handle vector types and ↵Ted Kremenek2012-05-101-10/+68
| | | | | | | | | | | | (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). llvm-svn: 156580
* [analyzer] Exit early if constraint solver is given a non-integer symbolAnna Zaks2012-05-101-0/+5
| | | | | | | | | | | 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). llvm-svn: 156578
* Hexagon V5 FP support.Sirish Pande2012-05-102-3/+18
| | | | llvm-svn: 156567
* Don't crash when using objc boxed expression with parsing error.Argyrios Kyrtzidis2012-05-101-1/+4
| | | | | | rdar://11426994 llvm-svn: 156565
* When AST-dumping the ObjCBoxedExpr node, also print out what selector it chose.Argyrios Kyrtzidis2012-05-101-0/+6
| | | | llvm-svn: 156564
* [preprocessor] Make sure that MacroExpands callbacks are always in source order.Argyrios Kyrtzidis2012-05-101-3/+21
| | | | | | Fixes assertion hit in the preprocessing record. rdar://11426523 llvm-svn: 156557
* Fix an assertion hit when the serialized diagnostics writer receive a diagnosticArgyrios Kyrtzidis2012-05-104-61/+80
| | | | | | | | | | | | | | 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 llvm-svn: 156536
* Warn about visibility attributes in typedefs.Rafael Espindola2012-05-101-0/+4
| | | | llvm-svn: 156534
* Fix an old (2009) FIXME:Rafael Espindola2012-05-103-124/+185
| | | | | | | | | | | | | | | | | | | | | // 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. llvm-svn: 156531
* [analyzer] Do not highlight the range of the statement in case of leak.Anna Zaks2012-05-101-8/+24
| | | | | | | | | | 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 llvm-svn: 156530
* objective-c. Fixes a 'fixit' where location ofFariborz Jahanian2012-05-093-1/+7
| | | | | | | '*' on objective-c class name was misplaced. // rdar://11311333 llvm-svn: 156517
* Pull some cases of initialization with self-reference warnings out ofRichard Trieu2012-05-091-33/+25
| | | | | | -Wconditional-uninitialized into -Wuninitialized. llvm-svn: 156512
* Push the knowledge that we are parsing a type-id/type-name further into theRichard Smith2012-05-091-2/+5
| | | | | | | parser, and use it to emit better diagnostics in cases where an identifer can't be looked up as a type name. llvm-svn: 156508
* Stop AltiVec parsing from going down the 'implicit int' codepath as part of itsRichard Smith2012-05-091-1/+6
| | | | | | | normal parse for token sequences like 'vector pixel foo'. This incidentally also fixes a couple of wrong-parse issues. llvm-svn: 156503
* Roll logic into a single if statement, per David's suggestion.Chad Rosier2012-05-091-3/+2
| | | | llvm-svn: 156502
* Use the triple directly, rather then getTriple().Chad Rosier2012-05-091-1/+1
| | | | llvm-svn: 156501
* Now the proper fix for r156497. Sorry for the churn.Chad Rosier2012-05-091-4/+5
| | | | llvm-svn: 156498
* Move the iOSVersionMin string to a header so as to avoid a dangling pointer.Chad Rosier2012-05-092-1/+4
| | | | llvm-svn: 156497
* Fix -Wdelete-non-virtual-dtor in Tooling code.David Blaikie2012-05-091-0/+3
| | | | | | Also, add an anchor as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 156495
OpenPOWER on IntegriCloud