| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We would accidently initialize unnamed bitfields instead of the
following field.
llvm-svn: 216313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now emit warnings when doing so and code generation is consistent
with GCC. Note that the C99 spec is unclear as to the precise
behavior.
See also ...
Bug:
http://llvm.org/bugs/show_bug.cgi?id=16644 and
cfe-dev discussion:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html
llvm-svn: 191890
|
|
|
|
|
|
|
|
|
|
| |
with a string. This case is sort of tricky because we can't modify the
StringLiteral used to represent such initializers.
We are forced to decompose the string into individual characters.
Fixes <rdar://problem/10465114>.
llvm-svn: 183791
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
us to compile
stuff like this:
typedef struct {
int x, y, z;
} foo_t;
foo_t g;
into:
%"struct.<anonymous>" = type { i32, i32, i32 }
we now get:
%struct.foo_t = type { i32, i32, i32 }
This doesn't change the behavior of the compiler, but makes the IR much easier to read.
llvm-svn: 134969
|
|
|
|
| |
llvm-svn: 134831
|
|
|
|
|
|
|
|
|
|
|
| |
ConvertType on InitListExprs as they are being converted. This is
needed for a forthcoming patch, and improves the IR generated anyway
(see additional type names in testcases).
This patch also converts a bunch of std::vector's in CGObjCMac to use
C arrays. There are a ton more that should be converted as well.
llvm-svn: 133413
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
completes support for C1X anonymous struct/union init features:
* Indexed anonymous member initializers should not be expanded. Doing so makes
little sense and would cause unresolvable semantic ambiguity in valid code
(regression introduced by r69153).
* Subobject initialization of (possibly nested) anonymous members are now
referred to with paths relative to the naming record context, eliminating the
synthesis of incorrect implicit InitListExprs that caused CodeGen to assert.
* Field lookup was missing a null check in IdentifierInfo comparison which
caused lookup for a known (already resolved) field to match the first unnamed
data member it encountered leading to silent miscompilation.
* Subobject paths are no longer built using the general purpose
Sema::BuildAnonymousStructUnionMemberPath(). If any corner cases crop up, we
will now assert earlier in Sema instead of passing invalid InitListExprs
through to CodeGen.
Fixes PR6955, from Alp Toker!
llvm-svn: 116098
|
|
|
|
|
|
| |
fixing the ICE in PR7151
llvm-svn: 113130
|
|
|
|
|
|
| |
this follows from C99 6.7.8p10: if it is a union, the first named member is initialized
llvm-svn: 101539
|
|
|
|
|
|
| |
merge also a few tests I had here for this feature, and FileCheck'ize one file
llvm-svn: 101535
|
|
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
|
|
|
|
|
| |
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
|
|
|
|
|
|
| |
place but will be removed shortly. The new struct builder works on big endian systems.
llvm-svn: 77185
|
|
|
|
|
|
| |
GNU-style array designators, causing us to emit broken initializers.
llvm-svn: 67878
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
|
|
| |
types.
llvm-svn: 63669
|
|
|
|
| |
llvm-svn: 63390
|
|
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
|