Fariborz Jahanian
b5dd2cb13c
objective-c: fix a sema and IRGen crash when property
...
getter result type is safe but does not match with property
type resulting in spurious warning followed by crash in
IRGen. // rdar://11515196
llvm-svn: 157641
2012-05-29 19:56:01 +00:00
Benjamin Kramer
1ab16ba501
Install ammintrin.h in the cmake build.
...
llvm-svn: 157639
2012-05-29 19:36:17 +00:00
Benjamin Kramer
ba6e2528fa
Add an ammintrin.h header for SSE4a intrinsics.
...
This is a clean-room implementation based on public documentation and
I tried to validate it as much as possible against gcc.
llvm-svn: 157638
2012-05-29 19:10:17 +00:00
Simon Atanasyan
217dc2d8dd
MIPS: Pass -KPIC argument to MIPS assembler if necessary.
...
llvm-svn: 157635
2012-05-29 19:07:33 +00:00
Simon Atanasyan
a16b7fd029
Factor out the code retrieves the last PIC related argument from
...
the Clang::ConstructJob() to the new ArgList::getLastArg() routine
with eight argument. That simplifies reusing of this code.
llvm-svn: 157633
2012-05-29 18:50:33 +00:00
Benjamin Kramer
8ac9c22391
Define __SSE4A__ when targeting new AMD CPUs.
...
This doesn't really fit the existing SSELevel so it gets an extra flag.
llvm-svn: 157630
2012-05-29 17:48:39 +00:00
David Blaikie
48b812854e
Fix indenting.
...
llvm-svn: 157628
2012-05-29 17:05:42 +00:00
Chad Rosier
68d2ca7ecc
Revert r155737, restoring the MaxDepth in the BalancedDelimiterTracker to 256.
...
r155737 turned out to be a temporary work around. The correct fix was in r155823.
llvm-svn: 157627
2012-05-29 16:57:50 +00:00
Roman Divacky
67030280f9
Sparc is bigendian.
...
llvm-svn: 157626
2012-05-29 16:10:50 +00:00
Alexey Samsonov
dda3a7f914
Make Clang driver pass the last option from -g group to the compiler.
...
Leave a better fixme for different debug info flags
llvm-svn: 157602
2012-05-29 08:10:34 +00:00
Charles Davis
e8ccc1134b
Use fewer temporaries mangling APSInt objects. The performance difference
...
is negligible, but it makes the code clearer. Based on a suggestion by
Jordy Rose.
llvm-svn: 157601
2012-05-29 07:01:45 +00:00
Peter Collingbourne
aac265cc78
OpenCL: Fix vector conditional operator CodeGen for the case where
...
the operands are vectors of doubles.
llvm-svn: 157596
2012-05-29 00:35:18 +00:00
Benjamin Kramer
938a71ff18
Fix suspicous isIntegerType() check, found by PVS Studio (PR12357).
...
llvm-svn: 157593
2012-05-28 21:01:59 +00:00
David Blaikie
7e64fd9d53
Address minor FIXME in RedeclLink to contain a PointerIntPair instead of derive from it.
...
Use actual factory functions rather than derived classes acting as named constructors/factories.
llvm-svn: 157588
2012-05-28 19:38:42 +00:00
Charles Davis
6770dea704
Fix mangling of integral template arguments between 1 and 10. Add a test case
...
for this. Reported by Timur Iskhodzhanov.
llvm-svn: 157583
2012-05-28 16:53:33 +00:00
Charles Davis
ee855f06e7
Fix Lang's fix. This should fix the tests for +Asserts builds.
...
llvm-svn: 157561
2012-05-28 03:54:22 +00:00
Chris Lattner
a2db6f2bd8
adjust to mainline llvm API change.
...
llvm-svn: 157557
2012-05-28 01:47:53 +00:00
David Blaikie
c4c0e8aa9a
Fix PR12960 by not attempting to correct cases when we're not actually instantiatiating a template.
...
This comes up in the begin/end calls of a range-for (see the included test
case). Other suggestions are welcome, though this seems to do the trick without
regressing anything.
llvm-svn: 157553
2012-05-28 01:26:45 +00:00
Charles Davis
7fb195b683
Test case for 157547. Before that patch, all the digits would be mangled
...
as zeroes. Now the digits are properly non-zero.
llvm-svn: 157552
2012-05-28 00:43:56 +00:00
Benjamin Kramer
ea388a2832
PR12962: Fix a rare use after free when collecting virtual overrides.
...
The DenseMap reallocates after 64 insertions so this only happened in
large test cases under very specific circumstances.
llvm-svn: 157549
2012-05-27 22:41:08 +00:00
Lang Hames
6ccb51130e
Fix call to APSInt constructor - it doesn't take an initial value, just a
...
bitwidth and signedness. Also rename the variable to reflect its purpose.
No test case - discovered during random code exploration.
llvm-svn: 157547
2012-05-27 21:39:49 +00:00
Fariborz Jahanian
f021889036
-Wdeprecated warning to include reference (as a note)
...
to the declaration in this patch. // rdar://10893232
llvm-svn: 157537
2012-05-27 16:59:48 +00:00
Benjamin Kramer
443488eba9
Pass ProgramStateRef by reference.
...
Retain + Release on a ref counted pointer is cheap, but not free (it adds a function call in this case).
llvm-svn: 157534
2012-05-27 15:32:10 +00:00
Dmitri Gribenko
34983f25c6
Close HTML tag properly.
...
llvm-svn: 157533
2012-05-27 14:08:44 +00:00
Benjamin Kramer
b33ffee04f
Use the SelectorSet typedef more widely throughout Sema.
...
While there make it a SmallPtrSet.
llvm-svn: 157532
2012-05-27 13:28:52 +00:00
Benjamin Kramer
69b5a60d96
Replace some custom hash combines with the standard stuff from DenseMapInfo.
...
llvm-svn: 157531
2012-05-27 13:28:44 +00:00
NAKAMURA Takumi
42e5ac409c
clang/unittests/Tooling/RewriterTestContext.h: Don't try to remove TemporaryDirectory.
...
llvm-svn: 157530
2012-05-27 13:10:14 +00:00
NAKAMURA Takumi
ce6ad6748a
clang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. Win32 doesn't allow rename/removing opened files.
...
llvm-svn: 157528
2012-05-27 12:59:58 +00:00
Charles Davis
5511dfb399
Mangle template instantiations properly (as of VC 7.x) when compiling for
...
the Microsoft Visual C++ ABI. Currently limited to type and integral
non-type arguments. Based on a patch by Timur Iskhodzhanov!
llvm-svn: 157524
2012-05-26 23:12:19 +00:00
Benjamin Kramer
7b01b578a9
Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion already adds some.
...
No test as the output is highly dependend on the local configuration.
llvm-svn: 157520
2012-05-26 19:39:52 +00:00
Fariborz Jahanian
f3b7681f2b
Change warning to error when property setter names conflict.
...
// rdar://11528439
llvm-svn: 157517
2012-05-26 16:10:06 +00:00
Richard Smith
1bb8edb8ac
In response to some discussions on IRC, tweak the wording of the new
...
-Wsometimes-uninitialized diagnostics to make it clearer that the cause
of the issue may be a condition which must always evaluate to true or
false, rather than an uninitialized variable.
To emphasize this, add a new note with a fixit which removes the
impossible condition or replaces it with a constant.
Also, downgrade the diagnostic from -Wsometimes-uninitialized to
-Wconditional-uninitialized when it applies to a range-based for loop,
since the condition is not written explicitly in the code in that case.
llvm-svn: 157511
2012-05-26 06:20:46 +00:00
David Blaikie
3d8edc24c7
Fix indentation.
...
llvm-svn: 157510
2012-05-26 05:35:39 +00:00
Alexander Kornienko
246e85ddb0
Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a
...
switch label immediately followed by a 'break;'.
llvm-svn: 157508
2012-05-26 00:49:15 +00:00
Nuno Lopes
f491fbd715
fix codegen support for alloc_size attribute for static C++ methods
...
add test case for C++ codegen
llvm-svn: 157500
2012-05-25 21:45:08 +00:00
Argyrios Kyrtzidis
e99b084cd7
[libclang] Add a test I forgot to commit for r156890.
...
llvm-svn: 157491
2012-05-25 20:05:57 +00:00
Rafael Espindola
67a498cc5f
Don't ignore linkage when ignoring visibility in the instantiation of a
...
method template.
llvm-svn: 157486
2012-05-25 17:22:33 +00:00
Nuno Lopes
147dcd8c33
add CodeGen support for the alloc_size attribute
...
llvm-svn: 157483
2012-05-25 17:04:42 +00:00
Rafael Espindola
340941dc16
Don't ignore linkage when ignoring visibility in the instantiation of a
...
function template.
llvm-svn: 157480
2012-05-25 16:41:35 +00:00
Anna Zaks
6a65819ba3
[analyzer] Don't crash on LValBitCast
...
llvm-svn: 157478
2012-05-25 16:02:16 +00:00
Rafael Espindola
a28bf63d9a
Consider the linkage for member class templates even when we have to ignore
...
the visibility.
llvm-svn: 157475
2012-05-25 15:51:26 +00:00
Rafael Espindola
0cf10ac9ab
When ignoring visibility in an instantiation, still consider the linkage.
...
Similar fixes for function and member template to follow as I write the
testcases.
llvm-svn: 157470
2012-05-25 14:47:05 +00:00
Rafael Espindola
4d71d0f9fa
Whitespace fixes.
...
llvm-svn: 157469
2012-05-25 14:17:45 +00:00
Manuel Klimek
5d9e8362df
Links the entry point to the tooling documentation into clang's menu bar.
...
llvm-svn: 157462
2012-05-25 08:39:21 +00:00
Richard Smith
cff136cda8
Release notes update for -Wsometimes-uninitialized.
...
llvm-svn: 157459
2012-05-25 02:35:34 +00:00
Richard Smith
4323bf8e2e
Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,
...
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch
inevitably leads to an uninitialized variable use (so either the branch is dead
code or there is an uninitialized use bug).
This chunk of warnings tentatively lives within -Wuninitialized, in order to
give it more visibility to existing Clang users.
llvm-svn: 157458
2012-05-25 02:17:09 +00:00
Anna Zaks
268f154f48
[analyzer] Loading external plugins with scan-build
...
Load custom plugins when running scan-build. This is useful when
additional static analysis Checkers must be provided via clang's plugin
interface.
Loading additional plugins can now be done via the scan-build call:
scan-build -load-plugin <plugin.so>
A patch by Thomas Hauth.
llvm-svn: 157452
2012-05-25 01:13:50 +00:00
Seth Cantrell
14340ca173
ensure value passed to is space is representable as unsigned char
...
if the value isn't an unsigned char or EOF behavior is undefined
(and on Windows there's an assertion)
llvm-svn: 157445
2012-05-25 00:03:29 +00:00
Richard Smith
3d31e8b280
Some cleanups around the uninitialized variables warning, and a FIXME. No functional change.
...
llvm-svn: 157440
2012-05-24 23:45:35 +00:00
Fariborz Jahanian
c37a1d6e0f
cleanup some code.
...
llvm-svn: 157436
2012-05-24 22:59:56 +00:00
Fariborz Jahanian
3f88afad2f
objective-c: warn on use of property setters
...
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://11528439, [PR12936].
llvm-svn: 157435
2012-05-24 22:48:38 +00:00
Eli Friedman
c49c22642b
Get rid of some non-ASCII en-dashes that crept in.
...
llvm-svn: 157434
2012-05-24 22:36:31 +00:00
Eli Friedman
f798f65ccc
Implement the C++11 discarded value expression rules for volatile lvalues. <rdar://problem/10790820>.
...
llvm-svn: 157420
2012-05-24 22:04:19 +00:00
Justin Holewinski
c05323dd5c
Un-XFAIL CodeGen/builtins-nvptx.c now that the proper changes have
...
landed in LLVM core
llvm-svn: 157418
2012-05-24 21:39:33 +00:00
Eli Friedman
f92f6454ef
A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where "x" refers to a local variable. This should silence a useless warning in compiler-rt and other places.
...
llvm-svn: 157414
2012-05-24 21:05:41 +00:00
John McCall
d65dbd8e6a
XFAIL this test, which does not pass on trunk since the grand
...
renaming in r157403.
llvm-svn: 157413
2012-05-24 20:58:21 +00:00
Ted Kremenek
e1e89370f0
New & improved man page attached, now with standard license added.
...
Plus, a patch for scan-build.
* mdoc corrections
* slightly more compact output
* same license as scan-build
* DESCRIPTION describes
* Default checkers corrected & explained
* Authors credited
The patch adds support for --help-checkers. It just lists the default
checkers by recursively invoking "scan-build -h" and looking for the
magic '+' signs.
Patch by James Lowden!
llvm-svn: 157411
2012-05-24 20:13:47 +00:00
Fariborz Jahanian
246f519a51
objective-c: Fixes a corner case and interesting bug.
...
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://11363363
llvm-svn: 157407
2012-05-24 18:29:41 +00:00
Argyrios Kyrtzidis
bb2be0dca3
[objcmt] Add test case for r157395.
...
llvm-svn: 157404
2012-05-24 17:49:22 +00:00
Justin Holewinski
83e9668133
Replace PTX back-end with NVPTX back-end in all places where Clang cares
...
NV_CONTRIB
llvm-svn: 157403
2012-05-24 17:43:12 +00:00
Anna Zaks
6b7b7e66d1
[analyzer] Minor cleanup to checkers' help text.
...
llvm-svn: 157402
2012-05-24 17:31:59 +00:00
Anna Zaks
d0867105f4
[analyzer] Treat cast of array to reference in the same way as array to
...
pointer.
Fixes one of the crashes reported in PR12874.
llvm-svn: 157401
2012-05-24 17:31:57 +00:00
Anna Zaks
cb4c483dbe
[analyzer] Fix typo. Thanks Jordy.
...
llvm-svn: 157400
2012-05-24 17:31:54 +00:00
Manuel Klimek
24c4805b3b
Adds menu sidebar to the docs.
...
llvm-svn: 157399
2012-05-24 17:16:23 +00:00
Manuel Klimek
b76810fa94
Updates the tooling docs with the links to the tutorials and
...
adds the menu include.
llvm-svn: 157397
2012-05-24 17:09:10 +00:00
Manuel Klimek
3115e3d171
Adds a tutorial for how to write clang plugins.
...
llvm-svn: 157396
2012-05-24 17:07:18 +00:00
Argyrios Kyrtzidis
b482260748
[objcmt] Warn when modern objc migrator does not convert a NSNumber message because it requires a cast.
...
rdar://11525138
llvm-svn: 157395
2012-05-24 16:48:23 +00:00
Fariborz Jahanian
870265636c
objc: change option to be -Wobjc-interface-ivars
...
llvm-svn: 157394
2012-05-24 16:19:51 +00:00
Manuel Klimek
9ffebff74c
Apply review comment from Jordan Rose.
...
llvm-svn: 157387
2012-05-24 12:46:43 +00:00
Bill Wendling
2495bca543
Remove 3.1 release notes to get ready for current development cycle.
...
llvm-svn: 157379
2012-05-24 06:42:56 +00:00
Seth Cantrell
ac6fb8f9f6
fix Bug 12924
...
http://llvm.org/bugs/show_bug.cgi?id=12924
This issue was that the source location was pointing to a
non-printable character and so CaretEnd was pointing one
_column_ past the caret but not one _character_ past the
caret. So the conversion between column and byte locations
wasn't working (because the conversion is only valid from
the first column or byte of a character).
llvm-svn: 157372
2012-05-24 05:14:44 +00:00
Richard Smith
ce4f608f86
DR1152 / PR12931 / PR6177: A candidate function which requires binding a const
...
volatile reference to a temporary is not viable. My interpretation is that
DR1152 was a bugfix, not a rule change for C++11, so this is not conditional on
the language mode. This matches g++'s behavior.
llvm-svn: 157370
2012-05-24 04:29:20 +00:00
Eli Friedman
c11535c248
Add a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>.
...
llvm-svn: 157362
2012-05-24 00:47:05 +00:00
Nuno Lopes
5c7ad16fdd
implement Sema support for the alloc_size attribute
...
Portions of this patch by Xi Wang. Reviewed by Jordy Rose. Thank you both.
Codegen support will follow soon.
llvm-svn: 157360
2012-05-24 00:22:00 +00:00
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
Fariborz Jahanian
199a9b57a6
objective-c: Warn if default synthesizing readonly IBOutlet properties
...
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://11448209
llvm-svn: 157121
2012-05-19 18:17:17 +00:00
Dmitri Gribenko
cb1f153d4c
Missing line break.
...
llvm-svn: 157120
2012-05-19 17:20:59 +00:00
Dmitri Gribenko
898cff0bbd
Use RecordDecl::field_iterator because D1, D2 are RecordDecls. No functional change.
...
llvm-svn: 157119
2012-05-19 17:17:26 +00:00
Benjamin Kramer
365082dbfa
Apparently empty names are allowed here.
...
llvm-svn: 157117
2012-05-19 16:34:46 +00:00
Benjamin Kramer
1458c1c009
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.
...
llvm-svn: 157116
2012-05-19 16:03:58 +00:00
Benjamin Kramer
9012a09b1c
Inline a trivial clear() method.
...
llvm-svn: 157114
2012-05-19 14:28:31 +00:00
Benjamin Kramer
30844fc708
Simplify code, add an assertion.
...
llvm-svn: 157111
2012-05-19 10:43:54 +00:00
Eric Christopher
fe0913b026
Update API usage for llvm DIBuilder changes for rvalue reference
...
types and ensure we are actually creating the type.
rdar://11479676
llvm-svn: 157095
2012-05-19 01:36:50 +00:00
Anna Zaks
209bd25b3c
[analyzer] c++11: do not crash on namespace alias
...
llvm-svn: 157089
2012-05-19 00:22:11 +00:00
Anna Zaks
94a7b849a2
[analyzer] For locations, use isGLValue() instead of isLValue().
...
llvm-svn: 157088
2012-05-19 00:22:07 +00:00
Kaelyn Uhrain
864d0b002c
Suggest adding 'typename' when it would make the compiler
...
accept the template argument expression as a type.
llvm-svn: 157085
2012-05-18 23:42:49 +00:00
Anna Zaks
457ace7611
[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)
...
llvm-svn: 157082
2012-05-18 22:47:43 +00:00
Anna Zaks
b343660914
[analyzer] Malloc checker: remove unnecessary comparisons.
...
llvm-svn: 157081
2012-05-18 22:47:40 +00:00
Fariborz Jahanian
d945ce5fb7
objc: use "class extension" instead of "continuation class"
...
to match documentation. // rdar://11309706
llvm-svn: 157074
2012-05-18 21:22:49 +00:00
Benjamin Kramer
e5fbc6c85d
Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way.
...
llvm-svn: 157064
2012-05-18 19:32:16 +00:00
Chad Rosier
30cb377cdf
Typo.
...
llvm-svn: 157054
2012-05-18 16:56:52 +00:00
Rafael Espindola
3619104239
Centralize the handling of the "attribute declaration must precede definition"
...
warning. This also makes us warn on tags, which, ironically, is the only case
gcc warns on.
llvm-svn: 157039
2012-05-18 01:47:00 +00:00
Anna Zaks
46d01605ee
[analyzer]Malloc: refactor and report use after free by memory
...
allocating functions.
llvm-svn: 157037
2012-05-18 01:16:10 +00:00
Fariborz Jahanian
b4bef15ae6
Another test for r157025 <rdar://problem/11460990>.
...
llvm-svn: 157034
2012-05-18 00:19:25 +00:00
Douglas Gregor
0bf70f4be8
A selector match between two Objective-C methods does *not* guarantee
...
that the methods have the same number of parameters, although we
certainly assumed this in many places. Objective-C can be insane
sometimes. Fixes <rdar://problem/11460990>.
llvm-svn: 157025
2012-05-17 23:13:29 +00:00
Matt Beaumont-Gay
58b844aebf
Remove trailing periods which snuck into a few diagnostic strings.
...
llvm-svn: 157022
2012-05-17 22:46:56 +00:00
Douglas Gregor
c5928afb69
In the override search for Objective-C methods, protect against ASTs that have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/11478173>, a recent regression
...
llvm-svn: 157021
2012-05-17 22:39:14 +00:00
Benjamin Kramer
5aa585e672
Drop the question mark when complaining about a non-existing -Wno- flag.
...
We're certain that it doesn't exist.
llvm-svn: 157017
2012-05-17 21:14:26 +00:00
Chad Rosier
dfb1097504
Add -mno-implicit-float to the M group.
...
llvm-svn: 157014
2012-05-17 20:53:37 +00:00
Argyrios Kyrtzidis
3d6439517c
[arcmt] Remove the "it is not safe to remove an unused 'autorelease' message" ARC
...
migration error.
This is more trouble that it is worth; autoreleasing a value without holding on it
is a valid use-case, we should not "punish" correct code for the minority of
broken/fragile programs that depend on the behavior of -autorelease.
rdar://9914061
llvm-svn: 156999
2012-05-17 18:16:05 +00:00
Chad Rosier
26ad6a4f60
[driver] Reword the warning message for missing value to a joined argument.
...
llvm-svn: 156993
2012-05-17 15:45:13 +00:00