summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Move promoteExprToType from being a static method in SemaExpr.cpp to beingChris Lattner2008-01-165-47/+77
| | | | | | | | | | a method named ImpCastExprToType in Sema. Use this method to insert implicit casts for case statements from their operand type to the condition type of the switch. This fixes a crash on test/CodeGen/statements.c, reported by Eli Friedman. llvm-svn: 46083
* add accessors to switchstmt.Chris Lattner2008-01-161-0/+5
| | | | llvm-svn: 46082
* Fixed broken bitmasking in the ctor of ProgramPoint.Ted Kremenek2008-01-161-1/+1
| | | | llvm-svn: 46081
* Added missing call to the checker's Initialize() method in the alternateTed Kremenek2008-01-161-2/+4
| | | | | | ctor for GREngine. llvm-svn: 46080
* Added missing ctor to ExplodedGraph.Ted Kremenek2008-01-161-0/+2
| | | | llvm-svn: 46079
* Fixed incorrect pointer mask.Ted Kremenek2008-01-161-1/+1
| | | | llvm-svn: 46078
* Shortened driver option for running the GR-constants analysis to --grconstants.Ted Kremenek2008-01-161-1/+1
| | | | llvm-svn: 46076
* Add missing header file for GRConstants analysis.Ted Kremenek2008-01-161-0/+31
| | | | llvm-svn: 46075
* Hooked up the GRConstants analysis to the driver.Ted Kremenek2008-01-168-31/+46
| | | | | | | Fixed some compilation errors with GREngine that showed up during template instantiation. llvm-svn: 46074
* More cleanups in DoStmt. The NodeSets are now vectors instead of sets, sinceTed Kremenek2008-01-161-21/+14
| | | | | | | node caching in GREngine will guarantee that we do not insert a node twice into a nodeset. llvm-svn: 46071
* Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function ↵Steve Naroff2008-01-164-11/+18
| | | | | | declarations/definitions). Patch by Carl Lewis! llvm-svn: 46070
* Adjusted DSPtr::Profile method again, since my last patch broke the build.Ted Kremenek2008-01-161-1/+2
| | | | llvm-svn: 46051
* Changed 'Profile' method for DSPtr to incorporate the flags from theTed Kremenek2008-01-161-1/+1
| | | | | | variant type, and not just the pointer value. llvm-svn: 46049
* Renamed some internal classes for the GR-Constant Propagation analysis.Ted Kremenek2008-01-161-38/+62
| | | | | | | | Cleaned up GRConstants::AddBinding to not directly reference the predecessor node. Now we just manipulate the current state, and a driver function creates nodes as needed. llvm-svn: 46040
* Typo.Fariborz Jahanian2008-01-161-1/+1
| | | | llvm-svn: 46038
* Added support for rewriting of continue/break statements inside ObjC2's ↵Fariborz Jahanian2008-01-152-6/+133
| | | | | | foreach-stmt. llvm-svn: 46037
* Added skeleton implementation of new constant-prop. analysis usingTed Kremenek2008-01-151-0/+273
| | | | | | the graph reachability engine. llvm-svn: 46036
* Added ctor to GRNodeBuilder.Ted Kremenek2008-01-151-0/+2
| | | | llvm-svn: 46035
* Finish up handling all permutations of "complex int" (in ↵Steve Naroff2008-01-152-5/+29
| | | | | | | | | | Sema::UsualArithmeticConversions()). A FIXME remains to verify the conversion rules are consistent with GCC. Thanks to Eli for the new/improved test case... llvm-svn: 46022
* - Change Type::isComplexType() to exlude GCC's complex integer extension. In ↵Steve Naroff2008-01-154-18/+34
| | | | | | | | | | general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec). - Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType(). This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite). llvm-svn: 46005
* avoid pasting L + "foo" into L"foo".Chris Lattner2008-01-152-2/+33
| | | | llvm-svn: 46000
* avoid token pasting between identifiers and wide strings: Chris Lattner2008-01-151-12/+27
| | | | | | abc+L"foo" -> abc L"foo", not abcL"foo" llvm-svn: 45999
* Add a comment...Steve Naroff2008-01-151-0/+3
| | | | llvm-svn: 45993
* Rework commit r45976, which was incorrect.Steve Naroff2008-01-154-9/+52
| | | | | | | | - Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType(). - Don't inlude complex types with Type::isIntegerType(), which is too general. - Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types. llvm-svn: 45992
* Removed implicit transitions to a "BlockExit" location; we now handleTed Kremenek2008-01-152-18/+11
| | | | | | | the end of the block by processing empty blocks (at BlockEntrance) or when we have just processed the last statement in a block (at PostStmt). llvm-svn: 45991
* Removed mutation of CFGBlock through operator[]. For now the underlying ASTs,Ted Kremenek2008-01-151-1/+0
| | | | | | however, can still be manipulated through the returned Stmt*. llvm-svn: 45990
* Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when ↵Steve Naroff2008-01-143-4/+15
| | | | | | | | diagnosing incorrect code. Bug submitted by Eli. llvm-svn: 45989
* Added prototype implementation of path-sens. analysis core engine.Ted Kremenek2008-01-144-3/+561
| | | | llvm-svn: 45986
* Added operator[] for CFGBlock. This provides random access to the statementsTed Kremenek2008-01-141-1/+4
| | | | | | of a block. llvm-svn: 45984
* Fix build issue on cygwin, patch by Sam BishopChris Lattner2008-01-141-2/+4
| | | | llvm-svn: 45977
* Teach Type::isIntegerType() about GCC's __complex__ integer extensions...Steve Naroff2008-01-142-0/+13
| | | | | | Bug submitted by Eli. llvm-svn: 45976
* Fix crasher when redefining functions. Not 100% pleased with this solution, ↵Steve Naroff2008-01-142-11/+29
| | | | | | but it is clearly an improvement. Will discuss with Chris later. llvm-svn: 45975
* Cleaned up comment.Ted Kremenek2008-01-141-2/+4
| | | | llvm-svn: 45970
* Cleaned up comment.Ted Kremenek2008-01-141-4/+5
| | | | llvm-svn: 45969
* When serializing CompoundLiteralExpr, serialize out the file scope flag beforeTed Kremenek2008-01-141-2/+2
| | | | | | | serializing the subexpression (Init), as this results in a more efficient encoding in the bitstream. llvm-svn: 45967
* Record if a compound literal expression is @ file scope. This allows us to ↵Steve Naroff2008-01-146-10/+21
| | | | | | | | implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable. Bug/patch by Eli Friedman! llvm-svn: 45966
* Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.Ted Kremenek2008-01-141-4/+4
| | | | llvm-svn: 45965
* Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and removeTed Kremenek2008-01-144-60/+59
| | | | | | | | #include<iostream>. Patch provided by Sam Bishop. llvm-svn: 45962
* Revert r45951, Chris says it violates the C99 spec.Steve Naroff2008-01-142-32/+21
| | | | llvm-svn: 45961
* _asm is another valid alias for asm.Anders Carlsson2008-01-141-0/+1
| | | | llvm-svn: 45957
* Add codegen upport for implicit casts to aggregate exprs.Anders Carlsson2008-01-142-1/+26
| | | | llvm-svn: 45954
* add a noteChris Lattner2008-01-141-0/+26
| | | | llvm-svn: 45953
* Fix ASTContext::typesAreCompatible when analyzing a function type with Chris Lattner2008-01-142-34/+46
| | | | | | | proto and function type without proto. It would never call 'functionTypesAreCompatible' because they have different type classes. llvm-svn: 45952
* Rewrite Expr::isNullPointerConstant() to deal with multiple levels of ↵Steve Naroff2008-01-142-23/+37
| | | | | | | | explicit casts. Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0" llvm-svn: 45951
* Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.Steve Naroff2008-01-134-18/+40
| | | | | | | | | | | | | | | | | | Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below). void foo (void) { struct b; struct b* x = 0; struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type") } With this patch, the above is now allowed. Bug/Patch by Eli Friedman! llvm-svn: 45933
* Moved destructor logic of templated class ExplodedGraph to non-templatedTed Kremenek2008-01-132-16/+27
| | | | | | parent class ExplodedGraphImpl. llvm-svn: 45930
* Added node cleanup to dstor of ExplodedGraph.Ted Kremenek2008-01-131-5/+12
| | | | llvm-svn: 45929
* Created ExplodedGraph.cpp and moved most method implementations ofTed Kremenek2008-01-132-53/+78
| | | | | | | | | ExplodedNodeImpl::NodeGroup from being defined inline to being defined "out-of-line" in ExplodedGraph.cpp. This removes a dependence on including <vector> in ExplodedGraph.h, and will hopefully result in smaller generated code with negligible performance impact. llvm-svn: 45928
* Moved 'ExplodedNodeGroup' into class 'ExplodedNode' as the nested classTed Kremenek2008-01-131-79/+72
| | | | | | 'NodeGroup.' llvm-svn: 45927
* Fixed lines preventing compilation.Ted Kremenek2008-01-131-22/+27
| | | | llvm-svn: 45926
OpenPOWER on IntegriCloud