]> granicus.if.org Git - clang/log
clang
16 years agoPatch for PR2334, and a similar ObjC bug.
Eli Friedman [Fri, 16 May 2008 17:37:11 +0000 (17:37 +0000)]
Patch for PR2334, and a similar ObjC bug.

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

16 years agoAdded CFGBlock::hasBinaryBranchTerminator().
Ted Kremenek [Fri, 16 May 2008 16:06:00 +0000 (16:06 +0000)]
Added CFGBlock::hasBinaryBranchTerminator().

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

16 years agoMinor cleanup to isBuiltinConstantExpr.
Eli Friedman [Fri, 16 May 2008 13:28:37 +0000 (13:28 +0000)]
Minor cleanup to isBuiltinConstantExpr.

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

16 years agoFixed another regression introduced by r51113 caused by some refactoring
Ted Kremenek [Thu, 15 May 2008 22:24:49 +0000 (22:24 +0000)]
Fixed another regression introduced by r51113 caused by some refactoring
in Sema::CheckFunctionCall:

  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html

The bug was that the logic from the helper methods used by CheckFunctionCall
were being inverted (a subtle bug).  This would cause the parser to discard
any valid AST nodes involving several builtins (see patch).

This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn.

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

16 years agoRemoved bogus "return true" in Expr::isConstantExpr that returned true for all
Ted Kremenek [Thu, 15 May 2008 21:49:04 +0000 (21:49 +0000)]
Removed bogus "return true" in Expr::isConstantExpr that returned true for all
expressions. This appears to be a regression introduced in r51113 that caused
many test cases to fail (there is still a test case in the Analysis directory
that is failing):

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html

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

16 years agoFix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConsta...
Steve Naroff [Thu, 15 May 2008 21:12:10 +0000 (21:12 +0000)]
Fix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C".

Have clang predefine OBJC_NEW_PROPERTIES (which is what gcc does).

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

16 years agoRevert...
Steve Naroff [Thu, 15 May 2008 19:53:06 +0000 (19:53 +0000)]
Revert...

Author: akirtzidis
Date: Wed May 14 05:00:15 2008
New Revision: 51101

URL: http://llvm.org/viewvc/llvm-project?rev=51101&view=rev
Log: Upgrading VC++ projects to VC++ 2008.

I really need to build with VC++ 2005.

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

16 years agoMake isFileVarDecl() return true when the VarDecl is in a C++ namespace.
Argyrios Kyrtzidis [Thu, 15 May 2008 17:53:43 +0000 (17:53 +0000)]
Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.

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

16 years agoComments fix.
Argyrios Kyrtzidis [Thu, 15 May 2008 17:26:35 +0000 (17:26 +0000)]
Comments fix.

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

16 years agoHandle a couple missing builtins that will go away eventually when the various
Nate Begeman [Thu, 15 May 2008 07:38:03 +0000 (07:38 +0000)]
Handle a couple missing builtins that will go away eventually when the various
intrin.h files are finished

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

16 years agoAdd some of GCC's object checking builtin's.
Steve Naroff [Wed, 14 May 2008 22:12:15 +0000 (22:12 +0000)]
Add some of GCC's object checking builtin's.

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

16 years agoUse double-underscores in front of all non-keywords to protect against
Eli Friedman [Wed, 14 May 2008 20:32:22 +0000 (20:32 +0000)]
Use double-underscores in front of all non-keywords to protect against
#define pollution.

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

16 years agoDon't specify a -o option to clang when not using "-checker-cfref".
Ted Kremenek [Wed, 14 May 2008 20:26:52 +0000 (20:26 +0000)]
Don't specify a -o option to clang when not using "-checker-cfref".

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

16 years agoFix variable misspelling.
Ted Kremenek [Wed, 14 May 2008 20:20:46 +0000 (20:20 +0000)]
Fix variable misspelling.

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

16 years agoDon't run clang on .s files.
Ted Kremenek [Wed, 14 May 2008 20:17:17 +0000 (20:17 +0000)]
Don't run clang on .s files.

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

16 years agoMake header use the new __builtin_shufflevector builtin.
Eli Friedman [Wed, 14 May 2008 20:11:29 +0000 (20:11 +0000)]
Make header use the new __builtin_shufflevector builtin.

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

