]> granicus.if.org Git - clang/log
clang
16 years agoUpdate to use new PointerType::getUnqual() api.
Christopher Lamb [Mon, 17 Dec 2007 01:11:20 +0000 (01:11 +0000)]
Update to use new PointerType::getUnqual() api.

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

16 years agoStart generating SSE intrinsics.
Anders Carlsson [Sun, 16 Dec 2007 22:33:50 +0000 (22:33 +0000)]
Start generating SSE intrinsics.

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

16 years agoSema::ActOnMemberReferenceExpr() needs to perform the default conversions.
Steve Naroff [Sun, 16 Dec 2007 21:42:28 +0000 (21:42 +0000)]
Sema::ActOnMemberReferenceExpr() needs to perform the default conversions.

Bug and test case provided by Carl Lewis.

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

16 years agoswtich to smallptrset, which is more efficient than std::set.
Chris Lattner [Sat, 15 Dec 2007 23:20:07 +0000 (23:20 +0000)]
swtich to smallptrset, which is more efficient than std::set.

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

16 years agomake clang -v output more similar to gcc's -v output.
Chris Lattner [Sat, 15 Dec 2007 23:11:06 +0000 (23:11 +0000)]
make clang -v output more similar to gcc's -v output.

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

16 years agoWe now support all MMX intrinsics. SSE intrinsics are next.
Anders Carlsson [Sat, 15 Dec 2007 21:23:30 +0000 (21:23 +0000)]
We now support all MMX intrinsics. SSE intrinsics are next.

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

16 years agosimplify the interfaces to ProcessInputFile and InitializePreprocessor
Chris Lattner [Sat, 15 Dec 2007 20:48:40 +0000 (20:48 +0000)]
simplify the interfaces to ProcessInputFile and InitializePreprocessor

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

16 years agoRemoved "isSizeOfExpr" mode from StmtIterator. It turned out not to be
Ted Kremenek [Sat, 15 Dec 2007 00:39:18 +0000 (00:39 +0000)]
Removed "isSizeOfExpr" mode from StmtIterator.  It turned out not to be
so useful and introduced a few bugs.

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

16 years agoAdded "mode" to StmtIterator to record if the expression being iterated
Ted Kremenek [Fri, 14 Dec 2007 23:40:56 +0000 (23:40 +0000)]
Added "mode" to StmtIterator to record if the expression being iterated
over is the subexpression of a sizeof(expression).  Different clients
will wish to handle iteration over such subexpressions differently, and can
now easily query if they are iterating over such statements using the
StmtIterator's inSizeOfExpr().

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

16 years ago- Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDec...
Steve Naroff [Fri, 14 Dec 2007 23:37:57 +0000 (23:37 +0000)]
- Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...

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

16 years agoAdded support to StmtIterator to traverse the size expression of a VLA type
Ted Kremenek [Fri, 14 Dec 2007 22:52:23 +0000 (22:52 +0000)]
Added support to StmtIterator to traverse the size expression of a VLA type
declared in a sizeof.  For example:

 sizeof(int[foo()]);

the expression "foo()" is an expression that is executed during the evaluation
of sizeof.

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

16 years agoSimplify the vector code. Add more shift intrinsics.
Anders Carlsson [Fri, 14 Dec 2007 17:48:24 +0000 (17:48 +0000)]
Simplify the vector code. Add more shift intrinsics.

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

16 years agoIE Menu Problem...
Kevin [Fri, 14 Dec 2007 05:47:49 +0000 (05:47 +0000)]
IE Menu Problem...
Originally, I included CSS hacks for IE.
However, my comments before the doctype was the reason IE was running in non-strict mode.  I did not know this.
When Chris removed the comments, IE correctly went into strict mode and my IE hacks were no longer needed (the hacks were getting in the way now).
solution:
*) Make sure doctype is first on all files
*) removed all IE hacks from menu.css (since the doctype issue fixes IE)

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

16 years agoArray subscription in aggregate expression
Seo Sanghyeon [Fri, 14 Dec 2007 02:04:12 +0000 (02:04 +0000)]
Array subscription in aggregate expression

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

