summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Move CharacterLiteral, FloatingLiteral and UnaryExprOrTypeTraitExpr flags ↵Benjamin Kramer2012-02-262-30/+63
| | | | | | | | | over into Stmt. Apply the inheritance-padding trick to FloatingLiteral. Shrinks CharacterLiteral from 32 to 24 bytes and the other two from 40 to 32 bytes (x86_64). llvm-svn: 151500
* Make clever use of padding to shrink IntegerLiterals.Benjamin Kramer2012-02-261-7/+4
| | | | | | | Inheritance allows us to use padding across classes. 40 -> 32 bytes on x86_64. llvm-svn: 151499
* Bit pack StringLiteral.Benjamin Kramer2012-02-261-3/+3
| | | | | | 48 -> 40 bytes on x86_64. llvm-svn: 151498
* Reduce padding in MemberExpr.Benjamin Kramer2012-02-261-6/+6
| | | | | | 56 -> 48 bytes on x86_64. llvm-svn: 151497
* CompoundLiteralExpr: Pair a bool with a pointer.Benjamin Kramer2012-02-261-7/+11
| | | | | | 48 -> 40 bytes on x86_64. llvm-svn: 151496
* Shuffle members of DesignatedInitExpr to avoid padding.Benjamin Kramer2012-02-261-5/+5
| | | | | | 40 -> 32 bytes on x86_64. llvm-svn: 151495
* Bit pack ExtProtoInfo.Benjamin Kramer2012-02-261-5/+5
| | | | llvm-svn: 151494
* Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit ↵Benjamin Kramer2012-02-262-1/+5
| | | | | | this into every TU that includes SourceLocation.h. llvm-svn: 151493
* Okay, makes sense to change all the occurences to match clang.EXE.Benjamin Kramer2012-02-261-3/+3
| | | | llvm-svn: 151491
* Allow any file extension for the clang binary in the linux-header-search test.Benjamin Kramer2012-02-261-1/+1
| | | | | | Turns out this can be .exe or .EXE, depending on the build system. llvm-svn: 151490
* Don't assert when trying to diagnose why a class with a constructor template isRichard Smith2012-02-263-9/+33
| | | | | | non-trivial. llvm-svn: 151486
* Add the critical crtbegin.o files necessary for any of the tests inChandler Carruth2012-02-264-0/+0
| | | | | | r151482 and r151484 to work. Sorry about the fallout... llvm-svn: 151485
* A follow-up to r151482 which added support for powerpc and powerpc64Chandler Carruth2012-02-262-0/+68
| | | | | | | | | | | | | | | | | Debian multiarch libraries, this should in theory add support for those platform's header search rules. I don't have a system to check this with, so review appreciated. I've added the corresponding tests referring to the debian multiarch tree. We are starting to have a relatively completely tested Linux platform for header search and library search, with several interesting peculiarities. We should point people at the debian_multiarch_tree when suggesting new tests. Folks with Debian systems that can check this for correctness, it would be much appreciated. The missing chunks I know of are testing bi-arch peudo-cross-compiling toolchains betwen 32-bit and 64-bit variants of platforms, and the MIPS and ARM Debian toolchains. llvm-svn: 151484
* Ensure that we delete destructors in the right cases. Specifically:Richard Smith2012-02-264-105/+203
| | | | | | | | | | | | | | - variant members with nontrivial destructors make the containing class's destructor deleted - check for a virtual destructor after checking for overridden methods in the base class(es) - check for an inaccessible operator delete for a class with a virtual destructor. Do not try to call an anonymous union field's destructor from the destructor of the containing class. llvm-svn: 151483
* Add support for PPC and PPC64 multiarch toolchains on Debain.Chandler Carruth2012-02-2623-0/+60
| | | | | | | | | | | | | | | | | Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added 64-bit support. I just added one other place where powerpc64-linux-gnu was missing (we only had powerpc64-unknown-linux-gnu). I've also added a tree to test out the debian multiarch stuff. I don't use debian regularly, so I'm not certain this is entirely accurate. If anyone wants to check it against a debian system and fix any inaccuracies, fire away. This way at least folks can see how this is *supposed* to be tested. It'd be particularly good to get the Debian MIPS toolchains tested in this way. llvm-svn: 151482
* Make sure we don't try to produce a definition of an implicitly-deleted functionRichard Smith2012-02-263-13/+20
| | | | llvm-svn: 151478
* Update release notes and language extensions pages to note that support forRichard Smith2012-02-262-4/+1
| | | | | | generalized initializers is available. llvm-svn: 151477
* Special members which are defaulted or deleted on their first declaration areRichard Smith2012-02-266-24/+147
| | | | | | | | | | | | | trivial if the implicit declaration would be. Don't forget to set the Trivial flag on the special member as well as on the class. It doesn't seem ideal that we have two separate mechanisms for storing this information, but this patch does not attempt to address that. This leaves us in an interesting position where the has_trivial_X trait for a class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'. This seems to be what the standard requires. llvm-svn: 151465
* Revert r151460 as it is not enough to address the issue.Argyrios Kyrtzidis2012-02-252-2061/+38
| | | | | | | | | | | Original log: When evaluating integer expressions handle logical operators outside VisitBinaryOperator() to reduce stack pressure for source with huge number of logical operators. Fixes rdar://10913206. llvm-svn: 151464
* Richard Smith pointed out that there already is a proposal for init list ↵Sebastian Redl2012-02-252-12/+21
| | | | | | mangling. llvm-svn: 151462
* When evaluating integer expressions handle logical operators outsideArgyrios Kyrtzidis2012-02-252-34/+2057
| | | | | | | | | VisitBinaryOperator() to reduce stack pressure for source with huge number of logical operators. Fixes rdar://10913206. llvm-svn: 151460
* Initializer lists are now supported.Sebastian Redl2012-02-253-2/+11
| | | | llvm-svn: 151458
* CodeGen support for global variables of type std::initializer_list<X>.Sebastian Redl2012-02-255-18/+157
| | | | | | | | | | | | | This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! llvm-svn: 151457
* Fix crashers on unexpected std::initializer_list layouts. Found by inspection.Sebastian Redl2012-02-251-0/+4
| | | | llvm-svn: 151456
* Better mangling for new-expressions. Also, although we can't mangle ↵Sebastian Redl2012-02-252-4/+75
| | | | | | arbitrary initializer lists yet (we will need this), turn the crash into a controlled error. llvm-svn: 151455
* Temporarily revert r151288:Chad Rosier2012-02-251-2/+3
| | | | | | ARM: enable the integrated assembler by default for Darwin. llvm-svn: 151454
* CMake: install libclang.dll to $CMAKE_INSTALL_PREFIX/bin.NAKAMURA Takumi2012-02-251-1/+2
| | | | | | Patch by Joe Groff. llvm-svn: 151448
* ArrayRef'ize various functions in the AST/Parser/Sema.Ahmed Charles2012-02-2514-220/+236
| | | | llvm-svn: 151447
* Accept __has_feature(__feature__) as a synonym for __has_feature(feature) (andRichard Smith2012-02-255-4/+29
| | | | | | likewise for __has_extension). Patch by Jonathan Sauer! llvm-svn: 151445
* Fix r151443 to only apply C++11's exception for non-static data member accessRichard Smith2012-02-253-5/+28
| | | | | | | in cases where we would otherwise disallow the access, and add a -Wc++98-compat diagnostic for this C++11 feature. llvm-svn: 151444
* PR11956: C++11's special exception for accessing non-static data members fromRichard Smith2012-02-252-16/+24
| | | | | | unevaluated operands applies within member functions, too. llvm-svn: 151443
* Fix assertion (too few Diag arguments) when diagnosing a deleted operator deleteRichard Smith2012-02-252-1/+7
| | | | llvm-svn: 151442
* Teach CXXRecordDecl::hasIrrelevantDestructor to check the base classes andRichard Smith2012-02-258-6/+98
| | | | | | | | | data members for deleted or user-provided destructors. Now it's computed in advance, serialize it, and in passing fix all the other record DefinitionData flags whose serialization was missing. llvm-svn: 151441
* Fix a regression from r151117: ADL requires that we attempt to complete anyRichard Smith2012-02-254-8/+36
| | | | | | | | associated classes, since it can find friend functions declared within them, but overload resolution does not otherwise require argument types to be complete. llvm-svn: 151434
* Prevent llvm.lifetime intrinsics from being emitted at -O0.Chad Rosier2012-02-251-1/+5
| | | | | | rdar://10921594 llvm-svn: 151430
* Work-in-progress for lambda conversion-to-block operator. Still need to ↵Eli Friedman2012-02-255-32/+96
| | | | | | implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure). llvm-svn: 151428
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-2514-95/+18
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 llvm-svn: 151427
* RetainCountChecker: don't adjust the retain count when analyzing a ↵Ted Kremenek2012-02-252-0/+29
| | | | | | ReturnStmt unless we are in the top-level call frame. We can do more later, but this makes the checker self-consistent (and fixes a crash). llvm-svn: 151426
* [arcmt] GC migrator: don't try to remove redundant __strong, it doesArgyrios Kyrtzidis2012-02-257-43/+16
| | | | | | | | more harm than good. Fixes rdar://10522805&10521433 llvm-svn: 151424
* Improve the diagnostic in ARC mode when a conditional with an Objective-C ↵Eli Friedman2012-02-253-0/+24
| | | | | | type and void* is used. <rdar://problem/10486347>. llvm-svn: 151416
* Trying to increase my Ohloh ranking with trivial tweaksDouglas Gregor2012-02-251-6/+2
| | | | llvm-svn: 151414
* Bugfix: bogus warning -- "invalid use of non-static data member",DeLesley Hutchins2012-02-253-1/+27
| | | | | | | when a class is forward declared, and the reference to the data member in question does not occur within a method body. llvm-svn: 151413
* Simplify check per Eli's commentDouglas Gregor2012-02-251-4/+1
| | | | llvm-svn: 151412
* Add test for C++ DR899.Douglas Gregor2012-02-241-0/+22
| | | | llvm-svn: 151411
* [analyzer] Malloc: reason about the ObjC messages and C++.Anna Zaks2012-02-243-79/+177
| | | | | | | | | | | Assume none of the ObjC messages defined in system headers free memory, except for the ones containing 'freeWhenDone' selector. Currently, just assume that the region escapes to the messages with 'freeWhenDone' (ideally, we want to treat it as 'free()'). For now, always assume that regions escape when passed to C++ methods. llvm-svn: 151410
* Implement C++11 [over.match.copy]p1b2, which allows the use ofDouglas Gregor2012-02-248-43/+97
| | | | | | | | | | | explicit conversion functions to initialize the argument to a copy/move constructor that itself is the subject of direct initialization. Since we don't have that much context in overload resolution, we end up threading more flags :(. Fixes <rdar://problem/10903741> / PR10456. llvm-svn: 151409
* Fix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.Eli Friedman2012-02-242-3/+12
| | | | llvm-svn: 151407
* Remove FIXME: as Eli points out, the behavior here is now correct.Richard Smith2012-02-241-5/+3
| | | | llvm-svn: 151405
* For the purposes of building LLVM types, a forward-declaredDouglas Gregor2012-02-242-1/+17
| | | | | | | enumeration type with a fixed underlying type is complete. Fixes <rdar://problem/10916155>. llvm-svn: 151403
* Back out __decltype warning from r151377: we should either warn on all the GNURichard Smith2012-02-243-7/+4
| | | | | | __keywords or none of them. llvm-svn: 151401
OpenPOWER on IntegriCloud