- Dec 15, 2010
-
-
Douglas Gregor authored
Move the work-in-progress implementation of variadic templates to its own file in Sema. No functionality change. llvm-svn: 121869
-
John McCall authored
come first. llvm-svn: 121866
-
Douglas Gregor authored
parameters. Fixes <rdar://problem/8769025>. llvm-svn: 121864
-
Peter Collingbourne authored
BuildExpressionFromIntegralTemplateArgument can produce malformed IntegerLiterals with an EnumType if the template parameter type is an EnumType. This breaks the AST printer which expects all IntegerLiterals to have a plain integer type. Instead, give the IntegerLiteral the enum's promotion type and wrap in an implicit cast to the EnumType. llvm-svn: 121862
-
John McCall authored
future task of performing contextual conversion to size_t in a VLA size expression. :) llvm-svn: 121836
-
John McCall authored
within the class. Teach IR gen to look for function definitions in record lexical contexts when deciding whether to emit a function whose address was taken. Fixes PR8789. llvm-svn: 121833
-
Douglas Gregor authored
whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. llvm-svn: 121831
-
- Dec 14, 2010
-
-
Abramo Bagnara authored
llvm-svn: 121795
-
John McCall authored
the basic casting logic to insert intermediate casts and preserve the exact complex-cast design. Fixes a crash in the test suite. llvm-svn: 121776
-
John McCall authored
by valgrind where we were doing the wrong thing in the presence of invalid exception specs. llvm-svn: 121770
-
John McCall authored
llvm-svn: 121763
-
John McCall authored
llvm-svn: 121759
-
John McCall authored
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
-
- Dec 13, 2010
-
-
Douglas Gregor authored
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
-
Abramo Bagnara authored
llvm-svn: 121720
-
Chandler Carruth authored
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
-
Peter Collingbourne authored
llvm-svn: 121654
-
Peter Collingbourne authored
llvm-svn: 121653
-
- Dec 12, 2010
-
-
Chandler Carruth authored
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
-
Chandler Carruth authored
candidates. They're now wrapped in nice APIs which hide the tables, etc. Also removes some repetitive code from clients. llvm-svn: 121634
-
Chandler Carruth authored
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
-
Chandler Carruth authored
llvm-svn: 121632
-
Chandler Carruth authored
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
-
Chandler Carruth authored
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
-
Chandler Carruth authored
added for binary operator&. llvm-svn: 121628
-
Chandler Carruth authored
llvm-svn: 121627
-
Chandler Carruth authored
from the switch statement. llvm-svn: 121626
-
Chandler Carruth authored
for a few cases. llvm-svn: 121625
-
Chandler Carruth authored
llvm-svn: 121624
-
Chandler Carruth authored
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
-
- Dec 11, 2010
-
-
Fariborz Jahanian authored
for declaration of property setter/getter in forward class extensions and also skip over propeties which are @dynamic. llvm-svn: 121617
-
Fariborz Jahanian authored
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
-
- Dec 10, 2010
-
-
Argyrios Kyrtzidis authored
llvm-svn: 121516
-
Bob Wilson authored
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
-
Douglas Gregor authored
llvm-svn: 121505
-
Peter Collingbourne authored
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
-
Fariborz Jahanian authored
llvm-svn: 121490
-
Abramo Bagnara authored
llvm-svn: 121488
-
John McCall authored
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
-
Douglas Gregor authored
llvm-svn: 121473
-