16 years agoImplement dereference operator in aggregate expression
Seo Sanghyeon [Fri, 14 Dec 2007 01:09:11 +0000 (01:09 +0000)]
Implement dereference operator in aggregate expression

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

16 years agoCFG bug fix: for sizeof(expressions), don't expand the control-flow
Ted Kremenek [Thu, 13 Dec 2007 22:44:18 +0000 (22:44 +0000)]
CFG bug fix: for sizeof(expressions), don't expand the control-flow
of "expressions", since they are not really evaluated.

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

16 years agoPatch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceType
Fariborz Jahanian [Thu, 13 Dec 2007 20:47:42 +0000 (20:47 +0000)]
Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceType

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

16 years agoSema::ActOnFinishFunctionBody(): Since we no longer synthesize a FunctionDecl for...
Steve Naroff [Thu, 13 Dec 2007 18:18:56 +0000 (18:18 +0000)]
Sema::ActOnFinishFunctionBody(): Since we no longer synthesize a FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment.

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

16 years agoAdd hack to SourceManager to support missing source files during
Ted Kremenek [Thu, 13 Dec 2007 18:12:10 +0000 (18:12 +0000)]
Add hack to SourceManager to support missing source files during
deserialization.  Eventually this should be replaced with a lazy-reading
mechanism that only reads source files when they are needed by clients.

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

16 years agoAdd check in the driver to see if a serialized AST file has been successfully
Ted Kremenek [Thu, 13 Dec 2007 18:11:11 +0000 (18:11 +0000)]
Add check in the driver to see if a serialized AST file has been successfully
deserialized.

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

16 years agoChanged set of top-level decls from a list to a vector.
Ted Kremenek [Thu, 13 Dec 2007 17:54:02 +0000 (17:54 +0000)]
Changed set of top-level decls from a list to a vector.

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

16 years agoChanged -serialize-ast to not create a temporary directory, but instead
Ted Kremenek [Thu, 13 Dec 2007 17:50:11 +0000 (17:50 +0000)]
Changed -serialize-ast to not create a temporary directory, but instead
create a .ast file in the current working directory.  This mirrors the behavior
of the -c option for gcc.  Later we should add the ability to write the
serialized file anywhere.

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

16 years agoSet target data layout info in module.
Chris Lattner [Thu, 13 Dec 2007 17:34:31 +0000 (17:34 +0000)]
Set target data layout info in module.

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

16 years agotypo
Chris Lattner [Thu, 13 Dec 2007 17:27:09 +0000 (17:27 +0000)]
typo

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

16 years agodebug info too.
Chris Lattner [Thu, 13 Dec 2007 17:25:36 +0000 (17:25 +0000)]
debug info too.

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

16 years agoMinor spelling; punctuation correction.
Ted Kremenek [Thu, 13 Dec 2007 16:41:01 +0000 (16:41 +0000)]
Minor spelling; punctuation correction.

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

16 years agoGrammar fix: correct ' usage.
Bill Wendling [Thu, 13 Dec 2007 09:57:40 +0000 (09:57 +0000)]
Grammar fix: correct ' usage.

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

16 years agominor cleanups
Chris Lattner [Thu, 13 Dec 2007 07:47:54 +0000 (07:47 +0000)]
minor cleanups

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

16 years agoadd some builtins.
Chris Lattner [Thu, 13 Dec 2007 07:41:58 +0000 (07:41 +0000)]
add some builtins.

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

16 years agosimplify some code.
Chris Lattner [Thu, 13 Dec 2007 07:34:23 +0000 (07:34 +0000)]
simplify some code.

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

16 years agoDon't do integer promotions of LHS for compound shift assignment. The LHS has to...
Chris Lattner [Thu, 13 Dec 2007 07:28:16 +0000 (07:28 +0000)]
Don't do integer promotions of LHS for compound shift assignment.  The LHS has to be a modifiable lvalue.

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

16 years agoremove some dead styles.
Chris Lattner [Thu, 13 Dec 2007 06:55:59 +0000 (06:55 +0000)]
remove some dead styles.

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

16 years agonuke hte status page.
Chris Lattner [Thu, 13 Dec 2007 06:55:02 +0000 (06:55 +0000)]
nuke hte status page.

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

