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
Eli Friedman
9fd8b68568
Add codegen support for block-level compound literals.
...
llvm-svn: 51081
2008-05-13 23:18:27 +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
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
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
Eli Friedman
6a7087e455
Emit basic block for switch body; fixes PR2307.
...
llvm-svn: 50968
2008-05-12 16:08:04 +00:00
Eli Friedman
6e31321043
Don't try to take the address of a bitfield; fixes PR2310.
...
llvm-svn: 50966
2008-05-12 15:06:05 +00:00
Argyrios Kyrtzidis
fa8e15bfa5
-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.
llvm-svn: 50923
2008-05-09 23:39:43 +00:00
Mon P Wang
b84407d6ec
Added support to generate some atomic operators (add, sub, and, or etc..)
...
llvm-svn: 50919
2008-05-09 22:40:52 +00:00
Ted Kremenek
712c91f8a9
Add attribute "format" support for typedefs of function pointers.
...
llvm-svn: 50906
2008-05-09 17:36:24 +00:00
Nate Begeman
f322eabbce
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.
llvm-svn: 50892
2008-05-09 06:41:27 +00:00
Chris Lattner
adb86418db
Fix rdar://5921025 a crash on the included testcase.
...
llvm-svn: 50885
2008-05-09 05:34:49 +00:00
Chris Lattner
d330036c06
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.
llvm-svn: 50843
2008-05-08 05:10:33 +00:00
Devang Patel
ac25fc6f2e
Begin handling union bitfields.
...
Note, this is just beginning.
llvm-svn: 50835
2008-05-07 22:28:29 +00:00
Ted Kremenek
f958ec50c0
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.
llvm-svn: 50829
2008-05-07 20:06:41 +00:00
Douglas Gregor
caa8acebe7
Diagnose attempts to use C++ default arguments outside of a function declaration
...
llvm-svn: 50799
2008-05-07 04:49:29 +00:00
Ted Kremenek
aec1811c6c
Don't report leaks for autoreleased objects.
...
llvm-svn: 50777
2008-05-06 23:07:13 +00:00
Devang Patel
243d5cd283
Fix PR2101 - Codegen crash during bitfield initialization.
...
llvm-svn: 50769
2008-05-06 19:57:59 +00:00
Fariborz Jahanian
6a70e2019b
Test was accidently nullified in previous check-in.
...
llvm-svn: 50758
2008-05-06 18:14:26 +00:00
Fariborz Jahanian
09367d68ff
Patch to refactor setter/getter names of property attributes into Selector
...
(was IdentifierInfo * before). This will make method declartations whole
lot easier.
llvm-svn: 50747
2008-05-06 18:09:04 +00:00
Ted Kremenek
2f08fedec1
String comparison cleanups.
...
Added test case.
llvm-svn: 50711
2008-05-06 04:28:05 +00:00
Ted Kremenek
015c3561ad
Use EvalSummary to process message expressions, thereby unifying the checker
...
logic for function calls and message expressions.
Use the following heuristic to infer "allocating" instance methods:
[ClassName classWithXXX] allocates an object
Update testcase to reflect this heuristic.
llvm-svn: 50708
2008-05-06 04:20:12 +00:00
Ted Kremenek
f15cd14a3d
Emit dead store warnings for ++ and -- operators.
...
llvm-svn: 50679
2008-05-05 23:12:21 +00:00
Chris Lattner
4dd2710222
Fix rdar://5905347 a crash on invalid builtin, due to the
...
params not getting installed for builtins when synthesized.
llvm-svn: 50676
2008-05-05 22:18:14 +00:00
Chris Lattner
db65ff7223
Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I
...
think it is really right. :) This fixes PR2284.
llvm-svn: 50665
2008-05-05 20:07:41 +00:00
Ted Kremenek
875db81301
Minor refactorings/cleanups in CF retain checker and added support for NSMakeCollectable.
...
Added test case for NSMakeCollectable.
llvm-svn: 50653
2008-05-05 16:51:50 +00:00
Ted Kremenek
db04a9e967
When reporting branch conditions that evaluate to an uninitialized value,
...
highlight the most nested subexpression that appears most responsible (giving
the user better diagnostic feedback).
Updated test cases to illustrate this feature.
Implements: <rdar://problem/5880443>
llvm-svn: 50647
2008-05-05 15:56:53 +00:00
Chris Lattner
3c57f7ebab
fix a bug handling right associative operators that Neil noticed, hopefully
...
the final part of PR2279
llvm-svn: 50635
2008-05-05 04:10:51 +00:00
Chris Lattner
d89e458ce0
Fix the rest of PR2279:
...
a) correct rejection of ',' in pp expressions.
b) the precedence of ',' was wrong w.r.t. ?:.
Thanks again to Neil for finding these and providing testcases.
llvm-svn: 50625
2008-05-04 18:36:18 +00:00
Chris Lattner
a08f869c22
Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
...
for pointing this out.
llvm-svn: 50624
2008-05-04 18:25:32 +00:00
Chris Lattner
0a9718eab0
fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).
...
llvm-svn: 50617
2008-05-04 07:15:21 +00:00
Chris Lattner
cfcabaeb7f
add testcase for pr2050 which is now fixed.
...
llvm-svn: 50610
2008-05-04 01:13:36 +00:00
Chris Lattner
033352b036
add a testcase
...
llvm-svn: 50608
2008-05-04 00:56:25 +00:00
Fariborz Jahanian
9964c9c64d
Another test case for properties in protocols.
...
llvm-svn: 50589
2008-05-02 21:09:40 +00:00
Fariborz Jahanian
98a6c4fa77
This patch is about merging ObjC2's properties declared in class
...
protocols into class's property list and performing semantics
on them for while doing so.
llvm-svn: 50587
2008-05-02 19:17:30 +00:00
Ted Kremenek
86237c3774
testcase cleanup
...
llvm-svn: 50581
2008-05-02 17:14:07 +00:00
Ted Kremenek
5102a25bf8
Static analysis test case for noreturn on exceptions.
...
llvm-svn: 50580
2008-05-02 17:13:14 +00:00
Fariborz Jahanian
f303bdabdf
Patch to match and issue diagnostics on property type mismatch.
...
llvm-svn: 50532
2008-05-01 18:05:01 +00:00
Ted Kremenek
772d9f0aae
Added test case for the static analyzer.
...
llvm-svn: 50467
2008-04-30 04:40:48 +00:00
Ted Kremenek
10bad41159
Added test case to test null dereference checking with lval::ArrayOffset.
...
llvm-svn: 50454
2008-04-29 23:25:09 +00:00
Ted Kremenek
25a3b878e5
Convert CFLF to LF. CRLF was causing this test to fail under Mac OS X.
...
llvm-svn: 50388
2008-04-29 04:43:50 +00:00
Argyrios Kyrtzidis
081148986a
Parsing of namespaces:
...
-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.
This commit doesn't implement proper name lookup for namespaces.
llvm-svn: 50321
2008-04-27 13:50:30 +00:00
Chris Lattner
73669defed
remove the 'unused static' diagnostic from codegen. This should be
...
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).
llvm-svn: 50263
2008-04-25 15:47:13 +00:00
Ted Kremenek
ecbdf75049
Do a better job at computing dead symbols.
...
Implemented support for better localized leaks in the CF reference count checker.
Now leaks should be flagged close to where they occur.
This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved.
llvm-svn: 50241
2008-04-25 01:25:15 +00:00
Ted Kremenek
6e06f91085
Added uninitialized-values (path-sensitive) test case as a regression test
...
for the fix in r50178 (http://llvm.org/viewvc/llvm-project?rev=50178&view=rev ).
This fix was for <rdar://problem/5881148>.
llvm-svn: 50220
2008-04-24 18:28:14 +00:00
Ted Kremenek
78120c8b3a
Added test case for functionality fix in rdar://problem/5886141 (handle variadic CF Create functions).
...
llvm-svn: 50219
2008-04-24 18:17:14 +00:00
Ted Kremenek
c79c0591d6
Added lval type (and tracking) for StringLiterals.
...
llvm-svn: 50109
2008-04-22 21:39:21 +00:00
Ted Kremenek
eccf3e5821
Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.
...
llvm-svn: 50108
2008-04-22 21:10:18 +00:00
Ted Kremenek
6fdd3b35dc
Added null dereference test involving arrays.
...
llvm-svn: 50084
2008-04-22 04:56:55 +00:00