]> granicus.if.org Git - clang/log
clang
16 years agoFix a fixme by allowing pointers in different address spaces to have
Chris Lattner [Sat, 8 Mar 2008 08:34:58 +0000 (08:34 +0000)]
Fix a fixme by allowing pointers in different address spaces to have
different widths.  Start simplifying TargetInfo accessor methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48050 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoeliminate the TargetInfoImpl stuff, simplifying the target implementations.
Chris Lattner [Sat, 8 Mar 2008 08:24:01 +0000 (08:24 +0000)]
eliminate the TargetInfoImpl stuff, simplifying the target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48049 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoeliminate ComputeWCharInfo.
Chris Lattner [Sat, 8 Mar 2008 08:07:34 +0000 (08:07 +0000)]
eliminate ComputeWCharInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48048 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIncreased worklist limit for GRSimpleVals.
Ted Kremenek [Fri, 7 Mar 2008 22:59:32 +0000 (22:59 +0000)]
Increased worklist limit for GRSimpleVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48037 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded --trim-path-graph to the driver to trim paths from the ExplodedGraph
Ted Kremenek [Fri, 7 Mar 2008 22:58:01 +0000 (22:58 +0000)]
Added --trim-path-graph to the driver to trim paths from the ExplodedGraph
that are not related to error nodes.

Fixed bug where we did not detect some NULL dereferences.

Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach
a set of provided nodes.

Fixed subtle bug in ExplodedNodeImpl where we could create predecessor
iterators that included the mangled "sink" bit.  The better fix is to integrate
this bit into the void* for the wrapped State, not the NodeGroups representing
a node's predecessors and successors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImproved graph visualization of ExplodedGraphs to include source line and column
Ted Kremenek [Fri, 7 Mar 2008 20:57:30 +0000 (20:57 +0000)]
Improved graph visualization of ExplodedGraphs to include source line and column
information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48031 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRenamed ValueManager to BasicValueFactory.
Ted Kremenek [Fri, 7 Mar 2008 20:13:31 +0000 (20:13 +0000)]
Renamed ValueManager to BasicValueFactory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48025 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd new test
Nate Begeman [Fri, 7 Mar 2008 20:04:49 +0000 (20:04 +0000)]
Add new test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48018 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd fastcall/stdcall attribute support
Nate Begeman [Fri, 7 Mar 2008 20:04:22 +0000 (20:04 +0000)]
Add fastcall/stdcall attribute support
Generate CallingConv::Fast when fastcall attribute is present

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48017 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefined divide-by-zero checking to distinguish between must and may
Ted Kremenek [Fri, 7 Mar 2008 19:04:53 +0000 (19:04 +0000)]
Refined divide-by-zero checking to distinguish between must and may
divide-by-zero errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48013 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch by Nuno Lopes:
Ted Kremenek [Fri, 7 Mar 2008 18:43:49 +0000 (18:43 +0000)]
Patch by Nuno Lopes:

  Added more comments for code processing attribute "format".
  Added more checks for corner cases, test cases, and warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48011 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix typos
