- Sep 13, 2007
-
-
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
-
- Sep 10, 2007
-
-
Steve Naroff authored
llvm-svn: 41803
-
Fariborz Jahanian authored
class object. llvm-svn: 41801
-
Ted Kremenek authored
that refer to direct function calls. Modified interface of LiveVariables to only track liveness of VarDecls. This cleans up a bunch of edge cases, and removed the bug just mentioned. llvm-svn: 41797
-
Ted Kremenek authored
llvm-svn: 41796
-
Ted Kremenek authored
refers to a function. llvm-svn: 41795
-
Ted Kremenek authored
"Audit" to "Observer" and "Observe" llvm-svn: 41794
-
- Sep 08, 2007
-
-
Chris Lattner authored
llvm-svn: 41783
-
Ted Kremenek authored
for each function. This was the behavior prior to the following patch: http://llvm.org/viewvc/llvm-project?view=rev&revision=41779 llvm-svn: 41780
-
Ted Kremenek authored
"CFGVisitor", which now handles all the boilerplate for iterating over the function definitions in a translation unit and building the CFGs. This logic was previously replicated for each driver option that used CFGs. The options -dump-cfg, -view-cfg, -check-dead-stores, and -dump-live-variables now use this refactored code. llvm-svn: 41779
-
- Sep 07, 2007
-
-
Hartmut Kaiser authored
Silenced a couple of warnings. Added *.vcproj file for new clangAnalysis library. Renamed Basic to clangBasic projects. llvm-svn: 41767
-
Ted Kremenek authored
but never used. Fix a bug in LiveVariables where uses on the LHS of self-assign operators (e.g +=, *=, etc) would not be properly recorded in the liveness state of the variable. llvm-svn: 41757
-
Ted Kremenek authored
that contained no declarations, or when a variable is declared but never used. llvm-svn: 41756
-
Ted Kremenek authored
llvm-svn: 41755
-
Ted Kremenek authored
to variables that are no longer live. This analysis is built on top of CFGs and the LiveVariables analysis. changes to driver: added driver option "-check-dead-stores" to run the analysis llvm-svn: 41754
-