- Sep 16, 2007
-
-
Chris Lattner authored
llvm-svn: 41990
-
- Sep 15, 2007
-
-
Chris Lattner authored
llvm-svn: 41989
-
Chris Lattner authored
llvm-svn: 41988
-
Steve Naroff authored
Start converting Action methods from Parse-prefix to ActOn-prefix. The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing... llvm-svn: 41986
-
Fariborz Jahanian authored
llvm-svn: 41985
-
Ted Kremenek authored
Analysis/DataflowSolver.h Analysis/UnintializedValues.cpp include/clang/Analysis/CFGVarDeclVisitor.h include/clang/Analysis/DataflowValues.h include/clang/Analysis/UninitializedValues.h llvm-svn: 41974
-
Steve Naroff authored
Rename Action::ParseRecordBody() to ProcessFieldDecls(), and add a visibility argument. Remove Action::ObjcAddVisibilityToIvars(). No need for an extra API when it is trivial to add this info to the previous hook. In general, I want to start migrating away from having Actions prefixed with "Parse" (which is confusing, since the Action API doesn't do any parsing, per se). llvm-svn: 41973
-
Ted Kremenek authored
Preliminary implementation of UninitializedValues, which is based on new solver (doesn't work yet, but compiles). llvm-svn: 41970
-
Steve Naroff authored
Several improvement to Sema::ParseRecordBody()... - Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect). - Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting. - When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy. llvm-svn: 41964
-
- Sep 14, 2007
-
-
Fariborz Jahanian authored
llvm-svn: 41961
-
Fariborz Jahanian authored
llvm-svn: 41954
-
Steve Naroff authored
Now that the dust has settled on the Decl refactoring, I noticed FieldDecl didn't need NextDeclarator. As a result, I'm removing it. Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%. llvm-svn: 41948
-
Steve Naroff authored
Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl. Decl is now svelte:-) llvm-svn: 41935
-
- Sep 13, 2007
-
-
Steve Naroff authored
Phase 2 of making the Decl class more lightweight... Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. llvm-svn: 41934
-
Fariborz Jahanian authored
llvm-svn: 41932
-
Steve Naroff authored
Add "ScopedDecl" AST, used by ValueDecl and TypeDecl. This allows us to sink the "Next" field, which isn't used by FieldDecl and ObjcIvarDecl. llvm-svn: 41931
-
Chris Lattner authored
llvm-svn: 41926
-
Chris Lattner authored
the front-end adopts APFloat though. This fixes test/CodeGen/mandel.c llvm-svn: 41908
-
Chris Lattner authored
llvm-svn: 41907
-
Chris Lattner authored
llvm-svn: 41906
-
Steve Naroff authored
Add ASTContext::StringMap<char> to unique selector names. llvm-svn: 41894
-
- Sep 12, 2007
-
-
Ted Kremenek authored
Removed extraneous call to Observer->ObserveStmt when handling DeclRefExprs. llvm-svn: 41890
-
Steve Naroff authored
diagnostic for illegal initializers. llvm-svn: 41889
-
Ted Kremenek authored
llvm-svn: 41888
-
Ted Kremenek authored
llvm-svn: 41887
-
Ted Kremenek authored
llvm-svn: 41886
-
Ted Kremenek authored
is much simpler now. llvm-svn: 41885
-
Ted Kremenek authored
are useful for dataflow analysis: CFGStmtVisitor and DataflowStmtVisitor. CFGStmtVisitor is the same as StmtVisitor is that it has separate visitors for "root" statements in a CFGBlock (statements that have a designated slot int the list of statements in a CFGBlock). It also recognizes statements that have implicit control-flow, and calls special visitor methods for those. DataflowStmtVisitor extends CFGStmtVisitor to serve as a template for implementing transfer functions. It does a pre-/post-order traversal of substatements depending on whether we are doing a forward/backward analysis. It also has special handling for implicit-control-flow statements so that they are visited only once. llvm-svn: 41884
-
Fariborz Jahanian authored
to use of @property. llvm-svn: 41880
-
Hartmut Kaiser authored
Removed clang solution file for VC++, which didn't work properly because of hard coded paths in the llvm project files. Changed windows detection to use LLVM pp constant. llvm-svn: 41878
-
Steve Naroff authored
Fix the following bug submitted by Ted Kremenek: void func() { int xx = xx; // incorrectly diagnosed 'xx' as an undeclared identifier. } This smallish bug resulted in a largish fix. Here are some highlights: - Needed to make sure ParseDeclarator is called *before* parsing any initializer. Removed the "Init" argument to ParseDeclarator. - Added AddInitializerToDecl() to the Action & Sema classes. In Sema, this hook is responsible for validating the initializer and installing it into the respective decl. - Moved several semantic checks from ParseDeclarator() to FinalizeDeclaratorGroup(). Previously, this hook was only responsible for reversing a list. Now it plays a much larger semantic role. All of the above changes ended up simplifying ParseDeclarator(), which is goodness... llvm-svn: 41877
-
Ted Kremenek authored
This method is used to determine if an expression contains implicit control-flow, and thus appears in a distinct statement slot in the CFG. For example: (1) x = ... ? ... ? ... logically becomes: (1) ... ? ... : ... (a unique statement slot for the ternary ?) (2) x = [E1] (where E1 is actually the ConditionalOperator*) A client of the CFG, when walking the statement at (2), will encounter E1. In this case, hasImplicitControlFlow(E1) == true, and the client will know that the expression E1 is explicitly placed into its own statement slot to capture the implicit control-flow it has. llvm-svn: 41868
-
- Sep 11, 2007
-
-
Ted Kremenek authored
where not reversing the order of their subexpression blocks. Added feature where CallExprs are placed in their own statement slot in a CFGBlock. Thus we have a designated "return site" within a CFGBlock when reasoning about function calls. llvm-svn: 41866
-
Steve Naroff authored
- Add an ObjcIvarDecl AST node (a subclass of FieldDecl). - Instantiate the node in Sema::ParseField(), based on the type of the TagDecl. - Add Sema::ObjcAddInstanceVariable(), responsible for adorning/adding the ObjcIvarDecl. llvm-svn: 41864
-
Fariborz Jahanian authored
llvm-svn: 41860
-
Ted Kremenek authored
if the assigned value is a constant expression, e.g.: int x = 0; We then check to see if "x" is ever reassigned later. If so, we don't emit a warning. This is because programmers frequently use defensive programming to make sure a variable has a defined value. llvm-svn: 41853
-
Ted Kremenek authored
llvm-svn: 41848
-
Gabor Greif authored
warnings that some compilers diagnose llvm-svn: 41847
-
Ted Kremenek authored
llvm-svn: 41814
-
Steve Naroff authored
Fix the following bug submitted by Justin Handville. int main(int argc, char* argv[]) { return 0; } After speaking briefly with Chris, we decided this should be a front-end fix. The fix...have Sema::GetTypeForDeclarator() do the default function/array conversion, as I outlined in the 9/9 email on this topic. Since this conversion is done before Sema::ParseParamDeclarator(), I thought I could remove the conversion from Sema::ParseParamDeclarator(). Unfortunately, this didn't work. The conversion apparently needs to be done in both places (which doesn't make sense to me). Will investigate. llvm-svn: 41811
-