- Feb 19, 2009
-
-
Mike Stump authored
appear to be constant. I'll probably redo this and throw it all away later once we have codegen for BlockDeclRefExprs. llvm-svn: 65070
-
Daniel Dunbar authored
only occur for pointer types; they are also possible for integer types now. - No intended functionality change, IntExprEvaluate doesn't return LValue results yet. llvm-svn: 65066
-
Mike Stump authored
The size calculation is improved. llvm-svn: 64994
-
- Feb 17, 2009
-
-
Daniel Dunbar authored
IRgen no longer relies on isConstantInitializer, instead we just try to emit the constant. If that fails then in C we emit an error unsupported (this occurs when Sema accepted something that it doesn't know how to fold, and IRgen doesn't know how to emit) and in C++ we emit a guarded initializer. This ends up handling a few more cases, because IRgen was actually able to emit some of the constants Sema accepts but can't Evaluate(). For example, PR3398. llvm-svn: 64780
-
- Feb 14, 2009
-
-
Mike Stump authored
starting to work for blocks. llvm-svn: 64570
-
Douglas Gregor authored
about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. llvm-svn: 64561
-
- Feb 12, 2009
-
-
Anders Carlsson authored
llvm-svn: 64387
-
- Feb 11, 2009
-
-
Douglas Gregor authored
llvm-svn: 64306
-
- Feb 01, 2009
-
-
Eli Friedman authored
constants. llvm-svn: 63491
-
- Jan 30, 2009
-
-
Anders Carlsson authored
llvm-svn: 63379
-
- Jan 29, 2009
-
-
Douglas Gregor authored
represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. llvm-svn: 63317
-
Douglas Gregor authored
have to try to guess which member is being initialized. llvm-svn: 63315
-
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
-
-
Daniel Dunbar authored
- Merged into single ComplexEvaluator, these share too much logic to be worth splitting for float/int (IMHO). Will split on request. llvm-svn: 63248
-
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
-
- Jan 25, 2009
-
-
Eli Friedman authored
llvm-svn: 62950
-
Eli Friedman authored
__builtin___CFStringMakeConstantString. (We get into trouble in GenerateStaticBlockVarDecl if the constant folder isn't accurate.) llvm-svn: 62949
-
Eli Friedman authored
constant. llvm-svn: 62948
-
- Jan 24, 2009
-
-
Chris Lattner authored
llvm-svn: 62930
-
- Jan 18, 2009
-
-
Nate Begeman authored
llvm-svn: 62438
-
- Jan 17, 2009
-
-
Nuno Lopes authored
llvm-svn: 62387
-
- Jan 12, 2009
-
-
Daniel Dunbar authored
llvm-svn: 62101
-
- Jan 06, 2009
-
-
Douglas Gregor authored
information for declarations that were referenced via a qualified-id, e.g., N::C::value. We keep track of the location of the start of the nested-name-specifier. Note that the difference between QualifiedDeclRefExpr and DeclRefExpr does have an effect on the semantics of function calls in two ways: 1) The use of a qualified-id instead of an unqualified-id suppresses argument-dependent lookup 2) If the name refers to a virtual function, the qualified-id version will call the function determined statically while the unqualified-id version will call the function determined dynamically (by looking up the appropriate function in the vtable). Neither of these features is implemented yet, but we do print out qualified names for QualifiedDeclRefExprs as part of the AST printing. llvm-svn: 61789
-
- Dec 21, 2008
-
-
Douglas Gregor authored
which can refer to static data members, enumerators, and member functions as well as to non-static data members. Implement correct lvalue computation for member references in C++. Compute the result type of non-static data members of reference type properly. llvm-svn: 61294
-
- Dec 12, 2008
-
-
Chris Lattner authored
output that GCC does. rdar://6440297 llvm-svn: 60922
-
- Dec 11, 2008
-
-
Douglas Gregor authored
and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
-
- Dec 01, 2008
-
-
Anders Carlsson authored
llvm-svn: 60323
-
- Nov 25, 2008
-
-
Anders Carlsson authored
llvm-svn: 60032
-
- Nov 22, 2008
-
-
Anders Carlsson authored
llvm-svn: 59857
-
- Nov 17, 2008
-
-
Eli Friedman authored
moment. llvm-svn: 59435
-
Anders Carlsson authored
llvm-svn: 59433
-
- Nov 16, 2008
-
-
Chris Lattner authored
llvm-svn: 59426
-
Anders Carlsson authored
llvm-svn: 59405
-
- Nov 15, 2008
-
-
Anders Carlsson authored
llvm-svn: 59375
-
Anders Carlsson authored
llvm-svn: 59371
-
- Nov 11, 2008
-
-
Sebastian Redl authored
Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types. llvm-svn: 59057
-
- Oct 27, 2008
-
-
Chris Lattner authored
t.c:1:13: error: cannot codegen this designators yet int a[10] = {2, 4, [8]=9, 10}; ^~~~~~~~~~~~~~~~~ llvm-svn: 58220
-
- Oct 21, 2008
-
-
Douglas Gregor authored
llvm-svn: 57909
-
- Oct 12, 2008
-
-
Chris Lattner authored
llvm-svn: 57392
-
- Oct 06, 2008
-
-
Chris Lattner authored
constant lvalue. Implement this in codegen by moving the code out of CGBuiltin into EmitConstantExpr. llvm-svn: 57163
-