- Jan 29, 2009
-
-
Douglas Gregor authored
Eliminate infinite looping in a wacky case with designated initializers. Simplifies (somewhat) the actually checking of the initializer expression following the designators llvm-svn: 63257
-
Steve Naroff authored
The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert. The plan is to eventually deprecate both of these functions. For now, I'm focused on performance. llvm-svn: 63256
-
Douglas Gregor authored
llvm-svn: 63254
-
Douglas Gregor authored
initializers. - We now initialize unions properly when a member other than the first is named by a designated initializer. - We now provide proper semantic analysis and code generation for GNU array-range designators *except* that side effects will occur more than once. We warn about this. llvm-svn: 63253
-
- Jan 28, 2009
-
-
Douglas Gregor authored
The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) llvm-svn: 63242
-
Steve Naroff authored
Since it doesn't return a bool, is shouldn't be prefixed with 'is'. llvm-svn: 63226
-
Sebastian Redl authored
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. llvm-svn: 63215
-
Douglas Gregor authored
rules are slightly different than in C, and now we handle both dialects properly. llvm-svn: 63211
-
Steve Naroff authored
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. llvm-svn: 63210
-
Steve Naroff authored
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. llvm-svn: 63208
-
Ted Kremenek authored
Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. llvm-svn: 63175
-
Steve Naroff authored
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w llvm-svn: 63153
-
Sebastian Redl authored
llvm-svn: 63150
-
- Jan 27, 2009
-
-
Anders Carlsson authored
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 llvm-svn: 63127
-
Chris Lattner authored
.def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
-
- Jan 26, 2009
-
-
Douglas Gregor authored
- When it's safe, ActionResult uses the low bit of the pointer for the "invalid" flag rather than a separate "bool" value. This keeps GCC from generating some truly awful code, for a > 3x speedup in the result-passing microbenchmark. - When DISABLE_SMART_POINTERS is defined, store an ActionResult within ASTOwningResult rather than an ASTOwningPtr. Brings the performance benefits of the above to smart pointers with DISABLE_SMART_POINTERS defined. Sadly, these micro-benchmark performance improvements don't seem to make much of a difference on Cocoa.h right now. However, they're harmless and might help with future optimizations. llvm-svn: 63061
-
Chris Lattner authored
optimize it to use the LiteralData when possible. llvm-svn: 63060
-
Sebastian Redl authored
llvm-svn: 63055
-
Sebastian Redl authored
llvm-svn: 63032
-
Eli Friedman authored
CompoundLiteralExpr so that there aren't any null pointers in the AST. llvm-svn: 62981
-
- Jan 25, 2009
-
-
Sebastian Redl authored
llvm-svn: 62971
-
Eli Friedman authored
llvm-svn: 62947
-
Eli Friedman authored
think this has any significant effects at the moment, but it could matter if we start constant-folding statement expressions like gcc does. llvm-svn: 62943
-
- Jan 24, 2009
-
-
Chris Lattner authored
llvm-svn: 62936
-
Sebastian Redl authored
Add serialization support for ReferenceType. llvm-svn: 62934
-
Chris Lattner authored
different than those for sizeof. Reject alignof(bitfield) like gcc does. llvm-svn: 62928
-
Chris Lattner authored
llvm-svn: 62927
-
Chris Lattner authored
llvm-svn: 62926
-
Anders Carlsson authored
llvm-svn: 62922
-
- Jan 23, 2009
-
-
Douglas Gregor authored
llvm-svn: 62884
-
Douglas Gregor authored
Make sure that we know a call is invalid if we dropped arguments. llvm-svn: 62882
-
Douglas Gregor authored
llvm-svn: 62876
-
-
Douglas Gregor authored
Make sure all of the isUnsigned flags line up when comparing initializer values, to really really fix PR clang/3377 llvm-svn: 62858
-
Douglas Gregor authored
Fixes PR clang/3377 llvm-svn: 62851
-
Douglas Gregor authored
special action, inside function prototype scope. This avoids confusion when we try to inject these parameters into the scope of the function body before the function itself has been added to the surrounding scope. Fixes <rdar://problem/6097326>. llvm-svn: 62849
-
Douglas Gregor authored
extension. Addresses clang PR/3371. llvm-svn: 62823
-
Douglas Gregor authored
initializers, so that we are within the appropriate subobject after we've processed a multi-designator designation. We're matching GCC and EDG's behavior on all examples I've found thus far. *Huge* thanks to Eli Friedman for pointing out my fundamental misunderstanding of "current object" in the C99 spec. llvm-svn: 62812
-
- Jan 22, 2009
-
-
-
Douglas Gregor authored
llvm-svn: 62766
-