Kaelyn Uhrain
ba896f17ae
Don't allow multiple correction candidates that have the same identifier
...
but different nested name specifiers to quietly clobber each other so
only one remains if they do not refer to the same NamedDecl. Fixes
PR12951.
llvm-svn: 157823
2012-06-01 18:11:16 +00:00
Alexander Kornienko
685f43ff02
#ifdef out a broken test on win32
...
llvm-svn: 157819
2012-06-01 16:48:55 +00:00
Jordan Rose
dc191a184f
[analyzer] SATestBuild should execute SVN updates even if Verbose is off.
...
Also, re-use glob results when looking for failure logs.
llvm-svn: 157817
2012-06-01 16:24:43 +00:00
Jordan Rose
01ac57244c
[analyzer] Fix SATestAdd to work with SATestBuild.
...
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.
llvm-svn: 157816
2012-06-01 16:24:38 +00:00
Alexander Kornienko
55f2ca9b27
Added a test for ToolInvocation::mapVirtualFile method.
...
llvm-svn: 157812
2012-06-01 14:50:43 +00:00
Eric Christopher
31a1fc6654
Support C++11 enum forward declarations.
...
Part of rdar://11570854
llvm-svn: 157787
2012-06-01 00:22:57 +00:00
Argyrios Kyrtzidis
273c7c40b2
[arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
...
when migrating.
rdar://11569198
llvm-svn: 157785
2012-06-01 00:10:47 +00:00
Aaron Ballman
a0bc07262b
Anonymous union members within a struct are now properly handled as an unevaluated field in C++11 mode. This fixes PR12866.
...
llvm-svn: 157784
2012-06-01 00:02:08 +00:00
Kaelyn Uhrain
34fab5598d
In TypoCorrectionConsumer, BestResults to CorrectionResults to lessen
...
the confusion among all of the uses of Best* in relation to the set of
possible typo correction results. Also add a method to return the set of
typo corrections that have the single best edit distance--it returns the
second half of the first pair in TypoEditDistanceMap (with
getBestEditDistance already returning the first half).
llvm-svn: 157781
2012-05-31 23:32:58 +00:00
Fariborz Jahanian
bebd0ba549
objc: properties of NSObject attribute must
...
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar:// 11569860
llvm-svn: 157780
2012-05-31 23:18:32 +00:00
Tom Care
698daefb58
[analyzer] Fix BugType memory leak in IdempotentOperationChecker.
...
llvm-svn: 157772
2012-05-31 21:24:58 +00:00
Aaron Ballman
f4f486f732
Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
...
llvm-svn: 157763
2012-05-31 19:27:30 +00:00
Anna Zaks
2774f99913
[analyzer] Cleanup for r157721.
...
We should lock the number of elements after the initial parsing is
complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can
trigger lazy pch deserialization resulting in more calls to
HandleTopLevelDecl and appending to the LocalTUDecls list. We should
ignore those.
llvm-svn: 157762
2012-05-31 18:07:55 +00:00
Alexander Kornienko
21d6ec9224
Fix an object lifetime issue in clang/Tooling.
...
llvm-svn: 157759
2012-05-31 17:58:43 +00:00
Ted Kremenek
16704bb15b
Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly
...
improved the pruning heuristics. The current heuristics are pretty good, but they make diagnostics
for uninitialized variables warnings particularly useless in some cases.
llvm-svn: 157734
2012-05-31 06:03:17 +00:00
Craig Topper
3f122a7636
Add builtin for pclmulqdq instruction.
...
llvm-svn: 157733
2012-05-31 05:18:48 +00:00
Richard Smith
ee48633937
Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!
...
llvm-svn: 157723
2012-05-30 23:55:51 +00:00
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