16 years agoadd a bunch of open projects
Chris Lattner [Thu, 13 Dec 2007 06:41:15 +0000 (06:41 +0000)]
add a bunch of open projects

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

16 years agoUpdated serialization of ParmVarDecl to serialize out objcDeclQualifier.
Ted Kremenek [Thu, 13 Dec 2007 06:28:13 +0000 (06:28 +0000)]
Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.
Previously this field was serialized out in VarDecl (a parent class), but
now the field belongs to ParmVarDecl.

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

16 years agosplit get_involved into two pages: get_started and get_involved.
Chris Lattner [Thu, 13 Dec 2007 06:20:15 +0000 (06:20 +0000)]
split get_involved into two pages: get_started and get_involved.

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

16 years agowrap to 80 cols, many fixes to markup.
Chris Lattner [Thu, 13 Dec 2007 05:42:27 +0000 (05:42 +0000)]
wrap to 80 cols, many fixes to markup.

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

16 years agoFor uninitialized values analysis, added special treatment for declarations
Ted Kremenek [Thu, 13 Dec 2007 05:14:22 +0000 (05:14 +0000)]
For uninitialized values analysis, added special treatment for declarations
of array types.  For things like:

  char x[10];

we should treat "x" as being initialized, because the variable "x" really
refers to the memory block of the array. Clearly x[1] is uninitialized, but
expressions like "(char*) x" really do refer to an initialized value. This
simple dataflow analysis does not reason about the contents of arrays.