16 years agoAdded "-a" option to scan-build to select the analysis (ASTConsumer) used by clang...
Ted Kremenek [Wed, 14 May 2008 20:10:33 +0000 (20:10 +0000)]
Added "-a" option to scan-build to select the analysis (ASTConsumer) used by clang.  The default is -checker-cfref.

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

16 years agoImplementation of __builtin_shufflevector, a portable builtin capable of
Eli Friedman [Wed, 14 May 2008 19:38:39 +0000 (19:38 +0000)]
Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.

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

16 years agoZero-pad the month and day fields in the output HTML directory.
Ted Kremenek [Wed, 14 May 2008 17:23:56 +0000 (17:23 +0000)]
Zero-pad the month and day fields in the output HTML directory.

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

16 years agoUpdate the clangSema VC++ project.
Argyrios Kyrtzidis [Wed, 14 May 2008 10:50:44 +0000 (10:50 +0000)]
Update the clangSema VC++ project.

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

16 years agoChange CRLF line endings to LF.
Argyrios Kyrtzidis [Wed, 14 May 2008 10:49:47 +0000 (10:49 +0000)]
Change CRLF line endings to LF.

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

16 years agoUpgrading VC++ projects to VC++ 2008.
Argyrios Kyrtzidis [Wed, 14 May 2008 10:00:15 +0000 (10:00 +0000)]
Upgrading VC++ projects to VC++ 2008.

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

16 years agoAn array of VLAs is a VLA. Shouldn't make any significant difference at
Eli Friedman [Wed, 14 May 2008 00:40:18 +0000 (00:40 +0000)]
An array of VLAs is a VLA.  Shouldn't make any significant difference at
the moment, but it what you'd expect in the AST from reading the
standard, and it should make VLA codegen a bit more strightforward.

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

16 years agoAdd codegen support for block-level compound literals.
Eli Friedman [Tue, 13 May 2008 23:18:27 +0000 (23:18 +0000)]
Add codegen support for block-level compound literals.

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

16 years agoAdd support for init lists for complex variables.
Eli Friedman [Tue, 13 May 2008 23:11:35 +0000 (23:11 +0000)]
Add support for init lists for complex variables.

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

16 years agoOutput #LINE for computing line counts.
Ted Kremenek [Tue, 13 May 2008 22:56:36 +0000 (22:56 +0000)]
Output #LINE for computing line counts.

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

16 years agoUse "-i" option with make when ignoring errors.
Ted Kremenek [Tue, 13 May 2008 21:28:02 +0000 (21:28 +0000)]
Use "-i" option with make when ignoring errors.

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

16 years agoRemove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.
Nate Begeman [Tue, 13 May 2008 21:03:02 +0000 (21:03 +0000)]
Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.

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

16 years agoBoth operands to && have to be scalars, not just one.
Eli Friedman [Tue, 13 May 2008 20:16:47 +0000 (20:16 +0000)]
Both operands to && have to be scalars, not just one.

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

16 years agoRe-enable the analyzer.
Ted Kremenek [Tue, 13 May 2008 17:10:28 +0000 (17:10 +0000)]
Re-enable the analyzer.

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

16 years agoDetabify.
Eli Friedman [Tue, 13 May 2008 14:40:48 +0000 (14:40 +0000)]
Detabify.

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

16 years agoPlace "-x" option before other analyzer options.
Ted Kremenek [Mon, 12 May 2008 23:56:50 +0000 (23:56 +0000)]
Place "-x" option before other analyzer options.

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

16 years agoDirectly invoke gcc immediately instead of before we process the command line arguments.
Ted Kremenek [Mon, 12 May 2008 23:47:41 +0000 (23:47 +0000)]
Directly invoke gcc immediately instead of before we process the command line arguments.

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

16 years agoFix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors...
Steve Naroff [Mon, 12 May 2008 22:36:43 +0000 (22:36 +0000)]
Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not.

Teach Sema::MergeVarDecl() about __private_extern__.

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

16 years agoAdded internal command logging.
Ted Kremenek [Mon, 12 May 2008 22:07:14 +0000 (22:07 +0000)]
Added internal command logging.

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

