summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* The ARC Migration Tool. All the credit goes to Argyrios and FariborzJohn McCall2011-06-1567-15/+6340
| | | | | | for this. llvm-svn: 133104
* Automatic Reference Counting.John McCall2011-06-15198-1101/+13876
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Introduce a utility routine for checking whether a block's capturesJohn McCall2011-06-152-0/+12
| | | | | | include a specific variable. llvm-svn: 133102
* Missing files.John McCall2011-06-152-4/+21
| | | | llvm-svn: 133096
* Per Chris's suggestion, simplify code using llvm::getOrEnforceKnownAlignment.Eli Friedman2011-06-151-36/+15
| | | | llvm-svn: 133095
* Generate enumerators for diagnostic categories. Patch by Argyrios!John McCall2011-06-152-1/+49
| | | | | | Depends on LLVM r133093. llvm-svn: 133094
* The specification document for the new ObjC Automatic Reference CountingJohn McCall2011-06-151-0/+1350
| | | | | | | | feature. Implementation to follow. :) llvm-svn: 133090
* remove the index page, we have dox now!Chris Lattner2011-06-151-4/+0
| | | | llvm-svn: 133087
* Test for r133070.Eli Friedman2011-06-151-0/+4
| | | | llvm-svn: 133079
* Fix a couple more tests with ARM ABI.Eli Friedman2011-06-152-2/+2
| | | | llvm-svn: 133073
* Use isAnyComplexType here so we don't pass complex numbers into the ↵Eli Friedman2011-06-151-1/+1
| | | | | | aggregate handling code; found by inspection. llvm-svn: 133070
* Fix a regression from r132957 involving complex integers. (Fixes failures ↵Eli Friedman2011-06-152-2/+16
| | | | | | on gcc-testsuite bot.) llvm-svn: 133069
* Do not emit stoppoint before emitting debug info for parameters.Devang Patel2011-06-151-3/+1
| | | | | | | - llvm.dbg.declare already receives line number information from ParmDecl - Additional extra stoppoint messes up gdb's understanding of where function body starts. llvm-svn: 133065
* Eliminate a 'default' case in template argument deduction, where weDouglas Gregor2011-06-156-10/+215
| | | | | | | | | | | | | | | | | | were just punting on template argument deduction for a number of type nodes. Most of them, obviously, didn't matter. As a consequence of this, make extended vector types (via the ext_vector_type attribute) actually work properly for several important cases: - If the attribute appears in a type-id (i.e, not attached to a typedef), actually build a proper vector type - Build ExtVectorType whenever the size is constant; previously, we were building DependentSizedExtVectorType when the size was constant but the type was dependent, which makes no sense at all. - Teach template argument deduction to handle ExtVectorType/DependentSizedExtVectorType. llvm-svn: 133060
* Eliminate an unnecessary include. FIXMEs -=1 Douglas Gregor2011-06-151-1/+0
| | | | llvm-svn: 133056
* When performing substitution of default template template parametersDouglas Gregor2011-06-153-12/+29
| | | | | | | | | | before the template parameters have acquired a proper context (e.g., because the enclosing context has yet to be built), provide empty parameter lists for all outer template parameter scopes to inhibit any substitution for those template parameters. Fixes PR9643 / <rdar://problem/9251019>. llvm-svn: 133055
* [analyzer] Revise CStringChecker's modelling of strcpy() and strcat():Jordy Rose2011-06-152-57/+270
| | | | | | | | | | | | | | | - (bounded copies) Be more conservative about how much is being copied. - (str(n)cat) If we can't compute the exact final length of an append operation, we can still lower-bound it. - (stpcpy) Fix the conjured return value at the end to actually be returned. This requires these supporting changes: - C string metadata symbols are still live even when buried in a SymExpr. - "Hypothetical" C string lengths, to represent a value that /will/ be passed to setCStringLength() if all goes well. (The idea is to allow for temporary constrainable symbols that may end up becoming permanent.) - The 'checkAdditionOverflow' helper makes sure that the two strings being appended in a strcat don't overflow size_t. This should never *actually* happen; the real effect is to keep the final string length from "wrapping around" in the constraint manager. This doesn't actually test the "bounded" operations (strncpy and strncat) because they can leave strings unterminated. Next on the list! llvm-svn: 133046
* Don't add redundant FormatAttr, ConstAttr, or NoThrowAttr attributes,Douglas Gregor2011-06-153-5/+40
| | | | | | | either imlicitly (for builtins) or explicitly (due to multiple specification of the same attributes). Fixes <rdar://problem/9612060>. llvm-svn: 133045
* [analyzer] If a C string length is UnknownVal, clear any existing length ↵Jordy Rose2011-06-151-3/+7
| | | | | | binding. No tests yet because the only thing that sets string length is strcpy(), and that needs some work anyway. llvm-svn: 133044
* [analyzer] When performing a binary operation on symbolic operands, we ↵Jordy Rose2011-06-151-4/+32
| | | | | | | | convert the symbol values to a common type. But in a relational operation, the result is an 'int' or 'bool', which may not be the appropriate type to convert the operands to. In these cases, use the left-hand operand's type as the conversion type. There's no associated test for this because fully-constrained symbolic values are evaluated ahead of time in normal expressions. This can only come up in checker-constructed expressions (like the ones in an upcoming patch to CStringChecker). llvm-svn: 133041
* Build fix attempt.Nico Weber2011-06-151-1/+1
| | | | llvm-svn: 133039
* Properly implement C++0x [stmt.dcl]p3, which requires a scope to beDouglas Gregor2011-06-153-4/+9
| | | | | | | protected in the case where a variable is being initialized by a trivial default constructor but has a non-trivial destructor. llvm-svn: 133037
* Warn on "void f(int a[10]) { sizeof(a); }"Nico Weber2011-06-154-0/+50
| | | | llvm-svn: 133036
* Sema: show shift result in hexadecimalTed Kremenek2011-06-153-9/+14
| | | | | | | | | | | | | | | | | Change the output for -Wshift-overflow and -Wshift-sign-overflow to an unsigned hexadecimal. It makes more sense for looking at bits than a signed decimal does. Also, change the diagnostic's wording from "overrides" to "sets". This uses a new optional argument in APInt::toString() that adds the '0x' prefix to hexademical numbers. This fixes PR 9651. Patch by nobled@dreamwidth.org! llvm-svn: 133033
* mention new VLA behavior in gnu* vs c* mode dox.Chris Lattner2011-06-151-0/+4
| | | | llvm-svn: 133030
* Introduce a -cc1-level option to turn off related result typeDouglas Gregor2011-06-148-3/+24
| | | | | | inference, to be used (only) by the Objective-C rewriter. llvm-svn: 133025
* [format strings] correctly suggest correct type for '%@' specifiers. Fixes ↵Ted Kremenek2011-06-143-1/+5
| | | | | | <rdar://problem/9607158>. llvm-svn: 133024
* Bad table discription of fromat-y2k causes Fariborz Jahanian2011-06-142-2/+11
| | | | | | | no-format-y2k turn off -Wformat altogether. // rdar://9504680 llvm-svn: 133015
* fix example as per rdar://problem/9461587Blaine Garst2011-06-141-1/+1
| | | | llvm-svn: 133012
* Whack a bunch of tests in CodeGenCXX to work on ARM (using ARM ABI). Batch ↵Eli Friedman2011-06-1410-50/+54
| | | | | | 2 of 3. llvm-svn: 133011
* revert r133003 and fix the bug properly: the issue was that ## in a tokenChris Lattner2011-06-143-14/+16
| | | | | | | | | | lexer is not a paste operator, it is a normal token. This fixes a conformance issue shown here: http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-2.9.html and it defines away the crash from before. llvm-svn: 133005
* Fix a crash on the testcase in PR9981 / rdar://9486765.Chris Lattner2011-06-142-3/+10
| | | | llvm-svn: 133003
* When profiling FunctionProtoTypes, don't canonicalize the expressionDouglas Gregor2011-06-142-1/+54
| | | | | | | | | | in a noexcept exception specification because it isn't part of the canonical type. This ensures that we keep the exact expression written in the noexcept exception specification, rather than accidentally "adopting" a previously-written and canonically "equivalent" function prototype. Fixes PR10087. llvm-svn: 132998
* Warn on memset(ptr, 0, sizeof(ptr)). Diagnostic wording by Jordy Rose.Nico Weber2011-06-143-1/+127
| | | | llvm-svn: 132996
* Remove the Fix-it for missing statement in switchesDavid Majnemer2011-06-141-6/+4
| | | | llvm-svn: 132994
* StaticDiagNameIndex is never written to, place it into .rodata.Benjamin Kramer2011-06-141-2/+2
| | | | llvm-svn: 132990
* Hyphenate "argument-dependent".Jay Foad2011-06-145-11/+11
| | | | llvm-svn: 132989
* when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be ↵Chris Lattner2011-06-148-11/+46
| | | | | | | | | | folded to a constant as constant size arrays. This has slightly different semantics in some insane cases, but allows us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code llvm-svn: 132983
* fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class memberChris Lattner2011-06-143-9/+33
| | | | | | as an extension. llvm-svn: 132980
* Properly diagnose using abstract and incomplete types in va_argDavid Majnemer2011-06-145-14/+46
| | | | | | | - Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there - Incomplete and abstract types are considered hard errors llvm-svn: 132979
* Update the prefetch intrinsic usage. Now the last argument tells codegenBruno Cardoso Lopes2011-06-141-1/+2
| | | | | | whether it's a data or instruction cache access. llvm-svn: 132977
* fix rdar://9546171 - -Wshorten-64-to-32 shouldn't warn on vector bitcasts.Chris Lattner2011-06-142-3/+16
| | | | llvm-svn: 132975
* Move GlobalDecl to ASTPeter Collingbourne2011-06-145-18/+15
| | | | llvm-svn: 132973
* [analyzer] CStringChecker checks functions in the C standard library, not ↵Jordy Rose2011-06-144-14/+14
| | | | | | C++. Its external name is now unix.experimental.CString. llvm-svn: 132958
* The LLVM IR representation of byval arguments has a rather strange property: ↵Eli Friedman2011-06-142-5/+77
| | | | | | | | | | if the alignment of an argument to a call is less than the specified byval alignment for that argument, there is no way to specify the alignment of the implied copy. Therefore, we must ensure that the alignment of the argument is at least the byval alignment. To do this, we have to mess with the alignment of relevant alloca's in some cases, and insert a copy that conceptually shouldn't be necessary in some cases. This patch tries relatively hard to avoid creating an extra copy if it can be avoided (see test3 in the included testcase), but it is not possible to avoid in some cases (like test2 in the included testcase). rdar://9483886 llvm-svn: 132957
* [analyzer] Change large if body to early return. No functionality change.Jordy Rose2011-06-141-77/+78
| | | | llvm-svn: 132956
* [analyzer] Fix modeling of strnlen to be more conservative. Move tests we ↵Jordy Rose2011-06-143-77/+239
| | | | | | can't properly model (yet?) to string-fail.c. llvm-svn: 132955
* Make __gnu_inline__ functions in gnu99 mode work the same way as inline ↵Eli Friedman2011-06-133-18/+27
| | | | | | | | functions in gnu89 mode in terms of redefinitions. rdar://9559708 . llvm-svn: 132953
* Put local variables in appropriate debug info scope.Devang Patel2011-06-131-5/+5
| | | | | | This fixes radar 8757124. llvm-svn: 132949
* Remote this unreliable test case because it did not do its job.Devang Patel2011-06-131-20/+0
| | | | llvm-svn: 132948
OpenPOWER on IntegriCloud