- Mar 04, 2009
-
-
Chris Lattner authored
multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. llvm-svn: 66011
-
Steve Naroff authored
llvm-svn: 65978
-
- Mar 03, 2009
-
-
-
-
rdar://problem/6640991Steve Naroff authored
Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements llvm-svn: 65964
-
-
- Mar 01, 2009
-
-
Daniel Dunbar authored
llvm-svn: 65759
-
- Feb 28, 2009
-
-
rdar://problem/6451399Steve Naroff authored
- Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). llvm-svn: 65694
-
- Feb 22, 2009
-
-
Anders Carlsson authored
llvm-svn: 65256
-
- Feb 14, 2009
-
-
Chris Lattner authored
1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. llvm-svn: 64543
-
- Feb 13, 2009
-
-
Douglas Gregor authored
by DeclContexts (always) rather than by statements. DeclContext currently goes out of its way to avoid destroying any Decls that might be owned by a DeclGroupOwningRef. However, in an error-recovery situation, a failure in a declaration statement can cause all of the decls in a DeclGroupOwningRef to be destroyed after they've already be added into the DeclContext. Hence, DeclContext is left with already-destroyed declarations, and bad things happen. This problem was causing failures that showed up as assertions on x86 Linux in test/Parser/objc-forcollection-neg-2.m. llvm-svn: 64474
-
- Feb 12, 2009
-
-
Steve Naroff authored
llvm-svn: 64389
-
Steve Naroff authored
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning). llvm-svn: 64375
-
- Feb 11, 2009
-
-
-
rdar://problem/6206858Steve Naroff authored
Added a FIXME to handle 'rethrow' check. llvm-svn: 64308
-
- Feb 07, 2009
-
-
Ted Kremenek authored
- Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
-
- Feb 04, 2009
-
-
Mike Stump authored
llvm-svn: 63784
-
- Jan 29, 2009
-
-
Chris Lattner authored
redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
-
- 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 21, 2009
-
-
Anders Carlsson authored
llvm-svn: 62666
-
- Jan 20, 2009
-
-
-
Douglas Gregor authored
that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. llvm-svn: 62562
-
- Jan 18, 2009
-
-
Sebastian Redl authored
llvm-svn: 62465
-
Sebastian Redl authored
llvm-svn: 62464
-
Sebastian Redl authored
llvm-svn: 62463
-
Anders Carlsson authored
Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change. llvm-svn: 62433
-
- Jan 17, 2009
-
-
Sebastian Redl authored
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression. llvm-svn: 62380
-
- Jan 11, 2009
-
-
Sebastian Redl authored
No performance regression in my basic test. Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt). llvm-svn: 62032
-
- Dec 31, 2008
-
-
Anders Carlsson authored
Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand llvm-svn: 61515
-
- Dec 28, 2008
-
-
Sebastian Redl authored
llvm-svn: 61456
-
- Dec 22, 2008
-
-
Sebastian Redl authored
llvm-svn: 61346
-
Sebastian Redl authored
llvm-svn: 61337
-
- Dec 21, 2008
-
-
Sebastian Redl authored
llvm-svn: 61309
-
- Dec 18, 2008
-
-
Chris Lattner authored
void foo() { return foo(); } llvm-svn: 61188
-
Chris Lattner authored
Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" llvm-svn: 61187
-
- Dec 06, 2008
-
-
Douglas Gregor authored
expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. llvm-svn: 60615
-
- Dec 05, 2008
-
-
Chris Lattner authored
the containing block. Introduce a new getCurFunctionOrMethodDecl method to check to see if we're in a function or objc method. Minor cleanups to other related places. This fixes rdar://6405429. llvm-svn: 60564
-
- Dec 01, 2008
-
-
Anders Carlsson authored
llvm-svn: 60317
-
- Nov 24, 2008
-
-
Chris Lattner authored
instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
-