summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Analyzer: Store BugReports directly in a ilist instead of adding another ↵Benjamin Kramer2012-04-014-18/+13
| | | | | | layer of inderection with std::list llvm-svn: 153847
* Fixed MacroInfo definition range for function like macros with empty body.Abramo Bagnara2012-03-311-3/+2
| | | | llvm-svn: 153819
* [arcmt] When fixing the "unassigned init call" ARC error, make sureArgyrios Kyrtzidis2012-03-311-1/+5
| | | | | | | | to do a nil check for the result of the call. rdar://10950973 llvm-svn: 153793
* modern objective-c translator: writing containerFariborz Jahanian2012-03-301-1/+109
| | | | | | literals. wip. // rdar://10803676 llvm-svn: 153784
* Fix a pair of invalidation bugs when emitting protocol definitionsJohn McCall2012-03-301-2/+6
| | | | | | | in the fragile and non-fragile Mac ObjC runtimes. No useful test case. Fixes rdar://problem/11072576. llvm-svn: 153778
* Make sure we unique static-local decls across multiple emissions ofJohn McCall2012-03-303-51/+76
| | | | | | | | the function body, but do so in a way that doesn't make any assumptions about the static local actually having a proper, unique mangling, since apparently we don't do that correctly at all. llvm-svn: 153776
* PR10217: Provide diagnostics explaining why an implicitly-deleted specialRichard Smith2012-03-305-129/+230
| | | | | | member function is deleted. llvm-svn: 153773
* Revert r153723, and its follow-ups r153728 and r153733.Chandler Carruth2012-03-308-175/+108
| | | | | | | | | | | | | | | | These patches cause us to miscompile and/or reject code with static function-local variables in an extern-C context. Previously, we were papering over this as long as the variables are within the same translation unit, and had not seen any failures in the wild. We still need a proper fix, which involves mangling static locals inside of an extern-C block (as GCC already does), but this patch causes pretty widespread regressions. Firefox, and many other applications no longer build. Lots of test cases have been posted to the list in response to this commit, so there should be no problem reproducing the issues. llvm-svn: 153768
* modern objective-c translator: writing numericFariborz Jahanian2012-03-301-0/+104
| | | | | | literals. // rdar://10803676 llvm-svn: 153756
* If we encounter a friend class template for which we cannot resolveDouglas Gregor2012-03-301-2/+6
| | | | | | | | | | | | | the nested-name-specifier (e.g., because it is dependent), do not error even though we can't represent it in the AST at this point. This is a horrible, horrible hack. The actual feature we still need to implement (for C++98!) is covered by PR12292. However, we used to silently accept this code, so when we recently started rejecting it we caused some regressions (e.g., <rdar://problem/11147355>). This hack brings us back to the passable-but-not-good state we had previously. llvm-svn: 153752
* Do the static-locals thing properly in the face of unions andJohn McCall2012-03-308-88/+119
| | | | | | other things which might mess with the variable's type. llvm-svn: 153733
* Correctly check argument types for some vector macros in smmintrin.h. Put ↵Craig Topper2012-03-302-17/+40
| | | | | | parentheses around uses of vector macro arguments. llvm-svn: 153732
* [analyzer]Malloc,RetainRelease: Allow pointer to escape via NSMapInsert.Anna Zaks2012-03-303-0/+16
| | | | | | | | Fixes a false positive (radar://11152419). The current solution of adding the info into 3 places is quite ugly. Pending a generic pointer escapes callback. llvm-svn: 153731
* [analyzer] Do not inline functions which previously reached max blockAnna Zaks2012-03-303-4/+15
| | | | | | | | | | | | | | | count. This is an optimization for "retry without inlining" option. Here, if we failed to inline a function due to reaching the basic block max count, we are going to store this information and not try to inline it again in the translation unit. This can be viewed as a function summary. On sqlite, with this optimization, we are 30% faster then before and cover 10% more basic blocks (partially because the number of times we reach timeout is decreased by 20%). llvm-svn: 153730
* Handle placeholder expressions in an ObjC for-collection loop.John McCall2012-03-301-3/+11
| | | | | | | The way we handle this implicitly removes the ability to use property l-values in this position, but that's really okay. llvm-svn: 153729
* ItaniumCXXABI.cpp: Don't use nullptr. Clang source tree should be ↵NAKAMURA Takumi2012-03-301-1/+1
| | | | | | pre-c++11-compatible. llvm-svn: 153728
* Revert previous commit changing location information to see if thisEric Christopher2012-03-302-6/+7
| | | | | | is causing the gdb test failures on the bots. llvm-svn: 153727
* Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.Craig Topper2012-03-301-0/+6
| | | | llvm-svn: 153726
* Forbid the block and lambda copy-capture of __autoreleasing variablesJohn McCall2012-03-301-0/+21
| | | | | | in ARC, under the usual reasoning limiting the use of __autoreleasing. llvm-svn: 153725
* Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.Craig Topper2012-03-301-1/+1
| | | | llvm-svn: 153724
* When emitting a static local variable in C++, handleJohn McCall2012-03-302-31/+67
| | | | | | | | | | | | | | | the case that the variable already exists. Partly this is just protection against people making crazy declarations with custom asm labels or extern "C" names that intentionally collide with the manglings of such variables, but the main reason is that we can actually emit a static local variable twice with the requirement that it match up. There may be other cases with (e.g.) the various nested functions, but the main exemplar is with constructor variants, where we can be forced into double-emitting the function body under certain circumstances like (currently) the presence of virtual bases. llvm-svn: 153723
* Add a note about a missing optimization in the case of virtualJohn McCall2012-03-301-0/+3
| | | | | | inheritance. llvm-svn: 153722
* Missing piece of r153720: make sure the vtable pointer is handled correctly.Eli Friedman2012-03-301-1/+1
| | | | llvm-svn: 153721
* ConstStructBuilder: fix offset math for base classes so it works correctly ↵Eli Friedman2012-03-301-7/+3
| | | | | | in general. Found by inspection. llvm-svn: 153720
* Make sure we perform the relevant implied conversions correctly for ObjC ↵Eli Friedman2012-03-301-18/+19
| | | | | | methods with related result types. PR12384. llvm-svn: 153716
* Change location information for synthesized properties to be at theEric Christopher2012-03-302-7/+6
| | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart. Fixes rdar://11026482 llvm-svn: 153714
* The UTF16 string referenced by a CFString should go into the __TEXT,__ustringBill Wendling2012-03-301-26/+24
| | | | | | | | | | | | | section. A 'normal' string will go into the __TEXT,__const section, but this isn't good for UTF16 strings. The __ustring section allows for coalescing, among other niceties (such as allowing the linker to easily split up strings). Instead of outputting the UTF16 string as a series of bytes, output it as a series of shorts. The back-end will then nicely place the UTF16 string into the correct section, because it's a mensch. <rdar://problem/10655949> llvm-svn: 153710
* Add info to ObjCPropertyRefExpr to indicate whether the dot syntax propertyArgyrios Kyrtzidis2012-03-304-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | reference is going to message the setter, the getter, or both. Having this info on the ObjCPropertyRefExpr node makes it easier for AST clients (like libclang) to reason about the meaning of the property reference. [AST/Sema] -Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info -Have ObjCPropertyOpBuilder set the info appropriately. [libclang] -When there is an implicit property reference (property syntax using methods) have clang_getCursorReferenced return a cursor for the method. If the property reference is going to result in messaging both the getter and the setter choose to return a cursor for the setter because it is less obvious from source inspection that the setter is getting called. The general idea has the seal of approval by John. rdar://11151621 llvm-svn: 153709
* Extend -Wc++11-narrowing to cover converted constant expressions as well as ↵Eli Friedman2012-03-291-9/+6
| | | | | | braced-initializers. <rdar://problem/11121178>. llvm-svn: 153703
* Fix whitespace.Bill Wendling2012-03-291-6/+5
| | | | llvm-svn: 153698
* ARM backend knows about cortex-m4. The front end should too.Jim Grosbach2012-03-293-0/+3
| | | | llvm-svn: 153678
* modern objc translator: avoid some duplicate declarations.Fariborz Jahanian2012-03-291-3/+4
| | | | llvm-svn: 153674
* Refactor special member function deletion. No functionality change.Richard Smith2012-03-291-63/+9
| | | | llvm-svn: 153673
* Call out to GCC-compatible runtime functions for atomic ops that we can't useDavid Chisnall2012-03-291-34/+61
| | | | | | | | | | | | | | LLVM intrinsics for. I have an implementation of these functions, which wants to go in a libgcc_s equivalent in compiler-rt. It's currently here: http://people.freebsd.org/~theraven/atomic.c It will be committed to compiler-rt as soon as I work out where would be a sensible place to put it... llvm-svn: 153666
* Pass parameters in the correct order when assembling an AtomicExpr.David Chisnall2012-03-291-1/+1
| | | | llvm-svn: 153665
* modern objective-c translator: fix up assortment ofFariborz Jahanian2012-03-291-10/+20
| | | | | | | visibility directives for a variety of exported meta-data symbols. // rdar://11144048 llvm-svn: 153663
* Revert r153613 as it's causing large compile-time regressions on the nightly ↵Chad Rosier2012-03-2913-205/+126
| | | | | | testers. llvm-svn: 153660
* Go back to using just the selector name for the getter and setterEric Christopher2012-03-291-8/+13
| | | | | | | | in the property debug info. Any more isn't necessary after all. rdar://11144023 llvm-svn: 153659
* Tidy.Eric Christopher2012-03-291-13/+19
| | | | llvm-svn: 153658
* Make ModuleMapParser own its TargetInfo, so it doesn't get leaked.Benjamin Kramer2012-03-291-2/+2
| | | | llvm-svn: 153648
* Add support for objc property decls according to the page at:Eric Christopher2012-03-291-17/+22
| | | | | | | | | | | http://llvm.org/docs/SourceLevelDebugging.html#objcproperty including type and DECL. Expand the getter and setter names into the fully qualified names. rdar://11144023 llvm-svn: 153640
* unwind.h fix for -fvisibility=hidden users. This fixes firefox build in a systemRafael Espindola2012-03-291-1/+13
| | | | | | | with libunwind installed. Patch by Jeffrey Yasskin! llvm-svn: 153633
* Reject 'template<typename...Ts> void f(Ts ...(x));'. Add a special-caseRichard Smith2012-03-291-11/+52
| | | | | | | diagnostic and a fix-it to explain to the user where the ellipsis is supposed to go. llvm-svn: 153622
* [arcmt] Fix a bug where a property in a class extension, that did not existArgyrios Kyrtzidis2012-03-291-3/+8
| | | | | | | | | in the interface, got its attribute rewritten twice, resulting in 'weakweak' or 'strongstrong'. rdar://11047179 llvm-svn: 153621
* Define __LITTLE_ENDIAN__ for le32, since "le" stands for little endian.Jan Wen Voung2012-03-291-0/+1
| | | | | | Add a test for this too. llvm-svn: 153616
* When we can't prove that the target of an aggregate copy isJohn McCall2012-03-2813-126/+205
| | | | | | | a complete object, the memcpy needs to use the data size of the structure instead of its sizeof() value. Fixes PR12204. llvm-svn: 153613
* [analyzer] Enable retry exhausted without inlining by default.Anna Zaks2012-03-284-8/+8
| | | | llvm-svn: 153591
* Fix the type of wchar_t on Solaris.David Chisnall2012-03-281-1/+1
| | | | | | Patch by Dmitri Shubin! llvm-svn: 153585
* objective-c: Improve diagnostics andFariborz Jahanian2012-03-282-10/+16
| | | | | | | provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 llvm-svn: 153584
* [analyser] Stats checker: do not mark a node as exhausted if we willAnna Zaks2012-03-282-26/+20
| | | | | | | | retry without inlining. (+ other minor cleanups) llvm-svn: 153581
OpenPOWER on IntegriCloud