16 years agoFix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int...
Steve Naroff [Mon, 12 May 2008 21:44:38 +0000 (21:44 +0000)]
Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats

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

16 years agotestcase for PR2263, fixed by Nate's r50903 patch.
Chris Lattner [Mon, 12 May 2008 18:31:17 +0000 (18:31 +0000)]
testcase for PR2263, fixed by Nate's r50903 patch.

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

16 years agoUnbreak build.
Ted Kremenek [Mon, 12 May 2008 17:42:30 +0000 (17:42 +0000)]
Unbreak build.

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

16 years agoSupport StringLiteralVal when comparing LVal types.
Ted Kremenek [Mon, 12 May 2008 17:41:30 +0000 (17:41 +0000)]
Support StringLiteralVal when comparing LVal types.

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

16 years agoGrammar cleanup in comment.
Ted Kremenek [Mon, 12 May 2008 17:40:56 +0000 (17:40 +0000)]
Grammar cleanup in comment.
Remove redundant assignment.

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

16 years ago80 col violation fix.
Ted Kremenek [Mon, 12 May 2008 17:40:13 +0000 (17:40 +0000)]
80 col violation fix.

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

16 years agoWhen reading in the DeclCtx during deserialization, register the DeclCtx of the
Ted Kremenek [Mon, 12 May 2008 17:29:34 +0000 (17:29 +0000)]
When reading in the DeclCtx during deserialization, register the DeclCtx of the
ScopedDecl with the backpatcher, and *not* a local variable on the stack. The
value of DeclCtx gets filled in *later* by the backpatcher.

This fixes: http://llvm.org/bugs/show_bug.cgi?id=2308

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

16 years agoAdd Type::getAsTypedefType().
Ted Kremenek [Mon, 12 May 2008 16:22:53 +0000 (16:22 +0000)]
Add Type::getAsTypedefType().

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

16 years agoEmit basic block for switch body; fixes PR2307.
Eli Friedman [Mon, 12 May 2008 16:08:04 +0000 (16:08 +0000)]
Emit basic block for switch body; fixes PR2307.

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

16 years agoDon't try to take the address of a bitfield; fixes PR2310.
Eli Friedman [Mon, 12 May 2008 15:06:05 +0000 (15:06 +0000)]
Don't try to take the address of a bitfield; fixes PR2310.

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

16 years agofix free/delete mismatch problem in add/mergeProperties (found by valgrind)
Nuno Lopes [Sat, 10 May 2008 10:31:54 +0000 (10:31 +0000)]
fix free/delete mismatch problem in add/mergeProperties (found by valgrind)

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

16 years agoImplement -rewrite-macros, which is a crazy macro expander that expands
Chris Lattner [Sat, 10 May 2008 00:02:33 +0000 (00:02 +0000)]
Implement -rewrite-macros, which is a crazy macro expander that expands
macros but doesn't expand #includes, remove comments, remove #defines
etc.

For example:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x

bbaa  bbaa

#if 1
funclike("gar")
foo /*blah*/  bar
bar
#endif

#if 0
funclike()
#endif
----

rewrites to:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x

/*bbaa  bbaa*/

#if 1
 "gar" "a" "gar" "b" "gar"/*funclike*//*("gar")*/
foo /*blah*/  bar
bar
#endif

#if 0
/*funclike()*/
#endif
----

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

16 years agoRename IsPointerType to LVal::IsLValType, and update CFRefCount::EvalSummary to use...
Ted Kremenek [Fri, 9 May 2008 23:45:33 +0000 (23:45 +0000)]
Rename IsPointerType to LVal::IsLValType, and update CFRefCount::EvalSummary to use IsLValType when conjuring symbols for return values (this fixes a bug with an assertion firing in the analyzer when two qualified objective-c types were compared).

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

16 years ago-Implement proper name lookup for namespaces.
Argyrios Kyrtzidis [Fri, 9 May 2008 23:39:43 +0000 (23:39 +0000)]
-Implement proper name lookup for namespaces.
-identifierResolver exposes an iterator interface to get all decls through the scope chain.
-The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier.

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

16 years agomake #if 0 code compile, even though it still isn't very useful.
Chris Lattner [Fri, 9 May 2008 22:43:24 +0000 (22:43 +0000)]
make #if 0 code compile, even though it still isn't very useful.

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

