Eli Friedman
d5a4838e3d
Backout of codegen-based fix to PR2334; this has been fixed differently
...
at the Sema layer.
llvm-svn: 51203
2008-05-16 20:38:39 +00:00
Eli Friedman
928ab4d546
Sema-based fix for PR2334. The issue is that even if the two sides of
...
the condidtional have compatible types, they are not necessarily the
same type. Therefore, we cast to the composite type. As a hack, for
the moment we assume that the composite type is the type of the
left-hand expression; this isn't correct, but it's good enough for most
purposes.
llvm-svn: 51202
2008-05-16 20:37:07 +00:00
Nate Begeman
9800faa578
Fix some prototypes, and implement some builtins until we have our header files completed.
...
llvm-svn: 51199
2008-05-16 18:59:42 +00:00
Ted Kremenek
c812b23ce8
Cache leaks by the allocation site, not the leak location.
...
llvm-svn: 51198
2008-05-16 18:33:44 +00:00
Ted Kremenek
590abd363e
Partitioned BugTypeCachedLocation::isCached() into two methods: one that accepts and ExplodedNode, and the other that accepts a ProgramPoint. The default behavior is to cache bug reports by the
...
location they occur (the end node). Subclasses can override this behavior by providing a different ProgramPoint.
llvm-svn: 51197
2008-05-16 18:33:14 +00:00
Eli Friedman
823622105e
Review nit.
...
llvm-svn: 51196
2008-05-16 17:54:49 +00:00
Eli Friedman
a959a59ac6
Clean up ownership per review comment.
...
llvm-svn: 51195
2008-05-16 17:51:27 +00:00
Eli Friedman
bb0eb81ebf
Fix review nit.
...
llvm-svn: 51194
2008-05-16 17:44:00 +00:00
Eli Friedman
cb92a3f03b
Patch for PR2334, and a similar ObjC bug.
...
llvm-svn: 51193
2008-05-16 17:37:11 +00:00
Ted Kremenek
92137a3d8d
Added CFGBlock::hasBinaryBranchTerminator().
...
llvm-svn: 51190
2008-05-16 16:06:00 +00:00
Eli Friedman
db421caaa3
Minor cleanup to isBuiltinConstantExpr.
...
llvm-svn: 51188
2008-05-16 13:28:37 +00:00
Ted Kremenek
dd547b1ce9
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.
llvm-svn: 51168
2008-05-15 22:24:49 +00:00
Ted Kremenek
98b730d5bb
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
llvm-svn: 51164
2008-05-15 21:49:04 +00:00
Steve Naroff
ad91868aa6
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).
llvm-svn: 51163
2008-05-15 21:12:10 +00:00
Steve Naroff
bdc67b382f
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.
llvm-svn: 51158
2008-05-15 19:53:06 +00:00
Argyrios Kyrtzidis
1a599ea820
Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.
...
llvm-svn: 51153
2008-05-15 17:53:43 +00:00
Argyrios Kyrtzidis
212f91107a
Comments fix.
...
llvm-svn: 51151
2008-05-15 17:26:35 +00:00
Nate Begeman
6c59132241
Handle a couple missing builtins that will go away eventually when the various
...
intrin.h files are finished
llvm-svn: 51137
2008-05-15 07:38:03 +00:00
Steve Naroff
0424b0e70d
Add some of GCC's object checking builtin's.
...
llvm-svn: 51133
2008-05-14 22:12:15 +00:00
Eli Friedman
f0d0e9e174
Use double-underscores in front of all non-keywords to protect against
...
#define pollution.
llvm-svn: 51128
2008-05-14 20:32:22 +00:00
Ted Kremenek
1907394f74
Don't specify a -o option to clang when not using "-checker-cfref".
...
llvm-svn: 51124
2008-05-14 20:26:52 +00:00
Ted Kremenek
e0927a0f49
Fix variable misspelling.
...
llvm-svn: 51122
2008-05-14 20:20:46 +00:00
Ted Kremenek
cf05a830b1
Don't run clang on .s files.
...
llvm-svn: 51121
2008-05-14 20:17:17 +00:00
Eli Friedman
e94e0f66cd
Make header use the new __builtin_shufflevector builtin.
...
llvm-svn: 51117
2008-05-14 20:11:29 +00:00
Ted Kremenek
e3fc13a3e0
Added "-a" option to scan-build to select the analysis (ASTConsumer) used by clang. The default is -checker-cfref.
...
llvm-svn: 51116
2008-05-14 20:10:33 +00:00
Eli Friedman
a1b4ed8003
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.
llvm-svn: 51113
2008-05-14 19:38:39 +00:00
Ted Kremenek
0a8a0fa0b5
Zero-pad the month and day fields in the output HTML directory.
...
llvm-svn: 51109
2008-05-14 17:23:56 +00:00
Argyrios Kyrtzidis
881848119c
Update the clangSema VC++ project.
...
llvm-svn: 51104
2008-05-14 10:50:44 +00:00
Argyrios Kyrtzidis
3722daf62d
Change CRLF line endings to LF.
...
llvm-svn: 51103
2008-05-14 10:49:47 +00:00
Argyrios Kyrtzidis
7ebefaf3c7
Upgrading VC++ projects to VC++ 2008.
...
llvm-svn: 51101
2008-05-14 10:00:15 +00:00
Eli Friedman
7e452e59e4
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.
llvm-svn: 51086
2008-05-14 00:40:18 +00:00
Eli Friedman
9fd8b68568
Add codegen support for block-level compound literals.
...
llvm-svn: 51081
2008-05-13 23:18:27 +00:00
Eli Friedman
dd7406e65c
Add support for init lists for complex variables.
...
llvm-svn: 51080
2008-05-13 23:11:35 +00:00
Ted Kremenek
20a44ed730
Output #LINE for computing line counts.
...
llvm-svn: 51079
2008-05-13 22:56:36 +00:00
Ted Kremenek
7147584d03
Use "-i" option with make when ignoring errors.
...
llvm-svn: 51070
2008-05-13 21:28:02 +00:00
Nate Begeman
d386215916
Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.
...
llvm-svn: 51068
2008-05-13 21:03:02 +00:00
Eli Friedman
58639e584c
Both operands to && have to be scalars, not just one.
...
llvm-svn: 51065
2008-05-13 20:16:47 +00:00
Ted Kremenek
52387a1828
Re-enable the analyzer.
...
llvm-svn: 51055
2008-05-13 17:10:28 +00:00
Eli Friedman
1a5754a26a
Detabify.
...
llvm-svn: 51042
2008-05-13 14:40:48 +00:00
Ted Kremenek
80ff5f0696
Place "-x" option before other analyzer options.
...
llvm-svn: 51014
2008-05-12 23:56:50 +00:00
Ted Kremenek
ece302d75b
Directly invoke gcc immediately instead of before we process the command line arguments.
...
llvm-svn: 51012
2008-05-12 23:47:41 +00:00
Steve Naroff
a98fe19c7e
Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not.
...
Teach Sema::MergeVarDecl() about __private_extern__.
llvm-svn: 51005
2008-05-12 22:36:43 +00:00
Ted Kremenek
f5a94e7114
Added internal command logging.
...
llvm-svn: 51003
2008-05-12 22:07:14 +00:00
Steve Naroff
bf1516c618
Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats
...
llvm-svn: 51002
2008-05-12 21:44:38 +00:00
Chris Lattner
c9c296d235
testcase for PR2263, fixed by Nate's r50903 patch.
...
llvm-svn: 50983
2008-05-12 18:31:17 +00:00
Ted Kremenek
2abde809ce
Unbreak build.
...
llvm-svn: 50980
2008-05-12 17:42:30 +00:00
Ted Kremenek
a0055a8ef5
Support StringLiteralVal when comparing LVal types.
...
llvm-svn: 50979
2008-05-12 17:41:30 +00:00
Ted Kremenek
8322da5fa3
Grammar cleanup in comment.
...
Remove redundant assignment.
llvm-svn: 50978
2008-05-12 17:40:56 +00:00
Ted Kremenek
babaa52efb
80 col violation fix.
...
llvm-svn: 50977
2008-05-12 17:40:13 +00:00
Ted Kremenek
92f78f4c04
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
llvm-svn: 50976
2008-05-12 17:29:34 +00:00