- Aug 28, 2007
-
-
Bruno Cardoso Lopes authored
llvm-svn: 41525
-
Chris Lattner authored
Note the FIXME: we need some way to mark a decl erroneous :) llvm-svn: 41524
-
Chris Lattner authored
implicit cast gets linked back into the AST. llvm-svn: 41523
-
Chris Lattner authored
llvm-svn: 41522
-
Steve Naroff authored
Implement more thoughful error recovery when dealing with bogus declarator types. For example, the following code was resulting in spurious warnings. This was the result of Sema::GetTypeForDeclarator() synthesizing a type to hand back to the caller (in this case, "int []", instead of "struct s[]", which is invalid). struct s; struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}} return z; } Strategy: Flag the error in Declarator/DeclaratorChunk. This info is later stored in the ParmVarDecl. If the decl is referenced, Sema::ParseIdentifierExpr() will check if the type is invalid. If so, it quietly returns "true", without instantiating a DeclRefExpr. This seems to work nicely. If Chris is happy with the approach, I will generalize this to all VarDecls. llvm-svn: 41521
-
- Aug 27, 2007
-
-
Ted Kremenek authored
llvm-svn: 41520
-
Steve Naroff authored
llvm-svn: 41517
-
Devang Patel authored
llvm-svn: 41516
-
Steve Naroff authored
llvm-svn: 41515
-
Ted Kremenek authored
llvm-svn: 41514
-
Chris Lattner authored
llvm-svn: 41513
-
Ted Kremenek authored
based on an offset within SubExprs. llvm-svn: 41512
-
Ted Kremenek authored
would be invalid when RetValExp == NULL. llvm-svn: 41511
-
Dan Gohman authored
llvm-svn: 41510
-
Ted Kremenek authored
+ Added the creation of an empty Entry block at the end of CFG construction if the Entry block in the CFG contains multiple predecessors (which can happen with labels and do loops). + Fixed bug in the creation of an empty Exit block with functions where not all paths end in a return statement (but some do). Basic blocks with return statements were jumping to a (sometimes) non-empty block. + FinishBlock no longer checks for labels at the beginning of a basic block before reversing the statements in the block. This is because the recursion invariants of the builder methods have been cleaned up, and blocks are only passed to FinishBlock at most once. + Modified handling of "if", "for", "while", "do", and "switch" to allow condition expressions that can span multiple basic blocks. This allows such conditions to contain short-circuit expressions (which span multiple blocks in the CFG). llvm-svn: 41508
-
David Greene authored
Update InvokeInst to work like CallInst llvm-svn: 41506
-
Chris Lattner authored
llvm-svn: 41503
-
Rafael Espindola authored
llvm-svn: 41502
-
Chris Lattner authored
llvm-svn: 41501
-
Chris Lattner authored
llvm-svn: 41500
-
Chris Lattner authored
llvm-svn: 41499
-
Chris Lattner authored
llvm-svn: 41498
-
Duncan Sands authored
latest EH changes, and in any case it is hard to imagine how the original bug could be reintroduced. llvm-svn: 41497
-
Chris Lattner authored
llvm-svn: 41496
-
Chris Lattner authored
llvm-svn: 41495
-
Duncan Sands authored
resulting in zero matches, while llvm-gcc-4.1 manages to remove one pointless selector changing the number of matches. llvm-svn: 41494
-
Ted Kremenek authored
implicit casts from T to T& at the topmost part of the return-value expression. This checking may be needed within EvalAddr later on. We'll wait until test cases show this kind of logic is necessary (as more C++ features are implemented in clang). llvm-svn: 41493
-
Chris Lattner authored
llvm-svn: 41492
-
Dan Gohman authored
where both pointers have non-zero offsets. llvm-svn: 41491
-
Duncan Sands authored
offset needs to be adjusted in this test. llvm-svn: 41490
-
Dan Gohman authored
to not alias each other, it can be translated as an llvm.memcpy. llvm-svn: 41489
-
Dan Gohman authored
llvm-svn: 41488
-
Duncan Sands authored
gcc exception handling: if an exception unwinds through an invoke, then execution must branch to the invoke's unwind target. We previously tried to enforce this by appending a cleanup action to every selector, however this does not always work correctly due to an optimization in the C++ unwinding runtime: if only cleanups would be run while unwinding an exception, then the program just terminates without actually executing the cleanups, as invoke semantics would require. I was hoping this wouldn't be a problem, but in fact it turns out to be the cause of all the remaining failures in the LLVM testsuite (these also fail with -enable-correct-eh-support, so turning on -enable-eh didn't make things worse!). Instead we need to append a full-blown catch-all to the end of each selector. The correct way of doing this depends on the personality function, i.e. it is language dependent, so can only be done by gcc. Thus this patch which generalizes the eh.selector intrinsic so that it can handle all possible kinds of action table entries (before it didn't accomodate cleanups): now 0 indicates a cleanup, and filters have to be specified using the number of type infos plus one rather than the number of type infos. Related gcc patches will cause Ada to pass a cleanup (0) to force the selector to always fire, while C++ will use a C++ catch-all (null). llvm-svn: 41484
-
Steve Naroff authored
Changed Sema::UsualArithmeticConversions to use the new API. This fixes the following case... _Complex double X; double y; void foo() { X = X + y; } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -parse-ast-dump Read top-level variable decl: 'X' Read top-level variable decl: 'y' void foo() (CompoundStmt 0x2605cc0 (BinaryOperator 0x2605ca0 '_Complex double' '=' (DeclRefExpr 0x2605c10 '_Complex double' Decl='X' 0x2605ab0) (BinaryOperator 0x2605c80 '_Complex double' '+' (DeclRefExpr 0x2605c30 '_Complex double' Decl='X' 0x2605ab0) (ImplicitCastExpr 0x2605c70 '_Complex double' (DeclRefExpr 0x2605c50 'double' Decl='y' 0x2605ae0))))) llvm-svn: 41483
-
Dan Gohman authored
llvm-svn: 41482
-
Rafael Espindola authored
Coping 100MB array (after a warmup) shows that glibc 2.6.1 implementation on x86-64 (core 2) is 30% faster (from 0.270917s to 0.188079s) llvm-svn: 41479
-
Chris Lattner authored
llvm-svn: 41478
-
Chris Lattner authored
llvm-svn: 41477
-
Steve Naroff authored
Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible(). Modified Type::typesAreCompatible() to use the above. This fixes the following bug submitted by Keith Bauer (thanks!). int equal(char *a, const char *b) { return a == b; } Also tweaked Sema::CheckCompareOperands() to ignore the qualifiers when comparing two pointer types (though it doesn't relate directly to this bug). llvm-svn: 41476
-
Steve Naroff authored
Tweak a comment and assert. llvm-svn: 41475
-