16 years agoAdded support to generate some atomic operators (add, sub, and, or etc..)
Mon P Wang [Fri, 9 May 2008 22:40:52 +0000 (22:40 +0000)]
Added support to generate some atomic operators (add, sub, and, or etc..)

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

16 years agoFix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw declaration...
Steve Naroff [Fri, 9 May 2008 21:17:56 +0000 (21:17 +0000)]
Fix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw declaration in preamble does not match objc/objc-exception.h.

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

16 years agoDO NOT pre-defined __OBJC2__. The __OBJC2__ macro should only be defined when targeti...
Steve Naroff [Fri, 9 May 2008 20:52:28 +0000 (20:52 +0000)]
DO NOT pre-defined __OBJC2__. The __OBJC2__ macro should only be defined when targeting the new, Apple 2.0 *runtime ABI*. It is not intended to be used to #ifdef ObjC 2.0 langauge features. This is unfortunate (given it's name). In a perfect world, this defined would be named __OBJC2_RUNTIME_ABI__. Oh well.

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

16 years agoMore VC++ project file updates.
Steve Naroff [Fri, 9 May 2008 19:10:27 +0000 (19:10 +0000)]
More VC++ project file updates.

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

16 years agoRemove repeated word.
Ted Kremenek [Fri, 9 May 2008 17:53:57 +0000 (17:53 +0000)]
Remove repeated word.

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

16 years agoAdd attribute "format" support for typedefs of function pointers.
Ted Kremenek [Fri, 9 May 2008 17:36:24 +0000 (17:36 +0000)]
Add attribute "format" support for typedefs of function pointers.

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

16 years agoGrammar.
Ted Kremenek [Fri, 9 May 2008 17:13:18 +0000 (17:13 +0000)]
Grammar.

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

16 years agoAdded text on librewrite and libanalysis to the README.
Ted Kremenek [Fri, 9 May 2008 17:12:45 +0000 (17:12 +0000)]
Added text on librewrite and libanalysis to the README.

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

16 years agoHandle all attributes on a parameter
Nate Begeman [Fri, 9 May 2008 16:56:01 +0000 (16:56 +0000)]
Handle all attributes on a parameter

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

16 years agoExtend vector member references to include {.hi, .lo, .e, .o} which return a
Nate Begeman [Fri, 9 May 2008 06:41:27 +0000 (06:41 +0000)]
Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector.  This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.

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

16 years agoset long/pointers to 64-bits on ppc64/x86-64
Chris Lattner [Fri, 9 May 2008 06:17:04 +0000 (06:17 +0000)]
set long/pointers to 64-bits on ppc64/x86-64

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

16 years agoparameterize pointer size/align better without doing virtual method calls in normal...
Chris Lattner [Fri, 9 May 2008 06:08:39 +0000 (06:08 +0000)]
parameterize pointer size/align better without doing virtual method calls in normal case.

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

16 years agosimplify some code, don't assume that sizeof(long) < sizeof(long long).
Chris Lattner [Fri, 9 May 2008 05:59:00 +0000 (05:59 +0000)]
simplify some code, don't assume that sizeof(long) < sizeof(long long).

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

16 years agoparameterize long long.
Chris Lattner [Fri, 9 May 2008 05:50:02 +0000 (05:50 +0000)]
parameterize long long.

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

16 years agocorrectly parameterize long, patch by Nate.
Chris Lattner [Fri, 9 May 2008 05:47:41 +0000 (05:47 +0000)]
correctly parameterize long, patch by Nate.

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

16 years agoFix rdar://5921025 a crash on the included testcase.
Chris Lattner [Fri, 9 May 2008 05:34:49 +0000 (05:34 +0000)]
Fix rdar://5921025 a crash on the included testcase.

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

16 years agoDon't call into objc front-end when not parsing objc code. This avoids
Chris Lattner [Fri, 9 May 2008 05:28:21 +0000 (05:28 +0000)]
Don't call into objc front-end when not parsing objc code.  This avoids
crashes because objc types aren't set up right.

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