This fixes: PR 1859 (http://llvm.org/bugs/show_bug.cgi?id=1859)

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

16 years agoFix file header.
Chris Lattner [Thu, 13 Dec 2007 05:02:35 +0000 (05:02 +0000)]
Fix file header.

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

16 years agoFixed bug in live-variable analysis and uninitialized-values analysis where
Ted Kremenek [Thu, 13 Dec 2007 04:47:15 +0000 (04:47 +0000)]
Fixed bug in live-variable analysis and uninitialized-values analysis where
we incorrectly examine the expression within a sizeof() for use in computing
dataflow values.

This fixes: PR 1858 (http://llvm.org/bugs/show_bug.cgi?id=1858)

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

16 years agouse new interface.
Chris Lattner [Thu, 13 Dec 2007 02:05:09 +0000 (02:05 +0000)]
use new interface.

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

16 years agoadd a helper method.
Chris Lattner [Thu, 13 Dec 2007 01:59:49 +0000 (01:59 +0000)]
add a helper method.

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

16 years agoAdd assert to detect incomplete implementation work.
Devang Patel [Thu, 13 Dec 2007 01:24:16 +0000 (01:24 +0000)]
Add assert to detect incomplete implementation work.

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

16 years agoMoved ObjcDeclQualifier to ParmVarDecl from VarDecl.
Fariborz Jahanian [Thu, 13 Dec 2007 00:54:18 +0000 (00:54 +0000)]
Moved ObjcDeclQualifier to ParmVarDecl from VarDecl.
Ted, this change necessitates (de)/serialization of ParmVarDecl.

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

16 years agobuiltin id 0 is invalid, don't use a slot for it.
Chris Lattner [Thu, 13 Dec 2007 00:38:03 +0000 (00:38 +0000)]
builtin id 0 is invalid, don't use a slot for it.

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

16 years agoImplemented -serialize-ast option for the driver. This is not really tested
Ted Kremenek [Thu, 13 Dec 2007 00:37:31 +0000 (00:37 +0000)]
Implemented -serialize-ast option for the driver.  This is not really tested
and is a work in progress.

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

16 years agoFixed test to match the new diagnostic text.
Fariborz Jahanian [Thu, 13 Dec 2007 00:16:34 +0000 (00:16 +0000)]
Fixed test to match the new diagnostic text.

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

16 years agoConcatenation of objc strings.
Fariborz Jahanian [Wed, 12 Dec 2007 23:55:49 +0000 (23:55 +0000)]
Concatenation of objc strings.

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

16 years agofix off-by-one error.
Chris Lattner [Wed, 12 Dec 2007 23:46:36 +0000 (23:46 +0000)]
fix off-by-one error.

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

16 years agoImplemented prototype mode where the driver can operate on serialized ASTs
Ted Kremenek [Wed, 12 Dec 2007 23:41:08 +0000 (23:41 +0000)]
Implemented prototype mode where the driver can operate on serialized ASTs
instead of source files.

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

16 years agoTargetInfo no longer includes a reference to SourceManager.
Ted Kremenek [Wed, 12 Dec 2007 22:39:36 +0000 (22:39 +0000)]
TargetInfo no longer includes a reference to SourceManager.

Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:

    FullLoc.getManager().someMethod(FullLoc.getLocation());

instead we have:

    FullLoc.someMethod();

Modified TextDiagnostics (and related classes) to use this short-hand.

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

16 years agoEncode enumeral types.
Steve Naroff [Wed, 12 Dec 2007 22:30:11 +0000 (22:30 +0000)]
Encode enumeral types.

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

16 years agoRemoved "NULL" from default construction of FullSourceLoc (compilation errors on
Ted Kremenek [Wed, 12 Dec 2007 19:39:40 +0000 (19:39 +0000)]
Removed "NULL" from default construction of FullSourceLoc (compilation errors on
some systems).

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

16 years agoconstified getFullLoc().
Ted Kremenek [Wed, 12 Dec 2007 18:55:29 +0000 (18:55 +0000)]
constified getFullLoc().

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

16 years agoChanges to FullSourceLoc:
Ted Kremenek [Wed, 12 Dec 2007 18:54:21 +0000 (18:54 +0000)]
Changes to FullSourceLoc:
  - Added cstor that takes no arguments to create an "invalid" location.
  - Removed non-const version of getSourceManager().
  - Renamed getSourceManager() to getManager.
  - Remover operator SourceLocatio().

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

16 years agoRenamed getFullSourceLoc() -> getFullLoc().
Ted Kremenek [Wed, 12 Dec 2007 18:46:37 +0000 (18:46 +0000)]
Renamed getFullSourceLoc() -> getFullLoc().

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

16 years agoAdded method: Preprocessor::getFullSourceLoc. Used by clients of Preprocessor
Ted Kremenek [Wed, 12 Dec 2007 18:41:40 +0000 (18:41 +0000)]
Added method: Preprocessor::getFullSourceLoc.  Used by clients of Preprocessor
to get a FullSourceLoc from a SourceLocation.

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

16 years agoRenamed FullContextSourceLocation to FullSourceLoc.
Ted Kremenek [Wed, 12 Dec 2007 18:32:04 +0000 (18:32 +0000)]
Renamed FullContextSourceLocation to FullSourceLoc.

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

16 years agoAdded utility static method to FullContextSourceLocation
Ted Kremenek [Wed, 12 Dec 2007 18:20:34 +0000 (18:20 +0000)]
Added utility static method to FullContextSourceLocation
for creating "invalid" location objects.

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

16 years agomake it a bit more clear in what way the ivar is consistent.
Chris Lattner [Wed, 12 Dec 2007 18:19:52 +0000 (18:19 +0000)]
make it a bit more clear in what way the ivar is consistent.

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

16 years agoadd an ivar_size() method that never returns -1.
Chris Lattner [Wed, 12 Dec 2007 18:19:33 +0000 (18:19 +0000)]
add an ivar_size() method that never returns -1.

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

16 years agoConstified a predicate method.
Ted Kremenek [Wed, 12 Dec 2007 18:18:05 +0000 (18:18 +0000)]
Constified a predicate method.

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

16 years agoAdded class FullContextSourceLocation: a tuple class that
Ted Kremenek [Wed, 12 Dec 2007 18:16:46 +0000 (18:16 +0000)]
Added class FullContextSourceLocation: a tuple class that
contains both a SourceLocation and its associated
SourceManager. This class is useful for argument passing to
functions that expect both objects.

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

16 years agosimplify some code, bump j. This fixes the remaining test failures.
Chris Lattner [Wed, 12 Dec 2007 18:11:49 +0000 (18:11 +0000)]
simplify some code, bump j.  This fixes the remaining test failures.

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

16 years agoMoved construction of TargetInfo objects out of the Driver
Ted Kremenek [Wed, 12 Dec 2007 18:05:32 +0000 (18:05 +0000)]
Moved construction of TargetInfo objects out of the Driver
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.

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

16 years agohandle the -1'ness of undefined lists
Chris Lattner [Wed, 12 Dec 2007 18:02:31 +0000 (18:02 +0000)]
handle the -1'ness of undefined lists

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

16 years agounbreak the build. I'm still working on test failures.
Chris Lattner [Wed, 12 Dec 2007 17:58:05 +0000 (17:58 +0000)]
unbreak the build.  I'm still working on test failures.

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

16 years agofix typo
Chris Lattner [Wed, 12 Dec 2007 08:17:45 +0000 (08:17 +0000)]
fix typo

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

16 years agomore cleanups changing things like getInstanceVariables to iterators.
Chris Lattner [Wed, 12 Dec 2007 07:56:42 +0000 (07:56 +0000)]
more cleanups changing things like getInstanceVariables to iterators.

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

16 years agoresolve some fixmes and clean up some code by eliminating the get*Vars apis to some...
Chris Lattner [Wed, 12 Dec 2007 07:46:12 +0000 (07:46 +0000)]
resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.

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

16 years agostart cleaning up interfaces for objc bits and pieces by switching to an
Chris Lattner [Wed, 12 Dec 2007 07:30:05 +0000 (07:30 +0000)]
start cleaning up interfaces for objc bits and pieces by switching to an
iterator interface.

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

16 years agosplit objc pieces of SemaDecl.cpp out into SemaDeclObjC.cpp
Chris Lattner [Wed, 12 Dec 2007 07:09:47 +0000 (07:09 +0000)]
split objc pieces of SemaDecl.cpp out into SemaDeclObjC.cpp

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

16 years agoAdded back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:
Ted Kremenek [Wed, 12 Dec 2007 06:59:42 +0000 (06:59 +0000)]
Added back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:

http://llvm.org/viewvc/llvm-project?rev=44920&view=rev

Putting VisitDeclStmt() was motivated because it called DumpDeclarator(),
which printed out a little bit more information than just using the
child_iterator interface to visit the subexpressions of DeclStmt. To avoid
printing the initializers twice, DumpSubTree() now specially checks for
DeclStmts; in such cases it calls VisitDeclStmt() without using the
child_iterators to visit the subexpressions.

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

16 years agomove function to a more logical location, add its grammar productions.
Chris Lattner [Wed, 12 Dec 2007 06:56:32 +0000 (06:56 +0000)]
move function to a more logical location, add its grammar productions.

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

16 years agoremove todo
Chris Lattner [Wed, 12 Dec 2007 06:54:22 +0000 (06:54 +0000)]
remove todo

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

16 years agoRemoved VisitDeclStmt(). The initializers of a DeclStmt are now automatically
Ted Kremenek [Wed, 12 Dec 2007 06:44:12 +0000 (06:44 +0000)]
Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically
printed out by DumpSubTree() via the child_iterator interface. This fixes a
bug where the initializers were being dumped twice.

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

16 years agoUnbreak -stats on cocoa.h
Chris Lattner [Wed, 12 Dec 2007 06:43:05 +0000 (06:43 +0000)]
Unbreak -stats on cocoa.h

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

16 years agoadd run lines.
Chris Lattner [Wed, 12 Dec 2007 06:22:14 +0000 (06:22 +0000)]
add run lines.

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

16 years agoadd run line
Chris Lattner [Wed, 12 Dec 2007 06:20:40 +0000 (06:20 +0000)]
add run line

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

16 years agoadd runline, make this test real.
Chris Lattner [Wed, 12 Dec 2007 06:20:18 +0000 (06:20 +0000)]
add runline, make this test real.

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

16 years agoverify that tests contain RUN lines.
Chris Lattner [Wed, 12 Dec 2007 06:19:22 +0000 (06:19 +0000)]
verify that tests contain RUN lines.

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

16 years agosimplify some code.
Chris Lattner [Wed, 12 Dec 2007 06:13:27 +0000 (06:13 +0000)]
simplify some code.

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

16 years agoimplement correct semantic analysis for shifts. For:
Chris Lattner [Wed, 12 Dec 2007 05:47:28 +0000 (05:47 +0000)]
implement correct semantic analysis for shifts.  For:
int test(int x, long long y) {
  return x << y;
}

we now realize the type of the shift is int, not long long.

This fixes a fixme from june.

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

16 years agoSimplify some code, don't force the triple to a darwin triple if non-darwin.
Chris Lattner [Wed, 12 Dec 2007 05:01:48 +0000 (05:01 +0000)]
Simplify some code, don't force the triple to a darwin triple if non-darwin.

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

16 years agotypo reported by Gabor Greif
Chris Lattner [Wed, 12 Dec 2007 04:22:37 +0000 (04:22 +0000)]
typo reported by Gabor Greif

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

16 years agoFix a codegen crash on test/CodeGen/cast.c, reported by Keith.
Chris Lattner [Wed, 12 Dec 2007 04:13:20 +0000 (04:13 +0000)]
Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.

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

16 years agofix typo pointed out by gordon
Chris Lattner [Wed, 12 Dec 2007 03:33:41 +0000 (03:33 +0000)]
fix typo pointed out by gordon

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

16 years agofix expected errors.
Chris Lattner [Wed, 12 Dec 2007 01:15:04 +0000 (01:15 +0000)]
fix expected errors.

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

16 years agoAdd -pedantic so test passes.
Fariborz Jahanian [Wed, 12 Dec 2007 01:06:09 +0000 (01:06 +0000)]
Add -pedantic so test passes.

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

16 years agoAdd ObjC parser support for concatenated ObjC strings. Note that
Chris Lattner [Wed, 12 Dec 2007 01:04:12 +0000 (01:04 +0000)]
Add ObjC parser support for concatenated ObjC strings.  Note that
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST.  Passing to Fariborz to finish
Sema + AST construction.

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

16 years agoImplemented type checking for pointer of objects of protocol-qualified types.
Fariborz Jahanian [Wed, 12 Dec 2007 01:00:23 +0000 (01:00 +0000)]
Implemented type checking for pointer of objects of protocol-qualified types.
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..

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

16 years agoMoved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptions
Ted Kremenek [Tue, 11 Dec 2007 23:28:38 +0000 (23:28 +0000)]
Moved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptions
into the loop that processes input files. These will soon become translation
unit specific (with the exception of LangOptions).

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

16 years agosimplify code now that isConstantExpr really does always
Chris Lattner [Tue, 11 Dec 2007 23:15:04 +0000 (23:15 +0000)]
simplify code now that isConstantExpr really does always
return a loc.

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

16 years agoFix a case where we'd return "is not a constant expr" without
Chris Lattner [Tue, 11 Dec 2007 23:11:17 +0000 (23:11 +0000)]
Fix a case where we'd return "is not a constant expr" without
return a location.

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

16 years ago80-column please.
Fariborz Jahanian [Tue, 11 Dec 2007 23:04:08 +0000 (23:04 +0000)]
80-column please.

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

16 years agoModified the internals of Diagnostic and DiagnosticClient to use
Ted Kremenek [Tue, 11 Dec 2007 22:57:35 +0000 (22:57 +0000)]
Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".

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

16 years agoImplemented rewriting of protocol-qualified global variable types.
Fariborz Jahanian [Tue, 11 Dec 2007 22:50:14 +0000 (22:50 +0000)]
Implemented rewriting of protocol-qualified global variable types.
Re-implemented some of rewriting of protocol-qualified function
argument types to support it in its generality.

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

16 years agogcc supports more targets.
Chris Lattner [Tue, 11 Dec 2007 22:32:45 +0000 (22:32 +0000)]
gcc supports more targets.

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

16 years agoupdate pch discussion
Chris Lattner [Tue, 11 Dec 2007 22:29:38 +0000 (22:29 +0000)]
update pch discussion

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

16 years agoimprove title
Chris Lattner [Tue, 11 Dec 2007 22:26:03 +0000 (22:26 +0000)]
improve title

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