summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor fix for clang-completion-mode, from Dve AbrahamsDouglas Gregor2010-12-141-2/+2
| | | | llvm-svn: 121771
* Improve some comments, shrink FunctionType::ExtInfo, and fix a bug foundJohn McCall2010-12-142-7/+16
| | | | | | | by valgrind where we were doing the wrong thing in the presence of invalid exception specs. llvm-svn: 121770
* Fix documentation typo, from nobled.Douglas Gregor2010-12-141-1/+1
| | | | llvm-svn: 121768
* Restore r121752 without modification.John McCall2010-12-1419-367/+347
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-1419-347/+367
| | | | llvm-svn: 121759
* Factor out most of the extra state in a FunctionProtoType into a separateJohn McCall2010-12-1419-367/+347
| | | | | | | class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. llvm-svn: 121752
* Generalize this test to work without instruction names.Dan Gohman2010-12-141-2/+2
| | | | llvm-svn: 121742
* Implement CodeGen support for the may_alias attribute.Dan Gohman2010-12-132-0/+42
| | | | llvm-svn: 121734
* Variadic templates: extend Type, NestedNameSpecifier, TemplateName,Douglas Gregor2010-12-1320-65/+392
| | | | | | | | | | | | | | | | | | | | | | | | and TemplateArgument with an operation that determines whether there are any unexpanded parameter packs within that construct. Use this information to diagnose the appearance of the names of parameter packs that have not been expanded (C++ [temp.variadic]p5). Since this property is checked often (every declaration, ever expression statement, etc.), we extend Type and Expr with a bit storing the result of this computation, rather than walking the AST each time to determine whether any unexpanded parameter packs occur. This commit is deficient in several ways, which will be remedied with future commits: - Expr has a bit to store the presence of an unexpanded parameter pack, but it is never set. - The error messages don't point out where the unexpanded parameter packs were named in the type/expression, but they should. - We don't check for unexpanded parameter packs in all of the places where we should. - Testing is sparse, pending the resolution of the above three issues. llvm-svn: 121724
* Skip ParenType on function instantiations.Abramo Bagnara2010-12-133-3/+13
| | | | llvm-svn: 121720
* Remove a type that got reduced away from this test case but not actually ↵Chandler Carruth2010-12-131-1/+0
| | | | | | deleted. llvm-svn: 121694
* Fix PR8774 by restricting when hasInit returns true. Previously, itChandler Carruth2010-12-132-1/+20
| | | | | | | | | | | | | | would return true if the initializer pointer union had *any* non-null pointer in it, even if the pointer wasn't one that would actually be returned via getInit(). This makes it more accurately model the logic of 'getInit() != NULL'. This still isn't completely satisfying. From a principled stance, I suspect we should make hasInit() and getInit() *always* return false and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat initializers and default arguments as the same thing. llvm-svn: 121692
* Reduce the number of builtin operator overload candidates added in certainChandler Carruth2010-12-131-27/+89
| | | | | | | | | | | | cases. First, omit all builtin overloads when no non-record type is in the set of candidate types. Second, avoid arithmetic type overloads for non-arithmetic or enumeral types (counting vector types as arithmetic due to Clang extensions). When heavily using constructs such as STL's '<<' based stream logging, this can have a significant impact. One logging-heavy test case's compile time dropped by 10% with this. Self-host shows 1-2% improvement in compile time, but that's likely in the noise. llvm-svn: 121665
* Basic, Sema: add support for CUDA launch_bounds attributePeter Collingbourne2010-12-124-0/+55
| | | | llvm-svn: 121654
* Sema: diagnose kernel functions with non-void return typePeter Collingbourne2010-12-123-1/+22
| | | | llvm-svn: 121653
* Move the functionality to mark all vtables of key functions as used withinChandler Carruth2010-12-122-13/+13
| | | | | | | | | | | | | | a translation unit to the ActOnEndOfTranslationUnit function instead of doing it at the start of DefineUsedVTables. The latter is now called *recursively* during template instantiation, which causes an absolutely insane number of walks of every record decl in the translation unit. After this patch, an extremely template instantiation heavy test case's compile time drops by 10x, and we see between 15% and 20% improvement in average compile times across a project. This is just recovering a regression, it doesn't make anything faster than it was several weeks ago. llvm-svn: 121644
* Change MBlaze target to have the same description string as its LLVM equivalent.Wesley Peck2010-12-121-2/+1
| | | | llvm-svn: 121640
* Finish cleaning up the static utility code for adding builtin operator overloadChandler Carruth2010-12-121-62/+65
| | | | | | | candidates. They're now wrapped in nice APIs which hide the tables, etc. Also removes some repetitive code from clients. llvm-svn: 121634
* Clean up the helpers used to compute the usual arithmetic conversions' resultChandler Carruth2010-12-121-67/+56
| | | | | | | | | | | | type. Localize all of the logic within a single function rather than spreading it throughout the class. Also fixes a buglet where we failed to check for a RHS arithmetic type wider than the LHS and return its canonical type. I've yet to produce a test case that breaks because of this, but it was spotted by inspection by folks on the IRC channel and is obviously correct now. llvm-svn: 121633
* Add a comment to a helper function.Chandler Carruth2010-12-121-0/+2
| | | | llvm-svn: 121632
* Sink the logic to suppress builtin operator overloads in the presence ofChandler Carruth2010-12-121-52/+52
| | | | | | | | | | | user-defined operator overloads on the same enumeral types to the one place where it is used. In theory this removes wasted computation from several paths through this code, but I'm not aware of a case where it actually matters. This is mostly for cleanliness. llvm-svn: 121630
* Reorder the cases in the switch to be more logically grouped (to my mind). IfChandler Carruth2010-12-121-34/+34
| | | | | | | others have another ordering they would prefer, I'm all ears, but this one made it much easier for me to find the group of operators I'm interested in. llvm-svn: 121629
* Remove the final goto from this switch making it explict which overload set isChandler Carruth2010-12-121-2/+3
| | | | | | added for binary operator&. llvm-svn: 121628
* Fold away completely identical code with simple fallthrough.Chandler Carruth2010-12-121-7/+2
| | | | llvm-svn: 121627
* Move and copy function calls around to remove the indirection through gotosChandler Carruth2010-12-121-14/+10
| | | | | | from the switch statement. llvm-svn: 121626
* Simplify the flow through the switch by explicitly listing the added overloadsChandler Carruth2010-12-121-13/+7
| | | | | | for a few cases. llvm-svn: 121625
* Fix 80-column violations and reflowing some code to facilitate those fixes.Chandler Carruth2010-12-121-48/+59
| | | | llvm-svn: 121624
* Begin the refactoring of how builtin operators are added to the overloadChandler Carruth2010-12-121-736/+842
| | | | | | | | | | | | | | candidate set. This breaks apart a huge switch + goto system into distinct methods on a class. It also places the current mess of tables and other static state used in the process within that class. This is still a work in progress. I did a few simplifications that jumped out at me as I went, but I plan to iterate on this a bit before it's truly clean. However, this is easily the most invasive chunk. I benchmarked it on all-std-headers.cpp and an internal testcase that has a major hotspot in overload resolution and saw no real performance impact. llvm-svn: 121623
* Enhance my implementation of //rdar ://8747333 in r121597 to allowFariborz Jahanian2010-12-112-20/+44
| | | | | | | | for declaration of property setter/getter in forward class extensions and also skip over propeties which are @dynamic. llvm-svn: 121617
* Improved complex constants evaluation.Abramo Bagnara2010-12-112-2/+112
| | | | llvm-svn: 121616
* Any property declared in a class extension might have userFariborz Jahanian2010-12-103-3/+51
| | | | | | | | | | | declared setter or getter in current class extension or one of the other class extensions. Mark them as synthesized as property will be synthesized when property with same name is seen in the @implementation. This prevents bogus warning about unimplemented methods to be issued for these methods. Fixes // rdar://8747333 llvm-svn: 121597
* Add missing switch case for the quad-register version of the Neon vmul builtin.Bob Wilson2010-12-101-0/+1
| | | | llvm-svn: 121595
* Fix clang crashes on Neon vld[234]_dup intrinsics with 64-bit element types.Bob Wilson2010-12-101-0/+21
| | | | | | The 64-bit element vectors need to be handled as a special case. llvm-svn: 121592
* Introduce ObjCMessageExpr::getReceiverRange() to get the source range of the ↵Argyrios Kyrtzidis2010-12-102-1/+20
| | | | | | receiver. llvm-svn: 121517
* Keep the source location of the selector in ObjCMessageExpr.Argyrios Kyrtzidis2010-12-108-47/+78
| | | | llvm-svn: 121516
* Make RecursiveASTVisitor traverse a ObjCMethodDecl.Argyrios Kyrtzidis2010-12-101-1/+3
| | | | llvm-svn: 121515
* Do not assert on shifts of Neon polynomial types.Bob Wilson2010-12-101-4/+2
| | | | | | | | Most Neon shift intrinsics do not have variants for polynomial types, but vsri_n and vsli_n do support them, and we need to properly range-check the shift immediates for them. llvm-svn: 121509
* Silence a few more uninitialized-value warningsDouglas Gregor2010-12-101-8/+8
| | | | llvm-svn: 121505
* Silence a GCC unitialized-value warningDouglas Gregor2010-12-101-1/+1
| | | | llvm-svn: 121504
* Replace two QualType::getTypePtrOrNull() calls withDouglas Gregor2010-12-102-2/+2
| | | | | | | | | | | QualType::getTypePtr(). It turns out that cast_or_null/dyn_cast_or_null don't actually use simplify_type, so they're guaranteed to operator on non-NULL QualType or CanQualType objects. Good for a 0.6% win on 403.gcc's combine.c with -emit-llvm. llvm-svn: 121495
* Do not substitute template types if template has dependent contextPeter Collingbourne2010-12-102-2/+20
| | | | | | | | | We should not substitute template types if the template has a dependent context because the template argument stack is not yet fully formed. Instead, defer substitution until the template has a non-dependent context (i.e. instantiation of an outer template). llvm-svn: 121491
* Fix a compiler warning.Fariborz Jahanian2010-12-101-1/+2
| | | | llvm-svn: 121490
* Eliminate the branching in QualType::getTypePtr() by providing aDouglas Gregor2010-12-108-27/+73
| | | | | | | | | | | | | | | | | | | | common base for ExtQuals and Type that stores the underlying type pointer. This results in a 2% performance win for -emit-llvm on a typical C file, with 1% memory growth in the AST. Note that there is an API change in this optimization: QualType::getTypePtr() can no longer be invoked on a NULL QualType. If the QualType might be NULL, use QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in the code base and changed the appropriate uses over to getTypePtrOrNull(). A future optimization opportunity would be to distinguish between cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we could use getTypePtr() rather than getTypePtrOrNull(), to take another branch out of the cast/dyn_cast implementation. llvm-svn: 121489
* Added ParenType type node.Abramo Bagnara2010-12-1029-39/+329
| | | | llvm-svn: 121488
* Silence GCC warning about comparisons between enumerators of different typesDouglas Gregor2010-12-101-1/+1
| | | | llvm-svn: 121486
* Another dummy commit to check GIT mirroringAnton Korobeynikov2010-12-101-1/+0
| | | | llvm-svn: 121482
* It's kindof silly that ExtQuals has an ASTContext&, and we can use thatJohn McCall2010-12-1018-241/+219
| | | | | | | | | | space better. Remove this reference. To make that work, change some APIs (most importantly, getDesugaredType()) to take an ASTContext& if they need to return a QualType. Simultaneously, diminish the need to return a QualType by introducing some useful APIs on SplitQualType, which is just a std::pair<const Type *, Qualifiers>. llvm-svn: 121478
* Update ExtQuals comment to reflect the expansion of the fast qualifiersDouglas Gregor2010-12-101-9/+5
| | | | llvm-svn: 121477
* Optimize memory usage of FunctionProtoType on MSVC.John McCall2010-12-101-2/+2
| | | | llvm-svn: 121475
* Move the "volatile" bit into QualType's "fast" qualifier set,Douglas Gregor2010-12-103-21/+7
| | | | | | | | increasing the required type alignment from 8 to 16. This provides a 2.5% speedup for -fsyntax-only on a token-cached Cocoa.h, while only increasing memory consumption in the ASTContext by 0.8%. llvm-svn: 121474
OpenPOWER on IntegriCloud