Douglas Gregor
bafff22b91
Disable this test again, which naturally fails on every platform except the one I'm building with
...
llvm-svn: 116642
2010-10-15 23:23:05 +00:00
Ted Kremenek
4f63ac7057
Tweak retain/release checker diagnostics to specify a leak occurs because an object is not referenced later in the path,
...
not that it isn't referenced later in the code. Fixes <rdar://problem/8527839>.
llvm-svn: 116636
2010-10-15 22:50:23 +00:00
Fariborz Jahanian
dddf158c19
Check for ivar being a C++ object before attempting to
...
find a copy constructor/assignment operator used
in getter/setter synthesis. This removes an unintended
diagnostics and makes objc++ consistant with objective-c.
// rdar: //8550657.
llvm-svn: 116631
2010-10-15 22:42:59 +00:00
Daniel Dunbar
6358d6866d
Driver: Error on -fno-for-scope, which we have no intention of supporting.
...
llvm-svn: 116627
2010-10-15 22:30:42 +00:00
Nick Lewycky
c60d6e7af0
Report the location of the syntax error inside a macro. Fixes PR7944.
...
llvm-svn: 116624
2010-10-15 21:43:24 +00:00
Francois Pichet
8c2f519b8b
bool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.
...
llvm-svn: 116623
2010-10-15 21:34:50 +00:00
Dan Gohman
f47df3e02a
Mention the paragraphs in the standards which sanction TBAA.
...
llvm-svn: 116617
2010-10-15 20:54:41 +00:00
Dan Gohman
c44fd6486e
Use a different name for pointer types in tbaa, to be a little
...
more consistent with other names, and to look less like a magic name.
llvm-svn: 116616
2010-10-15 20:26:20 +00:00
Dan Gohman
2d0a3c7b8c
Add a comment.
...
llvm-svn: 116615
2010-10-15 20:24:53 +00:00
Dan Gohman
4a3b1b3ef4
Fix a typo in a comment Frits van Bommel spotted.
...
llvm-svn: 116614
2010-10-15 20:24:10 +00:00
Dan Gohman
2e29eb5a4b
Experimental TBAA support for enum types.
...
llvm-svn: 116613
2010-10-15 20:23:12 +00:00
Argyrios Kyrtzidis
59b34c2bb4
Again, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
...
llvm-svn: 116608
2010-10-15 18:52:45 +00:00
Argyrios Kyrtzidis
dfe47dba37
Revert r116605, a lot more were committed by mistake.
...
llvm-svn: 116606
2010-10-15 18:51:34 +00:00
Argyrios Kyrtzidis
ffbba26285
Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
...
llvm-svn: 116605
2010-10-15 18:49:01 +00:00
Fariborz Jahanian
4f99b59df6
Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
...
AST node. (finishing off radar 8525788).
llvm-svn: 116603
2010-10-15 18:40:05 +00:00
Devang Patel
f3ca447c26
TBAA = Type Based Alias Analysis
...
llvm-svn: 116599
2010-10-15 18:23:36 +00:00
Argyrios Kyrtzidis
434383d703
Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).
...
llvm-svn: 116598
2010-10-15 18:21:24 +00:00
Dan Gohman
d19ee8a07f
Don't leak the TBAA object.
...
llvm-svn: 116595
2010-10-15 18:04:46 +00:00
Dan Gohman
f5c5e0773e
Add a comment about odd "signed char" incompatibility between C++ and C.
...
llvm-svn: 116593
2010-10-15 17:52:03 +00:00
David Chisnall
2e16ac52e1
Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.
...
llvm-svn: 116587
2010-10-15 17:07:39 +00:00
Douglas Gregor
26c5578d84
When performing typo correction, keep track of whether the last lookup
...
we did was an acceptable lookup. If it is, then we can re-use that
lookup result. If it isn't, we have to perform the lookup again. This
is almost surely the cause behind the mysterious typo.m failures on
some builders; we were getting the wrong lookup results returned.
llvm-svn: 116586
2010-10-15 16:49:56 +00:00
Daniel Dunbar
2a40abae4d
Disable type.m while failures are investigated.
...
llvm-svn: 116577
2010-10-15 15:28:09 +00:00
Daniel Dunbar
1837dbd4e3
Make test more consistent.
...
llvm-svn: 116576
2010-10-15 15:13:02 +00:00
Douglas Gregor
af9eb59274
When we're in the context of an Objective-C message send's receiver,
...
typo correction prefers "super" over other, equivalent completions. I
believe this will fix the regression on the buildbot.
llvm-svn: 116574
2010-10-15 13:35:25 +00:00
Douglas Gregor
36c22a2335
Diagnose C++ [class.mem]p13-14, where a class member has the same name
...
as the class itself. Fixes PR7082.
llvm-svn: 116573
2010-10-15 13:21:21 +00:00
Gabor Greif
de1f58919a
zap trailing whitespace
...
llvm-svn: 116572
2010-10-15 08:48:51 +00:00
Gabor Greif
7e1dd672fb
testcase for http://llvm.org/PR8371 of my last commit, r116570
...
llvm-svn: 116571
2010-10-15 08:44:44 +00:00
Gabor Greif
eef3197301
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment
...
llvm-svn: 116570
2010-10-15 08:26:25 +00:00
Abramo Bagnara
932e393fda
Treat __extension__ like ParenExpr.
...
llvm-svn: 116569
2010-10-15 07:51:18 +00:00
Craig Silverstein
12a198e5b1
Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the
...
typloc information is available (I don't think it was, originally).
Submitted as a 'trivial' change.
llvm-svn: 116568
2010-10-15 06:51:01 +00:00
John McCall
1c9c3fd50a
Death to blocks, or at least the word "block" in one particular obnoxiously
...
ambiguous context.
llvm-svn: 116567
2010-10-15 04:57:14 +00:00
Douglas Gregor
d4e1fb562e
Don't complain about a variable within a linkage-specification that is
...
initialized. Fixes PR7076.
llvm-svn: 116553
2010-10-15 01:21:46 +00:00
Douglas Gregor
b048402073
When we are missing the ',' or '>' to terminate a template parameter
...
list, complain about it! Fixes PR7053.
llvm-svn: 116551
2010-10-15 01:15:58 +00:00
Douglas Gregor
8a8e0313bf
Add builtin conditional operator candidates for scoped enumeration
...
types, from Alp Toker! Fixes PR8344.
llvm-svn: 116549
2010-10-15 00:50:56 +00:00
Daniel Dunbar
59ae137329
Update CMake.
...
llvm-svn: 116548
2010-10-15 00:39:31 +00:00
Oscar Fuentes
b3ce035c71
Copied some flags from the Makefile build to the list of GCC flags.
...
This removes a lot of warnings.
llvm-svn: 116545
2010-10-15 00:16:22 +00:00
Dan Gohman
d65c196439
Add a TBAA type for pointer types.
...
llvm-svn: 116544
2010-10-15 00:01:39 +00:00
Dan Gohman
3f1cf0f373
Unsigned types are TBAA-compatible with their signed counterparts.
...
Also, handle unknown types conservatively.
llvm-svn: 116541
2010-10-14 23:39:00 +00:00
Fariborz Jahanian
9c07e1767d
Rewrite bug fix rewriting a property assignment when
...
its RHS is an ivar. Fixes //rdar: //8541517.
llvm-svn: 116539
2010-10-14 23:31:39 +00:00
Dan Gohman
947c9af774
Experimental TBAA support.
...
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.
llvm-svn: 116536
2010-10-14 23:06:10 +00:00
Devang Patel
0f58561907
Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
...
This is tested by virtfunc.exp in gdb testsuite.
llvm-svn: 116535
2010-10-14 22:59:23 +00:00
Dan Gohman
10169b94cf
Wire up the -fstrict-aliasing and -fno-strict-aliasing options
...
to CodeGenOption flags.
llvm-svn: 116530
2010-10-14 22:36:56 +00:00
John McCall
f477659040
template-ids are looked up differently in friend declarations.
...
llvm-svn: 116529
2010-10-14 22:22:28 +00:00
Douglas Gregor
57756eabc9
When performing typo correction, look through the set of known
...
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.
This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.
There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.
llvm-svn: 116528
2010-10-14 22:11:03 +00:00
Douglas Gregor
c3bbf48f47
Make sure that we diagnose invalid qualifiers on friend functions.
...
llvm-svn: 116527
2010-10-14 22:03:51 +00:00
John McCall
25c9d1170b
At Fariborz's request, a somewhat cleaner bit-combining hack.
...
llvm-svn: 116524
2010-10-14 21:48:26 +00:00
Andrew Trick
6c8ce5c8b5
Reverting r116493: removes a test that failed on clang selfhost and msvc
...
llvm-svn: 116522
2010-10-14 21:41:16 +00:00
Argyrios Kyrtzidis
a665dc0770
Fix compiler error that clang didn't report (probably same problem as rdar://8552377).
...
It's more stress-free without access checking though..
llvm-svn: 116521
2010-10-14 21:35:29 +00:00
Fariborz Jahanian
a895c38928
Put line number on the diagnostic. //rdar: //8550657.
...
llvm-svn: 116519
2010-10-14 21:30:10 +00:00
Francois Pichet
41232a9872
r116509 fixed the Win32 XFAIL.
...
The failing was due to this:
1. preamble.c contains CR+LF new lines
2. write() is called with a buffer containing the original (CR+LF) to output the result on the console.
3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines.
llvm-svn: 116513
2010-10-14 20:49:46 +00:00
Douglas Gregor
0afa7f66cd
Tweak the typo-correction implementation to determine corrections
...
solely based on the names it sees, rather than actual declarations it
gets. In essence, we determine the set of names that are "close
enough" to the typo'd name. Then, we perform name lookup for each of
those names, filtering out those that aren't actually visible, and
typo-correct from the remaining results.
Overall, there isn't much of a change in the behavior of typo
correction here. The only test-suite change comes from the fact that
we make good on our promise to require that the user type 3 characters
for each 1 character corrected.
The real intent behind this change is to set the stage for an
optimization to typo correction (so that we don't need to deserialize
all declarations in a translation unit) and future work in finding
missing qualification ("'vector' isn't in scope; did you mean
'std::vector'?). Plus, the code is cleaner this way.
llvm-svn: 116511
2010-10-14 20:34:08 +00:00
Argyrios Kyrtzidis
6843141d39
Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
...
Progress for rdar://7260160.
llvm-svn: 116508
2010-10-14 20:14:38 +00:00
Argyrios Kyrtzidis
0e88a565c0
Allow deserialization of just the fields of a record, when we want to iterate over them,
...
instead of deserializing the complete declaration context of the record.
Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.
llvm-svn: 116507
2010-10-14 20:14:34 +00:00
Argyrios Kyrtzidis
55d1fc2d3c
Give a default implementation for ASTDeserializationListener's methods, no functionality change.
...
llvm-svn: 116506
2010-10-14 20:14:28 +00:00
Argyrios Kyrtzidis
0427be938e
Introduce command line option -error-on-deserialized-decl that is accompanied by a name
...
and emits an error if a declaration with this name is deserialized from PCH.
This is for testing, to make sure that we don't deserialize stuff needlessly.
llvm-svn: 116505
2010-10-14 20:14:25 +00:00
Argyrios Kyrtzidis
470c454a61
Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits.
...
As a bonus, now we don't deserialize it unless we need it.
llvm-svn: 116504
2010-10-14 20:14:21 +00:00
Argyrios Kyrtzidis
a11aca4646
Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.
...
llvm-svn: 116503
2010-10-14 20:14:18 +00:00
David Chisnall
a9d40ee0ab
Test case for r116439
...
llvm-svn: 116493
2010-10-14 18:15:20 +00:00
Fariborz Jahanian
681c0754d9
Eliminate usage of ObjCSuperExpr used for
...
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
llvm-svn: 116483
2010-10-14 16:04:05 +00:00
Anton Yartsev
73d4023114
support for AltiVec extensions from the Cell architecture
...
llvm-svn: 116478
2010-10-14 14:37:46 +00:00
Zhongxing Xu
23e082d32c
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
...
llvm-svn: 116473
2010-10-14 05:22:59 +00:00
John McCall
7f570718d3
Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
...
ObjCObjectType into Type.
llvm-svn: 116472
2010-10-14 03:00:17 +00:00
John McCall
e1139e4a88
Whoops. This really shouldn't compile in clang, either.
...
llvm-svn: 116470
2010-10-14 02:06:32 +00:00
John McCall
c153891662
Perform range restrictions on regparm when applied to a type and
...
not a decl.
llvm-svn: 116469
2010-10-14 01:57:10 +00:00
John McCall
43b6168b3b
Teach Diagnostic to recursively expand inside %plural formats.
...
llvm-svn: 116468
2010-10-14 01:55:31 +00:00
Chris Lattner
26f6c227dc
allow I128 suffixes in msextensions mode just like i128 suffixes, patch
...
by Martin Vejnar!
llvm-svn: 116460
2010-10-14 00:24:10 +00:00
Chris Lattner
2edb926880
move logic for computing signed integer overflow when constant folding
...
into APInt.
llvm-svn: 116453
2010-10-13 23:46:56 +00:00
Douglas Gregor
5a2bb5ba98
Diagnose when a 'static' member function overrides a virtual function
...
in a base class. Fixes PR8168.
llvm-svn: 116448
2010-10-13 22:55:32 +00:00
Douglas Gregor
a007d36c1b
Generalize the checking for qualification of (non-friend) class
...
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.
llvm-svn: 116445
2010-10-13 22:19:53 +00:00
David Chisnall
1822d1f0a8
Don't claim that things that are Objective-C keywords if preceded by an @ are keywords unless they are preceded by an @.
...
For example, don't claim that end is a keyword in:
unsigned end;
llvm-svn: 116439
2010-10-13 21:44:48 +00:00
Douglas Gregor
392a84bdf6
Eliminate the use of ObjCSuperExpr in code completion.
...
llvm-svn: 116436
2010-10-13 21:24:53 +00:00
Douglas Gregor
d07ba34a44
There is no reason for dereferencing a pointer-to-member to require
...
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.
llvm-svn: 116429
2010-10-13 20:41:14 +00:00
Douglas Gregor
e01d2243d3
Update Type::BitsRemainingInType
...
llvm-svn: 116423
2010-10-13 20:07:36 +00:00
Douglas Gregor
f10c97f36e
_Bool is not a keyword in C++. Fixes PR7388 and PR8349.
...
llvm-svn: 116422
2010-10-13 20:00:38 +00:00
Douglas Gregor
dc13b04a98
Place conversion warnings for non-type template arguments under the
...
control of -Wconversion, and ignore them by default.
llvm-svn: 116415
2010-10-13 18:27:55 +00:00
Douglas Gregor
52051cb173
Introduce a bit into Type that keeps track of whether there are any
...
unnamed or local types within that type. This bit is cached along with
the linkage of a type, so that it can be recomputed (e.g., when we see
that a typedef has given a name to an anonymous declaration).
Use this bit when checking C++03 [temp.arg.type]p2, so that we don't
walk template argument types repeatedly.
llvm-svn: 116413
2010-10-13 18:05:20 +00:00
Douglas Gregor
b39215942e
Fix a silly bug in the suppression of non-error diagnostics in a
...
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.
llvm-svn: 116411
2010-10-13 17:22:14 +00:00
Douglas Gregor
518da18d70
Compute whether a type is variably modified as we build the type,
...
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.
llvm-svn: 116409
2010-10-13 16:58:14 +00:00
Fariborz Jahanian
26d1e2b370
Eliminates a clang warning.
...
llvm-svn: 116408
2010-10-13 16:19:16 +00:00
Rafael Espindola
85111907bb
Call InitSections when assembling. This makes clang's output match that of
...
llvm-mc.
llvm-svn: 116405
2010-10-13 14:53:57 +00:00
John McCall
ccbc032146
Preserve the original scope when picking the right scope for a friend
...
declaration, because we'll need it later. Hopefully fixed self-host.
llvm-svn: 116399
2010-10-13 06:22:15 +00:00
John McCall
f7cfb2212c
Support friend function declarations in local classes correctly.
...
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something. I'm still not certain how
this is useful.
llvm-svn: 116393
2010-10-13 05:45:15 +00:00
Argyrios Kyrtzidis
8c64bbe032
Embrace C++ ABI 5.2.6 and consider that template instantiations don't have key functions (same as GCC).
...
llvm-svn: 116391
2010-10-13 02:39:41 +00:00
Douglas Gregor
7731d3fafc
Teach the warning about unnamed/local types in template arguments to
...
actually walk the template argument type to find any unnamed/local
types within it. Fixes PR6784.
llvm-svn: 116382
2010-10-13 00:27:52 +00:00
Douglas Gregor
5bb5e4ad9d
Introduce support for emitting diagnostics (warnings + their notes)
...
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.
This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.
llvm-svn: 116373
2010-10-12 23:32:35 +00:00
Devang Patel
67f70aaf5a
Fix debug info for anon union.
...
This is tested by anon-union.exp.
llvm-svn: 116372
2010-10-12 23:24:54 +00:00
Devang Patel
e25b5f86d0
Fix anon union member assignment expression's location.
...
This is tested by anon-union.exp in gdb testsuite.
llvm-svn: 116371
2010-10-12 23:23:25 +00:00
John McCall
de3fd2264c
Handle dependent friends more explicitly and deal with the possibility
...
of templated-scope friends by marking them invalid and white-listing all
accesses until such time as we implement them. Fixes a crash, this time
without a broken test case.
llvm-svn: 116364
2010-10-12 23:13:28 +00:00
Eli Friedman
36ebbec121
PR8325: don't do destructor checking when a pointer is thrown.
...
llvm-svn: 116336
2010-10-12 20:32:36 +00:00
John McCall
036855a0ed
Enter the context of the declared function template when performing
...
deduction and the final substitution, but not while substituting the
explicit template arguments. Fixes rdar://problem/8537391
llvm-svn: 116332
2010-10-12 19:40:14 +00:00
Douglas Gregor
6e9cf630f8
When finalizing a function template specialization following template
...
argument deduction, make sure to check the correctness of deduced template
type arguments (which we had previously skipped) along with other
kinds of template arguments. This fixes part of PR6784, but we're
still swallowing the extension warning about unnamed/local template
arguments.
llvm-svn: 116327
2010-10-12 18:51:08 +00:00
Douglas Gregor
758cb67fcf
If we end up instantiating a function parameter whose default argument
...
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.
llvm-svn: 116324
2010-10-12 18:23:32 +00:00
Chris Lattner
17c0eac879
fix PR7885, rejecting invalid uses of __builtin_constant_p.
...
llvm-svn: 116317
2010-10-12 17:47:42 +00:00
Nick Lewycky
8d3a1783ba
Replace \r\n with \n in this file.
...
llvm-svn: 116312
2010-10-12 16:46:35 +00:00
Douglas Gregor
efc469587a
Parse default arguments within member functions in source order, from
...
Manuel Klimek! Fixes PR7715.
llvm-svn: 116311
2010-10-12 16:25:54 +00:00
Duncan Sands
38b918c0cf
Pacify gcc-4.4.
...
llvm-svn: 116300
2010-10-12 14:07:59 +00:00
John McCall
73d3618223
C's comma operator performs lvalue conversion on both its operands;
...
require them to have complete types.
llvm-svn: 116297
2010-10-12 07:14:40 +00:00
John McCall
5627fd71c8
Flesh out test.
...
llvm-svn: 116292
2010-10-12 03:38:33 +00:00
John McCall
01cbf2de0f
I just do what the comments tell me to do.
...
llvm-svn: 116289
2010-10-12 02:19:57 +00:00
Chris Lattner
18d853794f
fix the definition of __builtin_constant_p, the first arg isn't a short.
...
Patch by the "pax team"
llvm-svn: 116288
2010-10-12 02:16:39 +00:00
John McCall
36226621f6
Progress.
...
llvm-svn: 116287
2010-10-12 02:09:17 +00:00
Francois Pichet
85e6da1f19
This patch remove the Win32 XFAIL from remap-complete.c
...
The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.
llvm-svn: 116286
2010-10-12 01:01:43 +00:00
Douglas Gregor
7bb8af613c
When we load an ASTUnit from command-line arguments, hold on to the
...
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.
Fixes <rdar://problem/7595339>.
llvm-svn: 116285
2010-10-12 00:50:20 +00:00
Cameron Esfahani
f6c73c463f
Fix spelling error.
...
llvm-svn: 116283
2010-10-12 00:21:25 +00:00
John McCall
36e7fe31d4
Add some infrastructure for dealing with expressions of 'placeholder' type,
...
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.
llvm-svn: 116281
2010-10-12 00:20:44 +00:00
Fariborz Jahanian
77890879dd
Fixes a typo which caused byte offset in debug info
...
for ivars to be 0. Fixes pr8353.
llvm-svn: 116273
2010-10-11 23:55:47 +00:00
Daniel Dunbar
48ed37d98e
Basic: Tweak attempt to make version tags work from 'svn export's again, clip
...
off the extra parts of the $URL$ SVN keyword.
llvm-svn: 116269
2010-10-11 23:50:34 +00:00
Daniel Dunbar
d097d913b6
Basic: Attempt to make version tags work from 'svn export's again.
...
llvm-svn: 116268
2010-10-11 23:44:19 +00:00
Daniel Dunbar
89329cb8f7
Driver/Darwin: Remove a useless warning about missing runtime libraries. These
...
are almost never needed, so the warning isn't very useful.
llvm-svn: 116263
2010-10-11 23:31:07 +00:00
Douglas Gregor
21d0e5a06c
This test should now work on windows, since we're no longer using temporary files badly
...
llvm-svn: 116261
2010-10-11 23:18:55 +00:00
Douglas Gregor
bd82998e35
Eliminate CIndexer::getClangPath(), since libclang no longer depends
...
on the presence of a 'clang' executable. Simplify
CIndexer::getClangResourcesPath() a bit.
Patch up the CMake makefiles to install headers into two locations in
the build tree, for those silly cases where 'clang' will end up
looking into the wrong build directory for headers.
llvm-svn: 116260
2010-10-11 23:17:59 +00:00
Fariborz Jahanian
d06ab4f09e
Test for //rdar: //8493239
...
llvm-svn: 116258
2010-10-11 23:15:47 +00:00
Fariborz Jahanian
fef5d16f45
Some refactoring of property rewriting stuff
...
in rewriter. No functionality change.
llvm-svn: 116254
2010-10-11 22:21:03 +00:00
Douglas Gregor
b9ab0ed33e
Eliminate the (de-)serialization of code completion results, now that
...
libclang does not support out-of-process code completion.
llvm-svn: 116253
2010-10-11 22:12:15 +00:00
Douglas Gregor
4e0f15a4a2
Eliminate -fdiagnostics-binary and all of the infrastructure for
...
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
2010-10-11 22:02:06 +00:00
Devang Patel
33ddf69fb3
Fix debug info for functions whose context is a namespace.
...
This is tested by namespace.exp in gdb testsuite.
llvm-svn: 116248
2010-10-11 21:58:41 +00:00
Douglas Gregor
6a95802893
Eliminate clang_codeComplete(). libclang clients should be using the
...
faster, in-process, more-configurable clang_codeCompleteAt().
llvm-svn: 116245
2010-10-11 21:51:20 +00:00
Douglas Gregor
36e3b5c79e
Switch c-index-test from clang_codeComplete() over to
...
clang_codeCompleteAt(). This uncovered a few issues with the latter:
- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client
llvm-svn: 116241
2010-10-11 21:37:58 +00:00
Fariborz Jahanian
f3f903a9f0
This patch does a few things in the area of objective-c
...
properties.
1. Generates the AST for lexical info. of accessing
getter/setter methods using dot-syntax notation.
This fixes //rdar: //8528170.
2. Modifes rewriter to handle the AST putout in 1.
3. Supportes in rewriter ObjCImplicitSetterGetter ASTs.
llvm-svn: 116237
2010-10-11 21:29:12 +00:00
Daniel Dunbar
7cba5a76dd
IRgen/Obj-C: Fix encoding of "long double".
...
- The mind boggles.
llvm-svn: 116226
2010-10-11 21:13:48 +00:00
Daniel Dunbar
a441d81b6b
Merge encode-test-1.m into encode-test.m
...
llvm-svn: 116225
2010-10-11 21:13:46 +00:00
Daniel Dunbar
32708f952b
FileCheck'ize test.
...
llvm-svn: 116224
2010-10-11 21:13:44 +00:00
Douglas Gregor
7845f1e80e
Eliminate clang_setUseExternalASTGeneration() from libclang. Between
...
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.
llvm-svn: 116207
2010-10-11 16:52:23 +00:00
Francois Pichet
c2bc5ac149
Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.
...
llvm-svn: 116203
2010-10-11 12:59:39 +00:00
Francois Pichet
d61f192b1a
Add 2 Microsoft compiler intrinsics that don't require prototypes:
...
__assume
__noop
llvm-svn: 116202
2010-10-11 12:00:10 +00:00
Axel Naumann
b151c3c2d6
Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.
...
llvm-svn: 116200
2010-10-11 09:18:43 +00:00
Axel Naumann
89c31490d8
Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.
...
llvm-svn: 116199
2010-10-11 09:13:46 +00:00
Chris Lattner
a09e8efd1f
Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
...
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.
llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Chris Lattner
29e78ac923
comment out unused function
...
llvm-svn: 116189
2010-10-11 05:38:10 +00:00
Chris Lattner
a45ebd2fd1
be less threatening.
...
llvm-svn: 116187
2010-10-11 05:20:49 +00:00
Argyrios Kyrtzidis
0c34b138df
Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.
...
llvm-svn: 116186
2010-10-11 03:25:57 +00:00
Argyrios Kyrtzidis
f0e31c8b9c
Don't let typeinfo name symbols be 'internal hidden', it can lead to linker conflicts
...
with similarly named classes in anonymous namespaces.
llvm-svn: 116185
2010-10-11 03:25:53 +00:00
NAKAMURA Takumi
11f6be1ce8
lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.
...
It enables clang to compile Mingw's headers.
llvm-svn: 116184
2010-10-11 02:30:56 +00:00
NAKAMURA Takumi
89acd1e7ef
lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.
...
llvm-svn: 116183
2010-10-11 02:28:42 +00:00
NAKAMURA Takumi
e4faafba32
lib/Frontend/InitHeaderSearch.cpp: Fix compatibility to Cygming.
...
- lib/gcc/include should not be included. Clang oughta have alternatives. (PR7956)
- Cygwin: /usr/include/w32api should be included. gcc/cygwin does.
- gcc/cygwin uses gcc paths as /usr/lib not /lib. They are same on Cygwin environment, though, We have to take what gcc/cygwin does.
- Cygwin-1.7: Use 4.3.4.
- Cygwin-1.5: Use 4.3.2 for gcc-4.
llvm-svn: 116182
2010-10-11 02:27:37 +00:00
Chris Lattner
88fdea8ad9
fix PR8217, a silent miscompilation of invalid code.
...
llvm-svn: 116166
2010-10-10 18:16:20 +00:00
Chris Lattner
001b29ccc1
Allow a string literal to initialize a tail array (PR8217), patch
...
by Pierre Habouzit!
llvm-svn: 116165
2010-10-10 17:49:49 +00:00
Francois Pichet
52bea03e7a
Unbreak the CMake build.
...
llvm-svn: 116164
2010-10-10 09:17:09 +00:00
Zhongxing Xu
271c9c7b6d
Add experimental chroot check which checks improper use of chroot(). Patch by
...
Lei Zhang.
llvm-svn: 116163
2010-10-10 05:45:30 +00:00
Argyrios Kyrtzidis
073c9cb592
Implement __builtin_ia32_vec_ext_v2si function (required by Qt).
...
llvm-svn: 116162
2010-10-10 03:19:11 +00:00
NAKAMURA Takumi
6bdc8a2d8a
lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.
...
llvm-svn: 116161
2010-10-10 01:53:03 +00:00
Benjamin Kramer
bfac7dcda0
Don't rely on a StringRef being null-terminated (it's not) for deprecation messages.
...
Store pointer and length of the message in DelayedDiagnostic and hide the gory union details.
llvm-svn: 116153
2010-10-09 15:49:00 +00:00
Bill Wendling
65b2a965fb
Add target implementations for the X86 builtins:
...
__builtin_ia32_vec_init_v8qi
__builtin_ia32_vec_init_v4hi
__builtin_ia32_vec_init_v2si
They are lowered to bitcasts. (These are all ready tested by the gcc testsuite.)
<rdar://problem/8529957>
llvm-svn: 116147
2010-10-09 08:47:25 +00:00
Abramo Bagnara
718dbd7a4f
Fixed __builtin_constant_p return type.
...
llvm-svn: 116145
2010-10-09 04:51:06 +00:00
Argyrios Kyrtzidis
52da8da03b
Fix g++.dg regressions introduced at r115347 (rdar://8529993)
...
llvm-svn: 116144
2010-10-09 04:39:54 +00:00
John McCall
c8fd6a48cf
Secure this test against slightly different number formatters.
...
llvm-svn: 116141
2010-10-09 02:28:39 +00:00
John McCall
a2fabff4f6
Permit constant evaluation of const floating-point variables with
...
constant initializers.
llvm-svn: 116138
2010-10-09 01:34:31 +00:00
Nico Weber
a6bde81bc8
Add support for UCNs for character literals
...
llvm-svn: 116129
2010-10-09 00:27:47 +00:00
Douglas Gregor
0bf3140424
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
...
bit by me).
llvm-svn: 116122
2010-10-08 23:50:27 +00:00
Fariborz Jahanian
5eee9f7d30
Rename test name.
...
llvm-svn: 116120
2010-10-08 23:17:27 +00:00