summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Check for placeholders early on inDouglas Gregor2011-06-221-4/+6
| | | | | | | Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some cases. Fixes <rdar://problem/9659191>. llvm-svn: 133663
* Fix a think-o that amazingly didn't show up until I started writingAlexis Hunt2011-06-221-1/+1
| | | | | | implicit move tests. llvm-svn: 133655
* Issue warning if weak_import attribute is added to an alreadyFariborz Jahanian2011-06-221-4/+9
| | | | | | declared variable and ignore it. // rdar://9538608 llvm-svn: 133654
* Alloa catching Objective-C id's being thrown with C++ throwFariborz Jahanian2011-06-225-14/+25
| | | | | | in Darwin's fragile abi mode. // rdar://8940528 llvm-svn: 133639
* Changes ParenListExpr to always require a type.Manuel Klimek2011-06-224-41/+19
| | | | | | | Removes dead code found in the process. Adds a test to verify that ParenListExprs do not have NULL types. llvm-svn: 133637
* Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!Douglas Gregor2011-06-222-4/+57
| | | | llvm-svn: 133633
* Fix the starting location of the Fix-It note for suspicious precedenceDouglas Gregor2011-06-221-1/+2
| | | | | | | issues between a bitwise operator and a comparison operator. Fixes <rdar://problem/9637759>. llvm-svn: 133630
* When instantiating a function template declaration that was expressedDouglas Gregor2011-06-221-3/+20
| | | | | | | via a typedef of a function, make sure to synthesize parameter declarations. Fixes PR9654 / <rdar://problem/9257497>. llvm-svn: 133628
* [arcmt] Make -Warc-unsafe-retained-assign an error when migrating. ↵Argyrios Kyrtzidis2011-06-221-0/+2
| | | | | | rdar://8939557 llvm-svn: 133627
* Build and use libcompiler_rt whenever possible.Eric Christopher2011-06-222-20/+23
| | | | | | Patch by Jean-Daniel Dupas! llvm-svn: 133624
* Try to silence GCC warningDouglas Gregor2011-06-221-0/+2
| | | | llvm-svn: 133623
* objc-arc: Allow unbridged cast of retainable object toFariborz Jahanian2011-06-221-1/+1
| | | | | | | integral as it is not transferring ownership.. // rdar://9619861 llvm-svn: 133622
* Implement the C++0x move optimization for Automatic Reference CountingDouglas Gregor2011-06-221-0/+25
| | | | | | | | objects, so that we steal the retain count of a temporary __strong pointer (zeroing out that temporary), eliding a retain/release pair. Addresses <rdar://problem/9364932>. llvm-svn: 133621
* When binding a reference to an Automatic Reference Counting temporary,Douglas Gregor2011-06-224-38/+169
| | | | | | | | | retain/release the temporary object appropriately. Previously, we would only perform the retain/release operations when the reference would extend the lifetime of the temporary, but this does the wrong thing across calls. llvm-svn: 133620
* Give MaterializeTemporaryExpr the exact type of the lvalue it bindsDouglas Gregor2011-06-221-1/+3
| | | | | | to, including cv-qualifications. llvm-svn: 133618
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-223-4/+3
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Introduce DelayedCleanupPool useful for simplifying clean-up of certain ↵Argyrios Kyrtzidis2011-06-228-40/+27
| | | | | | | | | | resources that, while their lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak. Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138. llvm-svn: 133610
* Actually, you know, fix the problem.Alexis Hunt2011-06-221-1/+2
| | | | llvm-svn: 133604
* Emit @finally blocks completely lazily instead of forcing theirJohn McCall2011-06-223-71/+79
| | | | | | | | | | | | | existence by always threading an edge from the catchall. Not doing this was previously causing a crash in the very extreme case where neither the normal cleanup nor the EH catchall was actually reachable: we would delete the catchall entry block, which would cause us to delete the entry block of the finally cleanup as well because the cleanup logic would merge the blocks, which in turn triggered an assert because later blocks in the finally would still be using values from the entry. Laziness turns out to be the most elegant solution to the problem. llvm-svn: 133601
* Avoid making assumption that this is either a CXXMethodDecl or aAlexis Hunt2011-06-221-2/+1
| | | | | | | | | FunctionTemplateDecl. I'm not quite sure what else it could be, though, and would appreciate some insight. This ought to fix the broken builds llvm-svn: 133600
* Ensure that we delete implict copy members when explicit move membersAlexis Hunt2011-06-221-2/+14
| | | | | | are also present. llvm-svn: 133593
* It is possible to request the nonfragile ABI with -fobjc-abi-version=2;John McCall2011-06-221-17/+20
| | | | | | | respect that when deciding whether -objc-exceptions implies the -fexceptions -cc1 option. llvm-svn: 133590
* Attempt to reapply this patch for caching copy assignment operatorAlexis Hunt2011-06-212-192/+109
| | | | | | | lookup. Previously, it was breaking self-host, but it's been a week and a half and I can't reproduce, so I need to see if it's still failing. llvm-svn: 133581
* Fix PR10168: don't warn for unused non-dependent variables in both the ↵Richard Smith2011-06-211-2/+4
| | | | | | template definition and each instantiation. llvm-svn: 133580
* Fix a missing space noticed by matthewbg in code review.Chandler Carruth2011-06-211-1/+1
| | | | llvm-svn: 133577
* First part of PR9968: the __range variable in a dependent C++11 for-range ↵Richard Smith2011-06-211-0/+3
| | | | | | statement is implicitly used by that statement. llvm-svn: 133572
* Fix some grammar nits in the comments from Nick.Chandler Carruth2011-06-211-2/+2
| | | | llvm-svn: 133571
* Revert r133526 which re-orders the suggestions for -Wparentheses on ?:Chandler Carruth2011-06-211-4/+4
| | | | | | | operators. There is a consistent design of having the "silence the warning" option first. llvm-svn: 133570
* Unbreak the CMake buildAlexis Hunt2011-06-211-1/+1
| | | | llvm-svn: 133557
* Fix the mangling of dependent-scope decl ref expressions so that theyJohn McCall2011-06-211-20/+8
| | | | | | use the unresolved-name production correctly. llvm-svn: 133554
* Make InitHeaderSearch::AddPath and HeaderSearchOptions::AddPath consistentBob Wilson2011-06-212-7/+7
| | | | | | | | use an "IgnoreSysRoot" argument. HeaderSearchOptions had been using the opposite form with "IsSysRootRelative", which made for much confusion when looking at true/false values in calls in AddPath. No functional change. llvm-svn: 133550
* Driver/Darwin: Fixup version check for -object_path_lto support.Daniel Dunbar2011-06-211-1/+1
| | | | llvm-svn: 133548
* Fix the default libc++ header search path to be sysrooted. Radar 9639692.Bob Wilson2011-06-214-8/+13
| | | | | | | | | The -cxx-isystem path is not prefixed with the sysroot directory, so it's not a good way for the driver to set the system default C++ search path. Instead, add -stdlib as a cc1 option and teach the frontend how to find the headers. The driver can then just pass -stdlib through to "cc1". llvm-svn: 133547
* Driver/Darwin: When invoking the linker, automatically pass -object_path_lto soDaniel Dunbar2011-06-211-0/+11
| | | | | | | | | that the linker has a place to put the temporary object file and can leave it around (for the driver to clean up). This is important so that the object file references in the debug info are preserved for possible use by dsymutil. - <rdar://problem/8294279> executable has no debug symbols when compiled with LTO llvm-svn: 133543
* Driver: Factor out IsUsingLTO helper function.Daniel Dunbar2011-06-211-7/+14
| | | | llvm-svn: 133542
* [arcmt] Merge 'removeEmptyStatements' and 'removeDeallocMethod' passes to ↵Argyrios Kyrtzidis2011-06-216-216/+215
| | | | | | | | cut down on one compilation pass and increase migration speed. llvm-svn: 133540
* [arcmt] Break apart Transforms.cpp.Argyrios Kyrtzidis2011-06-2114-1941/+2180
| | | | llvm-svn: 133539
* objc-arc: Add support for unbridged cast of Fariborz Jahanian2011-06-211-19/+39
| | | | | | | | __builtin___CFStringMakeConstantString and CF typed function calls with explicit cf_returns_retained/cf_returns_not_retained attributes. // rdar://9544832 llvm-svn: 133535
* IRgen: Add a -fuse-register-sized-bitfield-access option, for testing.Daniel Dunbar2011-06-212-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changes bit-field access policy to try to use (aligned) register sized accesses. The idea here is that by using larger accesses we expose more coalescing potential to the backend when we have situations like adjacent bit-fields in the same structure (which is common), and that the backend should be smart enough to narrow the accesses down when no coalescing is done or when it is shown not to be profitable. -- $ clang -m32 -O3 -S -o - t.c _f0: ## @f0 pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax movb (%eax), %cl andb $-128, %cl orb $1, %cl movb %cl, (%eax) movb 1(%eax), %cl andb $-128, %cl orb $1, %cl movb %cl, 1(%eax) movb 2(%eax), %cl andb $-128, %cl orb $1, %cl movb %cl, 2(%eax) movb 3(%eax), %cl andb $-128, %cl orb $1, %cl movb %cl, 3(%eax) popl %ebp ret $ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access _f0: ## @f0 pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080 andl (%eax), %ecx orl $16843009, %ecx ## imm = 0x1010101 movl %ecx, (%eax) popl %ebp ret -- llvm-svn: 133532
* IRgen: Add CGOptions to CGTypes.Daniel Dunbar2011-06-213-4/+8
| | | | llvm-svn: 133530
* ^cat^cast^Fariborz Jahanian2011-06-211-2/+2
| | | | llvm-svn: 133529
* A few tweaks to MaterializeTemporaryExpr suggested by John.Douglas Gregor2011-06-214-10/+3
| | | | llvm-svn: 133528
* Add comment before CheckObjCARCConversion is called onFariborz Jahanian2011-06-211-0/+2
| | | | | | Expr value not getting changed by this call. llvm-svn: 133527
* Switch the order of the notes for the parentheses suggested in the caseChandler Carruth2011-06-211-4/+4
| | | | | | | | of: a + b ? x : y. In our testing of this flag we've yet to hit a single case where the existing precedence was correct, so we should suggest grouping the ?: first. llvm-svn: 133526
* objc-arc: CodeGen part of unbridged cast of CF types.Fariborz Jahanian2011-06-212-8/+47
| | | | | | // rdar://9474349 llvm-svn: 133525
* Fix a crash when a pointer-to-member function is called in the conditionChandler Carruth2011-06-211-1/+1
| | | | | | | expression of '?:'. Add a test case for this pattern, and also test the code that led to the crash in a "working" case as well. llvm-svn: 133523
* Introduce a new AST node describing reference binding to temporaries.Douglas Gregor2011-06-2120-26/+195
| | | | | | | | | | | | | | | | | | | | | | | | | MaterializeTemporaryExpr captures a reference binding to a temporary value, making explicit that the temporary value (a prvalue) needs to be materialized into memory so that its address can be used. The intended AST invariant here is that a reference will always bind to a glvalue, and MaterializeTemporaryExpr will be used to convert prvalues into glvalues for that binding to happen. For example, given const int& r = 1.0; The initializer of "r" will be a MaterializeTemporaryExpr whose subexpression is an implicit conversion from the double literal "1.0" to an integer value. IR generation benefits most from this new node, since it was previously guessing (badly) when to materialize temporaries for the purposes of reference binding. There are likely more refactoring and cleanups we could perform there, but the introduction of MaterializeTemporaryExpr fixes PR9565, a case where IR generation would effectively bind a const reference directly to a bitfield in a struct. Addresses <rdar://problem/9552231>. llvm-svn: 133521
* Make more use of llvm::StringRef in various APIs. In particular, don'tJay Foad2011-06-219-44/+32
| | | | | | use the deprecated forms of llvm::StringMap::GetOrCreateValue(). llvm-svn: 133515
* Fix typo. From Damjan Marion.Joerg Sonnenberger2011-06-211-1/+1
| | | | llvm-svn: 133511
* De-Unicode-ify in comments.NAKAMURA Takumi2011-06-212-4/+4
| | | | llvm-svn: 133501
OpenPOWER on IntegriCloud