16 years agoMake sure the prototype for objc_msgSend_fpret() returns a double.
Steve Naroff [Thu, 8 May 2008 22:02:18 +0000 (22:02 +0000)]
Make sure the prototype for objc_msgSend_fpret() returns a double.

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

16 years agoAdd the non-immediate-shift vector builtins
Nate Begeman [Thu, 8 May 2008 21:51:12 +0000 (21:51 +0000)]
Add the non-immediate-shift vector builtins

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

16 years agoAdded initial support for supporting __NSString__ in attribute "format".
Ted Kremenek [Thu, 8 May 2008 19:43:35 +0000 (19:43 +0000)]
Added initial support for supporting __NSString__ in attribute "format".
Still need to iron out some of the semantics (fixmes are present).
This addresses <rdar://problem/5916348>

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

16 years agoUpdated Xcode project.
Ted Kremenek [Thu, 8 May 2008 19:20:24 +0000 (19:20 +0000)]
Updated Xcode project.

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

16 years agoFix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure...
Steve Naroff [Thu, 8 May 2008 17:52:16 +0000 (17:52 +0000)]
Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure generated for class

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

16 years agoAdded -g command line options to clang for generating source level debug information...
Sanjiv Gupta [Thu, 8 May 2008 08:54:20 +0000 (08:54 +0000)]
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.

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

16 years agoRemove the ending "." from clang options descriptions.
Sanjiv Gupta [Thu, 8 May 2008 08:28:14 +0000 (08:28 +0000)]
Remove the ending "." from clang options descriptions.

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

16 years agostart implementation of a macro rewriter, this is currently just stubbed out.
Chris Lattner [Thu, 8 May 2008 06:52:13 +0000 (06:52 +0000)]
start implementation of a macro rewriter, this is currently just stubbed out.

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

16 years agoAdd basic support for the pic-* target triples and add support for
Chris Lattner [Thu, 8 May 2008 05:58:21 +0000 (05:58 +0000)]
Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!

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

16 years agoThe awesome GNU "comma elision extension" works with both the standard
Chris Lattner [Thu, 8 May 2008 05:10:33 +0000 (05:10 +0000)]
The awesome GNU "comma elision extension" works with both the standard
__VA_ARGS__ syntax as well as with the amazingly awesome GNU "named
variadic macro" extension.  Allow it with the GNU syntax as well.

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

16 years agoFix rdar://5919567: assertion failure: split didn't occur before erase!
Chris Lattner [Thu, 8 May 2008 03:23:46 +0000 (03:23 +0000)]
Fix rdar://5919567: assertion failure: split didn't occur before erase!

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

16 years agoBegin handling union bitfields.
Devang Patel [Wed, 7 May 2008 22:28:29 +0000 (22:28 +0000)]
Begin handling union bitfields.
Note, this is just beginning.

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

16 years agoFix <rdar://problem/5887874> clang ObjC rewriter: Use a different name for 'offsetof...
Steve Naroff [Wed, 7 May 2008 21:23:49 +0000 (21:23 +0000)]
Fix <rdar://problem/5887874> clang ObjC rewriter: Use a different name for 'offsetof' macro

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

16 years agoAdded support for "drain".
Ted Kremenek [Wed, 7 May 2008 21:17:39 +0000 (21:17 +0000)]
Added support for "drain".

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

16 years agoSynthesized getter/setter method declarations need not have
Fariborz Jahanian [Wed, 7 May 2008 20:53:44 +0000 (20:53 +0000)]
Synthesized getter/setter method declarations need not have
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.

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

16 years agoExpand the CF retain checker to allow the Create/Get rule to apply to any
Ted Kremenek [Wed, 7 May 2008 20:06:41 +0000 (20:06 +0000)]
Expand the CF retain checker to allow the Create/Get rule to apply to any
function that returns a CFxxxRef, not just functions whose name begins with
CF.  This implements <rdar://problem/5917879>.

Added test case for this feature.

Updated calls to CStrInCStrNoCase to swap their arguments, per compatibility
with strcasestr.

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

16 years agoFlip order of arguments to CStrInStrNoCase.
Ted Kremenek [Wed, 7 May 2008 18:57:30 +0000 (18:57 +0000)]
Flip order of arguments to CStrInStrNoCase.

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