Gabor Greif [Thu, 6 Mar 2008 10:40:09 +0000 (10:40 +0000)]
fix typos

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed mismatched deallocation in GRBlockCounter::Factory::~Factory.
Ted Kremenek [Thu, 6 Mar 2008 08:09:22 +0000 (08:09 +0000)]
Fixed mismatched deallocation in GRBlockCounter::Factory::~Factory.
Reported by Zhongxing Xu!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47991 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove two obsolete tests, not sure why my previous commit didn't commit the removal.
Chris Lattner [Thu, 6 Mar 2008 05:47:17 +0000 (05:47 +0000)]
remove two obsolete tests, not sure why my previous commit didn't commit the removal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47986 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded boilerplate to execute the CF reference count checker (which isn't yet implemen...
Ted Kremenek [Thu, 6 Mar 2008 00:08:09 +0000 (00:08 +0000)]
Added boilerplate to execute the CF reference count checker (which isn't yet implemented).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47982 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "CheckerState" field to ValueState.
Ted Kremenek [Wed, 5 Mar 2008 23:32:23 +0000 (23:32 +0000)]
Added "CheckerState" field to ValueState.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47979 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded transfer function support for __builtin_expect.
Ted Kremenek [Wed, 5 Mar 2008 22:59:42 +0000 (22:59 +0000)]
Added transfer function support for __builtin_expect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47971 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSmall bug fix when handling CallExprs that generate sink nodes.
Ted Kremenek [Wed, 5 Mar 2008 22:49:16 +0000 (22:49 +0000)]
Small bug fix when handling CallExprs that generate sink nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47970 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate vcproj files.
Steve Naroff [Wed, 5 Mar 2008 22:16:33 +0000 (22:16 +0000)]
Update vcproj files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47967 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bug that could case unwanted bifurcation of states when evaluating calls.
Ted Kremenek [Wed, 5 Mar 2008 21:15:02 +0000 (21:15 +0000)]
Fixed bug that could case unwanted bifurcation of states when evaluating calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47964 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bogus assumption mistakenly introduced in r47955.
Ted Kremenek [Wed, 5 Mar 2008 19:26:46 +0000 (19:26 +0000)]
Fixed bogus assumption mistakenly introduced in r47955.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47958 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed a horribly insidious bit-masking bug in the implementation of
Ted Kremenek [Wed, 5 Mar 2008 19:08:55 +0000 (19:08 +0000)]
Fixed a horribly insidious bit-masking bug in the implementation of
ExplodedNode that would occasionally result in heap corruption.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47956 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor cleanups (mainly indentation).
Ted Kremenek [Wed, 5 Mar 2008 19:08:15 +0000 (19:08 +0000)]
Minor cleanups (mainly indentation).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47955 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove the source location arguments to various target query methods.
Chris Lattner [Wed, 5 Mar 2008 18:54:05 +0000 (18:54 +0000)]
remove the source location arguments to various target query methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd analysis source files to project.
Chris Lattner [Wed, 5 Mar 2008 18:22:36 +0000 (18:22 +0000)]
add analysis source files to project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47953 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd the various pathsensitive headers to the project.
Chris Lattner [Wed, 5 Mar 2008 18:20:02 +0000 (18:20 +0000)]
Add the various pathsensitive headers to the project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47952 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProgramEdge.h doesn't exist anymore.
Chris Lattner [Wed, 5 Mar 2008 18:18:31 +0000 (18:18 +0000)]
ProgramEdge.h doesn't exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47951 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReverted patch 47926 for ProgramPoint.h because it is currently buggy. May add back...
Ted Kremenek [Wed, 5 Mar 2008 05:05:04 +0000 (05:05 +0000)]
Reverted patch 47926 for ProgramPoint.h because it is currently buggy.  May add back (fixed) later.
Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove the first layer of support for "portability" warnings. This is
Chris Lattner [Wed, 5 Mar 2008 01:18:20 +0000 (01:18 +0000)]
Remove the first layer of support for "portability" warnings.  This is
theoretically useful, but not useful in practice.  It adds a bunch of
complexity, and not much value.  It's best to nuke it.  One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay).  Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.

Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed.  Please poke at it when you have
time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded support for ProgramPoints to represent ExplodedNodes in another
Ted Kremenek [Wed, 5 Mar 2008 00:59:43 +0000 (00:59 +0000)]
Added support for ProgramPoints to represent ExplodedNodes in another
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one
simulation is layered on another.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove this into the right file.
Chris Lattner [Wed, 5 Mar 2008 00:53:34 +0000 (00:53 +0000)]
move this into the right file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47925 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPlug-in transfer function "EvalCall" now takes as an argument the current
Ted Kremenek [Wed, 5 Mar 2008 00:33:14 +0000 (00:33 +0000)]
Plug-in transfer function "EvalCall" now takes as an argument the current
GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47923 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCleaned up typedefs involving StateTy so that we always use "StateTy*" instead of...
Ted Kremenek [Wed, 5 Mar 2008 00:11:33 +0000 (00:11 +0000)]
Cleaned up typedefs involving StateTy so that we always use "StateTy*" instead of StateTy.
This is conceptually much cleaner, as it shows that the state is always a pointer.
It also makes it easier to marshall these values around across the internal APIs
of the path-sensitive engine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47921 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake GRStmtNodeBuilder only depend on StateTy, and not the type definition
Ted Kremenek [Tue, 4 Mar 2008 23:50:00 +0000 (23:50 +0000)]
Make GRStmtNodeBuilder only depend on StateTy, and not the type definition
of the entire checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47920 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder. This will
Ted Kremenek [Tue, 4 Mar 2008 23:39:43 +0000 (23:39 +0000)]
Moved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder.  This will
allow us to pass the builder to plug-in transfer functions and allow those
functions to create intermediate nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47919 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: Explo...
Ted Kremenek [Tue, 4 Mar 2008 23:13:06 +0000 (23:13 +0000)]
Moved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: ExplodedNodeSet.
Made GRExprEngine::NodeSet a typedef of ExplodedNodeSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47914 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCallExprs are now no longer block-level expressions in the CFG by construction.
Ted Kremenek [Tue, 4 Mar 2008 22:29:40 +0000 (22:29 +0000)]
CallExprs are now no longer block-level expressions in the CFG by construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47913 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded preliminary transfer function support for references.
Ted Kremenek [Tue, 4 Mar 2008 22:16:08 +0000 (22:16 +0000)]
Added preliminary transfer function support for references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47912 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFor the transfer function for CallExpr, invalidate all arguments
Ted Kremenek [Tue, 4 Mar 2008 22:01:56 +0000 (22:01 +0000)]
For the transfer function for CallExpr, invalidate all arguments
passed-by-reference to builtin functions until we have better builtin support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47910 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake intrinsics always_inline.
Anders Carlsson [Tue, 4 Mar 2008 21:11:29 +0000 (21:11 +0000)]
Make intrinsics always_inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47902 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFor the transfer function of DeclStmt, for now initialize the values of
Ted Kremenek [Tue, 4 Mar 2008 20:40:11 +0000 (20:40 +0000)]
For the transfer function of DeclStmt, for now initialize the values of
structs (local variables) to Unknown instead of Undefined.  (added FIXME to initialize *members* of struct to undefined)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47901 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed another obscure node-caching bug.
Ted Kremenek [Tue, 4 Mar 2008 19:52:15 +0000 (19:52 +0000)]
Fixed another obscure node-caching bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented "print" method for ValueState.
Ted Kremenek [Tue, 4 Mar 2008 18:30:35 +0000 (18:30 +0000)]
Implemented "print" method for ValueState.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47894 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe operand to the visibility attribute is required to be a quoted string, not a...
Chris Lattner [Tue, 4 Mar 2008 18:08:48 +0000 (18:08 +0000)]
The operand to the visibility attribute is required to be a quoted string, not a bare identifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47893 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTargetInfo objects now own the TargetInfoImpl objects they refer to.
Ted Kremenek [Tue, 4 Mar 2008 17:47:18 +0000 (17:47 +0000)]
TargetInfo objects now own the TargetInfoImpl objects they refer to.
TargetInfo::AddSecondaryTarget is now private, as it is only used during
object construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47891 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd transfer function support for the default initialization of static
Ted Kremenek [Tue, 4 Mar 2008 04:18:04 +0000 (04:18 +0000)]
Add transfer function support for the default initialization of static
variables that are pointers or integers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47880 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed insidious state propagation bug that would sometimes cause the state
Ted Kremenek [Tue, 4 Mar 2008 00:56:45 +0000 (00:56 +0000)]
Fixed insidious state propagation bug that would sometimes cause the state
to bifurcate at the wrong places and not propagate at others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47876 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnhanced pretty-printing of undefined-argument errors.
Ted Kremenek [Tue, 4 Mar 2008 00:42:54 +0000 (00:42 +0000)]
Enhanced pretty-printing of undefined-argument errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47873 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomove deprecated -> attributes.c
Chris Lattner [Mon, 3 Mar 2008 21:17:42 +0000 (21:17 +0000)]
move deprecated -> attributes.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47856 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporarily rename mmintrin.h so that it won't clash with the system header. It will...
Anders Carlsson [Mon, 3 Mar 2008 19:34:30 +0000 (19:34 +0000)]
Temporarily rename mmintrin.h so that it won't clash with the system header. It will be renamed back once the few remaining methods have been implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47852 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed subtle caching bug in ExplodedGraph that would cause some nodes to
Ted Kremenek [Mon, 3 Mar 2008 19:29:58 +0000 (19:29 +0000)]
Fixed subtle caching bug in ExplodedGraph that would cause some nodes to
be incorrectly merged together.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd mmintrin.h header
Anders Carlsson [Mon, 3 Mar 2008 19:29:06 +0000 (19:29 +0000)]
Add mmintrin.h header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47850 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOnly allow a "noreturn" attribute to be affixed to a FunctionDecl.
Ted Kremenek [Mon, 3 Mar 2008 16:52:27 +0000 (16:52 +0000)]
Only allow a "noreturn" attribute to be affixed to a FunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47844 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded TODO.
Ted Kremenek [Mon, 3 Mar 2008 16:50:00 +0000 (16:50 +0000)]
Added TODO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47843 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded FIXME.
Ted Kremenek [Mon, 3 Mar 2008 16:47:31 +0000 (16:47 +0000)]
Added FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47842 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe attribute nothrow maps to llvm attribute nounwind. Fix testcase.
Gabor Greif [Mon, 3 Mar 2008 14:53:09 +0000 (14:53 +0000)]
The attribute nothrow maps to llvm attribute nounwind. Fix testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47841 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChris added this testcase with r47837. The mail only shows one todo-warning but I...
Gabor Greif [Mon, 3 Mar 2008 14:30:39 +0000 (14:30 +0000)]
Chris added this testcase with r47837. The mail only shows one todo-warning but I see 3. Strangeness. Correcting lines 16 and 24.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47840 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoavoid a warning.
Chris Lattner [Mon, 3 Mar 2008 05:57:43 +0000 (05:57 +0000)]
avoid a warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47839 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix codegen support for functions that are nothrow and noreturn.
Chris Lattner [Mon, 3 Mar 2008 03:45:26 +0000 (03:45 +0000)]
fix codegen support for functions that are nothrow and noreturn.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47838 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a bunch of attributes, patch by Nuno Lopes.
Chris Lattner [Mon, 3 Mar 2008 03:28:21 +0000 (03:28 +0000)]
Add a bunch of attributes, patch by Nuno Lopes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47837 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFind clang headers in the clang headers dir, search it before
Chris Lattner [Mon, 3 Mar 2008 03:16:03 +0000 (03:16 +0000)]
Find clang headers in the clang headers dir, search it before
the system headers dir.  This produces an annoying warning:
clang.cpp:883: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object

I'm not sure how to remove it. :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47836 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBuild the clang headers.
Chris Lattner [Mon, 3 Mar 2008 01:23:30 +0000 (01:23 +0000)]
Build the clang headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47834 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a makefile to build and install headers.
Chris Lattner [Mon, 3 Mar 2008 01:22:28 +0000 (01:22 +0000)]
Add a makefile to build and install headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47833 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoignore .ll files
Gabor Greif [Sat, 1 Mar 2008 12:57:27 +0000 (12:57 +0000)]
ignore .ll files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47794 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd codegen support for ObjC message expressions with the GNU runtime.
Chris Lattner [Sat, 1 Mar 2008 08:50:34 +0000 (08:50 +0000)]
Add codegen support for ObjC message expressions with the GNU runtime.
Patch by David Chisnall!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47790 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd codegen support for ObjC message expressions with the GNU runtime.
Chris Lattner [Sat, 1 Mar 2008 08:45:05 +0000 (08:45 +0000)]
Add codegen support for ObjC message expressions with the GNU runtime.
Patch by David Chisnall!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47789 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agonewline at end of file, by David Chisnall
Chris Lattner [Sat, 1 Mar 2008 08:43:22 +0000 (08:43 +0000)]
newline at end of file, by David Chisnall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47788 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agocharacter literals have char type in C++ and int type in C. Patch
Chris Lattner [Sat, 1 Mar 2008 08:32:21 +0000 (08:32 +0000)]
character literals have char type in C++ and int type in C.  Patch
by Nuno Lopes for PR2089

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47787 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for the CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH,
Chris Lattner [Sat, 1 Mar 2008 08:07:28 +0000 (08:07 +0000)]
Add support for the CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH,
OBJC_INCLUDE_PATH, and OBJCPLUS_INCLUDE_PATH environment variables.
Patch by Sam Bishop!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47785 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded extra check for calls to functions where we pass undefined values
Ted Kremenek [Fri, 29 Feb 2008 23:53:11 +0000 (23:53 +0000)]
Added extra check for calls to functions where we pass undefined values
as arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47778 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2103.
Steve Naroff [Fri, 29 Feb 2008 23:30:25 +0000 (23:30 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2103.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47775 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd checks for function calls via a function pointer that is NULL, Undefined,
Ted Kremenek [Fri, 29 Feb 2008 23:14:48 +0000 (23:14 +0000)]
Add checks for function calls via a function pointer that is NULL, Undefined,
or otherwise a constant integer value that doesn't evaluate to an address.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47774 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor CFG optimization: don't create separate block-level expressions for DeclStmt...
Ted Kremenek [Fri, 29 Feb 2008 22:32:24 +0000 (22:32 +0000)]
Minor CFG optimization: don't create separate block-level expressions for DeclStmt initializers when the initializer is a literal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47771 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen AST-dumping ObjCMessageExpr, output the selector.
Ted Kremenek [Fri, 29 Feb 2008 22:04:05 +0000 (22:04 +0000)]
When AST-dumping ObjCMessageExpr, output the selector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47769 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2106.
Steve Naroff [Fri, 29 Feb 2008 21:48:07 +0000 (21:48 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2106.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47768 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a crash where PI.TypeInfo has not been filled in case of missing ObjCInterfaceDecl.
Gabor Greif [Fri, 29 Feb 2008 20:35:55 +0000 (20:35 +0000)]
Fix a crash where PI.TypeInfo has not been filled in case of missing ObjCInterfaceDecl.

Happens with Xcode 2.4.1 headers on test
Parser/objc-foreach-error-1.m

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47767 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago"Refinement" of hack to bound loop-traversals: visit any block at a maximum of 3...
Ted Kremenek [Fri, 29 Feb 2008 20:27:50 +0000 (20:27 +0000)]
"Refinement" of hack to bound loop-traversals: visit any block at a maximum of 3 times along a given path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47766 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotestcase for attr deprecated, by Nuno Lopes.
Chris Lattner [Fri, 29 Feb 2008 18:11:31 +0000 (18:11 +0000)]
testcase for attr deprecated, by Nuno Lopes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47757 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake include guards more unique.
Chris Lattner [Fri, 29 Feb 2008 17:10:38 +0000 (17:10 +0000)]
make include guards more unique.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47754 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for attribute(deprecated), patch by Nuno Lopes!
Chris Lattner [Fri, 29 Feb 2008 16:48:43 +0000 (16:48 +0000)]
Add support for attribute(deprecated), patch by Nuno Lopes!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47753 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded simple hack to reduce redundant warnings from the checker:
Ted Kremenek [Thu, 28 Feb 2008 20:38:16 +0000 (20:38 +0000)]
Added simple hack to reduce redundant warnings from the checker:

Cache the location of the error.  Don't emit the same
warning for the same error type that occurs at the same program
location but along a different path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47727 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded checking for undefined results of '<<' and '>>' (shifting by too many bits...
Ted Kremenek [Thu, 28 Feb 2008 20:32:03 +0000 (20:32 +0000)]
Added checking for undefined results of '<<' and '>>' (shifting by too many bits, etc.)
This current implementation only works when both operands are concrete values; later we will add support for symbolic values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47726 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplementation of the first clang-native header, stdbool.h. Comments
Eli Friedman [Thu, 28 Feb 2008 19:45:29 +0000 (19:45 +0000)]
Implementation of the first clang-native header, stdbool.h. Comments
welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47724 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdated clang webpage to hint at "make update". Also
Gabor Greif [Thu, 28 Feb 2008 14:59:26 +0000 (14:59 +0000)]
Updated clang webpage to hint at "make update". Also
changed "very early" to "early" when talking about
the state of clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47718 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMerged ValueState and ValueStateImpl into just ValueState, with GRExprEngine::StateTy...
Ted Kremenek [Thu, 28 Feb 2008 10:21:43 +0000 (10:21 +0000)]
Merged ValueState and ValueStateImpl into just ValueState, with GRExprEngine::StateTy just becoming ValueState*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47714 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRenamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.
Ted Kremenek [Thu, 28 Feb 2008 09:25:22 +0000 (09:25 +0000)]
Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47713 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded parsing of attributes for functions.
Ted Kremenek [Wed, 27 Feb 2008 22:18:07 +0000 (22:18 +0000)]
Added parsing of attributes for functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47693 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed use of an uninitialized variable.
Ted Kremenek [Wed, 27 Feb 2008 20:47:56 +0000 (20:47 +0000)]
Fixed use of an uninitialized variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47691 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnd paths when calling a function marked "noreturn."
Ted Kremenek [Wed, 27 Feb 2008 20:43:44 +0000 (20:43 +0000)]
End paths when calling a function marked "noreturn."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47690 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded support for attribute "noreturn."
Ted Kremenek [Wed, 27 Feb 2008 20:43:06 +0000 (20:43 +0000)]
Added support for attribute "noreturn."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47689 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSmall tweaks to the transfer function for DeclStmt: do not mark external global
Ted Kremenek [Wed, 27 Feb 2008 19:21:33 +0000 (19:21 +0000)]
Small tweaks to the transfer function for DeclStmt: do not mark external global
variables as uninitialized, and only "initialize" static function variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47683 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDisable internalize. Unfortunately, the configure scripts are not ready for some...
Lauro Ramos Venancio [Wed, 27 Feb 2008 18:46:32 +0000 (18:46 +0000)]
Disable internalize. Unfortunately, the configure scripts are not ready for some link time optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47682 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemoved VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())
Ted Kremenek [Wed, 27 Feb 2008 18:39:48 +0000 (18:39 +0000)]
Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())
Removed VarDecl::hasAutoStorage() (only used by hasLocalStorage())

Merged logic from VarDecl::hasAutoStorage() into VarDecl::hasLocalStorage(),
and expanded (fixed) the logic of hasLocalStorage() to handle Extern and PrivateExtern.

Renamed Expr::hasStaticStorage() to Expr::hasGlobalStorage().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47681 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded string "[CHECKER]" to the output diagnostics produced by the GRSimpleVals analysis.
Ted Kremenek [Wed, 27 Feb 2008 17:56:16 +0000 (17:56 +0000)]
Added string "[CHECKER]" to the output diagnostics produced by the GRSimpleVals analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47678 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed edge-case in CFG construction where goto jumps would not always get
Ted Kremenek [Wed, 27 Feb 2008 17:33:02 +0000 (17:33 +0000)]
Fixed edge-case in CFG construction where goto jumps would not always get
properly back-patched.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47675 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoA, q and Z are valid LLVM inline asm constraints.
Lauro Ramos Venancio [Wed, 27 Feb 2008 16:53:36 +0000 (16:53 +0000)]
A, q and Z are valid LLVM inline asm constraints.
Fix regression in Applications/ClamAV/clamscan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47673 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBug fix in CFG construction: Properly register the loop head as the implicit
Ted Kremenek [Wed, 27 Feb 2008 07:20:00 +0000 (07:20 +0000)]
Bug fix in CFG construction: Properly register the loop head as the implicit
successor of blocks created above it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47666 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSmall fix to VisitLVal: this method can be called on Block-Level expressions.
Ted Kremenek [Wed, 27 Feb 2008 07:04:16 +0000 (07:04 +0000)]
Small fix to VisitLVal: this method can be called on Block-Level expressions.
In such cases, handle them just like Visit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47665 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen analyzing a function, eagerly create symbolic values for all
Ted Kremenek [Wed, 27 Feb 2008 06:47:26 +0000 (06:47 +0000)]
When analyzing a function, eagerly create symbolic values for all
globals/parameters at the beginning of the analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47664 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHeader file cleanups: reduce number of includes; move ValueState.h into include direc...
Ted Kremenek [Wed, 27 Feb 2008 06:07:00 +0000 (06:07 +0000)]
Header file cleanups: reduce number of includes; move ValueState.h into include directory tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47661 91177308-0d34-0410-b5e6-96231b3b80d8