Fariborz Jahanian
9b43c3f0c5
modern objc translation: Add translation of @autoreleasepool
...
statement. // rdar://11474836.
llvm-svn: 157359
2012-05-23 23:47:20 +00:00
Argyrios Kyrtzidis
03a384ec1f
[libclang] Report CXType_ObjCId for 'const id', not CXType_Typedef.
...
rdar://11357807
llvm-svn: 157356
2012-05-23 23:30:16 +00:00
NAKAMURA Takumi
5ad41dab52
clang/test/Tooling: Update comments in left 2 tests on XFAIL. They are incompatible to -fms-compatibility.
...
llvm-svn: 157352
2012-05-23 22:24:33 +00:00
NAKAMURA Takumi
2e8124b6df
clang/test/Tooling: Tweak 4 tests to escape the path separator s/\\/\\\\/g in JSON.
...
llvm-svn: 157351
2012-05-23 22:24:27 +00:00
NAKAMURA Takumi
9b2d17c613
Tooling: Canonicalize Key in IndexByFile[]. llvm::sys::path::native() may be used here.
...
It fixes test/Tooling on Win32 hosts.
llvm-svn: 157350
2012-05-23 22:24:20 +00:00
Argyrios Kyrtzidis
0b21d82437
[arcmt] Remove an unused -autorelease, without failing with error, for this
...
idiom that is used commonly in setters:
[backingValue autorelease];
backingValue = [newValue retain]; // in general a +1 assign
rdar://9914061
llvm-svn: 157347
2012-05-23 21:50:04 +00:00
Chad Rosier
37a12af0af
[driver] Have the crash diagnostics print the clang version information.
...
rdar://11518308
llvm-svn: 157346
2012-05-23 21:38:47 +00:00
Ted Kremenek
4ab452d061
Update checker build.
...
llvm-svn: 157339
2012-05-23 19:57:38 +00:00
Manuel Klimek
3f00134c05
Adds the Refactoring library, which is a layer on top of the Tooling library
...
that allows easy refactoring across translation units.
llvm-svn: 157331
2012-05-23 16:29:20 +00:00
Richard Smith
47ad017191
Correct the starting location for instantiations of field declarations which
...
start with a cv-qualifier. DeclaratorDecl::getTypeSpecStartLoc() does not
produce the location of the first type-specifier (the cv-qualifier) in this
case, because we don't track source locations for cv-qualifiers.
No test here: I've not found a way to test this with a lit-style test, and
introducing a gtest test for this seems unwarranted. Suggestions welcome!
Patch by Daniel Jasper!
llvm-svn: 157311
2012-05-23 04:22:22 +00:00
Richard Smith
01ade177e9
If the first argument of __builtin_object_size can be folded to a constant
...
pointer, but such folding encounters side-effects, ignore the side-effects
rather than performing them at runtime: CodeGen generates wrong code for
__builtin_object_size in that case.
llvm-svn: 157310
2012-05-23 04:13:20 +00:00
Richard Smith
607d631d64
Clang 3.1 is out: turn the relevant C++11 status boxes green.
...
llvm-svn: 157308
2012-05-23 01:38:11 +00:00
Eric Christopher
9cc59f66ad
Move file to be more representative.
...
llvm-svn: 157306
2012-05-23 00:18:46 +00:00
Eric Christopher
41f556b709
Check that we have an unknown upper bound range for our flexible array members.
...
llvm-svn: 157305
2012-05-23 00:18:43 +00:00
Eric Christopher
a91af14b8d
Emit C++11 enum class information if it exists.
...
Part of rdar://11496790
llvm-svn: 157304
2012-05-23 00:09:47 +00:00
John McCall
8d32c05ed4
Recognize the MS inheritance attributes and turn them into attributes
...
on the RecordDecl. Persist the MS portability type attributes and
ignore them in Sema rather than the parser.
Patch by João Matos!
llvm-svn: 157288
2012-05-22 21:28:12 +00:00
John McCall
fa6cf4cc9a
Fix line endings.
...
llvm-svn: 157287
2012-05-22 21:28:07 +00:00
Eric Christopher
8b3304da56
Test that we emit a subrange type for vlas.
...
Part of rdar://11457152
llvm-svn: 157269
2012-05-22 18:04:48 +00:00
Manuel Klimek
d9c79e753b
Fixes the autoconf build.
...
llvm-svn: 157266
2012-05-22 17:45:33 +00:00
Nuno Lopes
a425589fea
wire -fbounds-checking to the new LLVM bounds checking pass
...
llvm-svn: 157262
2012-05-22 17:19:45 +00:00
Manuel Klimek
78d084d942
Adds a method overwriteChangedFiles to the Rewriter. This is implemented by
...
first writing the changed files to a temporary location and then overwriting
the original files atomically.
Also adds a RewriterTestContext to aid unit testing rewrting logic in general.
llvm-svn: 157260
2012-05-22 17:01:35 +00:00
Nuno Lopes
2b1ff46ed1
revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)
...
llvm-svn: 157256
2012-05-22 15:26:48 +00:00
Simon Atanasyan
d45982cb00
Replace inline asm constraint "=a" by the more general constraint "=r".
...
That extend a range of platforms support this test case.
llvm-svn: 157247
2012-05-22 11:03:10 +00:00
Richard Smith
ede15af699
Truthify a comment.
...
llvm-svn: 157232
2012-05-22 01:41:27 +00:00
Ted Kremenek
f5958eb2b4
Fix typo.
...
llvm-svn: 157229
2012-05-22 00:54:40 +00:00
Ted Kremenek
c53ed2e158
Use Perl prototypes instead of shift.
...
llvm-svn: 157228
2012-05-22 00:52:49 +00:00
Argyrios Kyrtzidis
94442980c0
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
...
rdar://11501256
llvm-svn: 157227
2012-05-22 00:47:53 +00:00
Ted Kremenek
2fe1ed3e0d
Add basic delta-debugging script used for reducing analyzer crasher test cases.
...
llvm-svn: 157219
2012-05-21 23:29:01 +00:00
Fariborz Jahanian
945b2f46b1
objective-c: provide a useful 'fixit' suggestion when
...
errornously using commas to separate ObjC message arguments.
// rdar://11376372
llvm-svn: 157216
2012-05-21 22:43:44 +00:00
Eric Christopher
246bb99397
Revert r115805. An array type is required to have a range type,
...
however, the range can be unknown for the upper bound.
Testcase to follow.
Part of rdar://11457152
llvm-svn: 157212
2012-05-21 22:13:23 +00:00
Anna Zaks
fc1d4bdc4f
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
...
(ex: float).
llvm-svn: 157211
2012-05-21 22:07:00 +00:00
Rafael Espindola
96dcb8d4bb
Function template version of the previous patch.
...
llvm-svn: 157207
2012-05-21 20:31:27 +00:00
Rafael Espindola
93c289c28a
Produce a hidden symbol for zed in
...
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct HIDDEN bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
Before we would produce a hidden symbol in
struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}
But adding HIDDEN to the specialization would cause us to produce a default
symbol.
llvm-svn: 157206
2012-05-21 20:15:56 +00:00
Argyrios Kyrtzidis
3169e80603
[driver] When creating the compiler invocation out of command-line
...
arguments, force use of clang frontend for the driver.
Fixes rdar://11356765.
llvm-svn: 157205
2012-05-21 20:11:54 +00:00
Benjamin Kramer
9bbf481f02
Analyzer: Fix PR12905, a crash when encountering a call to a function named "C".
...
While there clean up indentation.
llvm-svn: 157204
2012-05-21 19:40:38 +00:00
Argyrios Kyrtzidis
937bcb2de6
[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease' message" ARC
...
migration error".
Per feedback from John this is useful to have in general.
llvm-svn: 157198
2012-05-21 17:48:31 +00:00
Fariborz Jahanian
19e09cb224
Remove unused argument in my last patch.
...
llvm-svn: 157194
2012-05-21 17:10:28 +00:00
Fariborz Jahanian
b52d8d2e5f
objective-c: When default synthesizing readonly IBOutlet properties
...
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209
llvm-svn: 157193
2012-05-21 17:02:43 +00:00
Rafael Espindola
85e91ba6f5
Test and document a difference from gcc in the handling of visibility
...
attributes.
llvm-svn: 157186
2012-05-21 14:22:37 +00:00
Benjamin Kramer
a63d9531dd
Unpack enums in CodeCompletetionResult.
...
In theory they should be wide enough even when the enum type is signed, but it
looks like MSVC9 still has problems with it.
llvm-svn: 157182
2012-05-21 10:42:01 +00:00
Peter Collingbourne
c947aaeeae
Teach Clang about the NVPTX backend.
...
llvm-svn: 157173
2012-05-20 23:28:41 +00:00
Peter Collingbourne
041ac6c2b1
Tell the driver that CUDA is a C++-like language, so that we get C++
...
header searches with CUDA.
llvm-svn: 157172
2012-05-20 23:28:36 +00:00
Peter Collingbourne
c812d52790
CUDA: the device and host attributes must be inheritable, in order
...
to deal with NVIDIA's headers. We'll need to think of another way
to handle multiple host/device definitions within the same TU.
llvm-svn: 157171
2012-05-20 23:28:32 +00:00
NAKAMURA Takumi
c910b6d075
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.
...
llvm-svn: 157170
2012-05-20 22:28:03 +00:00
Peter Collingbourne
f44bdf9c5f
CUDA: add CodeGen support for global variable address spaces.
...
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0. This relies on address
space 0 being a unified address space.
llvm-svn: 157167
2012-05-20 21:08:35 +00:00
Benjamin Kramer
c25c0b9da5
Bitpack CodeCompletionResults.
...
llvm-svn: 157158
2012-05-20 14:19:46 +00:00
Jakob Stoklund Olesen
3923f1d8ca
Fix test for 32-bit hosts.
...
llvm-svn: 157154
2012-05-20 06:43:46 +00:00
Nico Weber
1b7f39de3d
Error when using typeid() with -fno-rtti. PR 12888.
...
llvm-svn: 157139
2012-05-20 01:27:21 +00:00
Eli Friedman
022900079b
Zap a bogus assert for delegating constructors. PR12890, part 2.
...
I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.
llvm-svn: 157138
2012-05-20 00:46:05 +00:00
Eli Friedman
a9e9ebcfb5
Make delegating initializers use a similar codepath to base initializers in dependent contexts. PR12890.
...
llvm-svn: 157136
2012-05-19 23:35:23 +00:00