16 years agoUse llvm::CStrInCStrNoCase instead of strcasestr, since the latter is not portable.
Ted Kremenek [Wed, 7 May 2008 18:36:45 +0000 (18:36 +0000)]
Use llvm::CStrInCStrNoCase instead of strcasestr, since the latter is not portable.
Correctly check if the result of CStrInCStrNoCase is NULL to generate summaries; before we were inverting the condition.

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

16 years agoThis patch introduces declaration of getter methods for ObjC2's
Fariborz Jahanian [Wed, 7 May 2008 17:43:59 +0000 (17:43 +0000)]
This patch introduces declaration of getter methods for ObjC2's
properties. Couple of property tests will fail with this patch.
Will fix them next.

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

16 years agocopy-paste: NS types are not typedefs.
Ted Kremenek [Wed, 7 May 2008 17:35:41 +0000 (17:35 +0000)]
copy-paste: NS types are not typedefs.

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

16 years agoFixup InitListExpr::child_begin/end. Thanks to Ted for catching the regression.
Steve Naroff [Wed, 7 May 2008 17:35:03 +0000 (17:35 +0000)]
Fixup InitListExpr::child_begin/end. Thanks to Ted for catching the regression.

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

16 years agoFix off-by-one error.
Steve Naroff [Wed, 7 May 2008 16:50:14 +0000 (16:50 +0000)]
Fix off-by-one error.

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

16 years agoDo not treat **instance** methods "copyWithZone:" and "mutableCopyWithZone:" from...
Ted Kremenek [Wed, 7 May 2008 05:34:45 +0000 (05:34 +0000)]
Do not treat **instance** methods "copyWithZone:" and "mutableCopyWithZone:" from NSObject as allocators.

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

16 years agoDiagnose attempts to use C++ default arguments outside of a function declaration
Douglas Gregor [Wed, 7 May 2008 04:49:29 +0000 (04:49 +0000)]
Diagnose attempts to use C++ default arguments outside of a function declaration

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

16 years agoBe less promiscuous with generating summaries for "new", "copy", "create".
Ted Kremenek [Wed, 7 May 2008 04:25:59 +0000 (04:25 +0000)]
Be less promiscuous with generating summaries for "new", "copy", "create".

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

16 years agoAdded auto-summary generation for createXXX, copyXXX, newXXX methods.
Ted Kremenek [Wed, 7 May 2008 03:45:05 +0000 (03:45 +0000)]
Added auto-summary generation for createXXX, copyXXX, newXXX methods.

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

16 years agoFix <rdar://problem/5908598> clang ObjC rewriter: typo in #pragma at end
Steve Naroff [Wed, 7 May 2008 00:06:16 +0000 (00:06 +0000)]
Fix <rdar://problem/5908598> clang ObjC rewriter: typo in #pragma at end

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

16 years agoFix a few glitches in scan-build with automatically generating class names from bug...
Ted Kremenek [Tue, 6 May 2008 23:51:45 +0000 (23:51 +0000)]
Fix a few glitches in scan-build with automatically generating class names from bug types.

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

16 years agoImprove HTMLDiagnostics by understanding the "Below" hint.
Ted Kremenek [Tue, 6 May 2008 23:42:18 +0000 (23:42 +0000)]
Improve HTMLDiagnostics by understanding the "Below" hint.

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

16 years agoFix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure...
Steve Naroff [Tue, 6 May 2008 23:20:07 +0000 (23:20 +0000)]
Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure generated for class

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

16 years agoPrint ObjC methods of ObjC classes.
Fariborz Jahanian [Tue, 6 May 2008 23:14:25 +0000 (23:14 +0000)]
Print ObjC methods of ObjC classes.

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

16 years agoDon't report leaks for autoreleased objects.
Ted Kremenek [Tue, 6 May 2008 23:07:13 +0000 (23:07 +0000)]
Don't report leaks for autoreleased objects.

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

16 years agoFix <rdar://problem/5888515> clang ObjC rewriter: Use objc.h for declarations instead...
Steve Naroff [Tue, 6 May 2008 22:45:19 +0000 (22:45 +0000)]
Fix <rdar://problem/5888515> clang ObjC rewriter: Use objc.h for declarations instead of putting them in the preamble?

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