Anna Zaks
d08d9159c2
Change wording of 'memcpy' type mismatch warning and remove fixit.
...
As per comments following r157659.
llvm-svn: 157722
2012-05-30 23:14:52 +00:00
Anna Zaks
34d89b7ddc
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
...
Follow up in r155693, r155680.
Prevents a hard to reproduce crash with the following stack trace:
3 libsystem_c.dylib 0x00007ff55a835050 _sigtramp + 18446744029881443184
4 clang 0x0000000106218e97 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 519
5 clang 0x0000000105cf3002 clang::ParseAST(clang::Sema&,
bool, bool) + 690
6 clang 0x00000001059a41d8
clang::ASTFrontendAction::ExecuteAction() + 312
7 clang 0x00000001059a3df7 clang::FrontendAction::Execute()
+ 231
8 clang 0x00000001059b0ecc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860
9 clang 0x000000010595e451
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961
10 clang 0x0000000105947f29 cc1_main(char const**, char
const**, char const*, void*) + 969
11 clang 0x0000000105958259 main + 473
12 clang 0x0000000105947b34 start + 52
llvm-svn: 157721
2012-05-30 23:14:48 +00:00
Jordan Rose
95341bf4d4
Add a test for '%@' suggestion for classes.
...
llvm-svn: 157718
2012-05-30 22:41:32 +00:00
Jordan Rose
68f6d3b1a6
Suggest '%@' for Objective-C objects in ObjC format strings.
...
llvm-svn: 157716
2012-05-30 21:53:13 +00:00
David Blaikie
7e6ad46275
Disable -Wunique-enum for anonymous enums.
...
This is a large class of false positives where anonymous enums are used to
declare constants (see Clang's Diagnostics.h for example). A small number of
true positives could probably be found in this bucket by still warning if the
anonymous enum is used in a declarator (enum { ... } x;) but so far we don't
believe this to be a source of significant benefit so I haven't bothered to
preserve those cases.
General offline review/acknowledgment by rtrieu.
llvm-svn: 157713
2012-05-30 20:45:14 +00:00
Jim Grosbach
6acd46f5e9
TableGen: Remove extraneous '\' at EOL in generated tests.
...
llvm-svn: 157700
2012-05-30 18:18:29 +00:00
Fariborz Jahanian
a1d29cd471
objective-c: revert r157407. It broke a project
...
and reported as PR12959. // rdar://11499742
llvm-svn: 157697
2012-05-30 17:33:54 +00:00
Manuel Klimek
8b1c60220d
Adds a toString method to Replacement, which helps debugging.
...
Adds missing header guards to Refactoring.h.
llvm-svn: 157694
2012-05-30 16:04:29 +00:00
Alexander Kornienko
9e8d22896c
Fixed a memory leak in clang/Tooling.
...
llvm-svn: 157687
2012-05-30 12:10:28 +00:00
Gabor Greif
0d1c121bf7
supply a simple-minded testcase for r156813, to check whether the embedded montavista gcc toolchain is recognized
...
llvm-svn: 157686
2012-05-30 09:56:26 +00:00
Alexey Samsonov
731eb477c1
Clang docs update: list command-line flags that control the size of generated debug information. Reviewed by chandlerc@ and echristo@.
...
llvm-svn: 157681
2012-05-30 06:55:10 +00:00
Craig Topper
9ee12508ca
SSE4A should not imply LZCNT and POPCNT. FMA4 should imply SSE4A. Add missing break at the end of btver1 feature list.
...
llvm-svn: 157680
2012-05-30 05:54:54 +00:00
Craig Topper
9fd12db1c0
Update FIXME. ABM is already covered by LZCNT and POPCNT.
...
llvm-svn: 157676
2012-05-30 04:49:49 +00:00
Craig Topper
85e100ff37
Mark extrqi and insertqi immediate arguments as being ICE.
...
llvm-svn: 157675
2012-05-30 04:45:24 +00:00
Daniel Jasper
41acbc62fb
Test commit - Fix typo in comment.
...
llvm-svn: 157674
2012-05-30 04:30:08 +00:00
Eric Christopher
13586ab6d8
Remove some extra braces.
...
llvm-svn: 157667
2012-05-30 01:14:28 +00:00
Richard Trieu
01cf09302d
Add new -Wunique-enum which will warn on enums which all elements have the
...
same value and were initialized with literals. Clang will warn on code like
this:
enum A {
FIRST = 1,
SECOND = 1
};
llvm-svn: 157666
2012-05-30 01:01:11 +00:00
Anna Zaks
869aeccada
Add fixits for memory access warnings.
...
Also, do not display the builtin name and macro expansion when the
function is a builtin.
llvm-svn: 157659
2012-05-30 00:34:21 +00:00
Fariborz Jahanian
b6499eb60d
objc: position of 'fixit' was off by one.
...
This patch fixes it. // rdar://11488351
llvm-svn: 157646
2012-05-29 21:52:45 +00:00
Fariborz Jahanian
836914c0aa
fixes radar no. in this test.
...
llvm-svn: 157642
2012-05-29 19:59:25 +00:00
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