Commit Graph

128902 Commits

Author SHA1 Message Date
Bill Wendling 6970fa8287 Remove assignments which aren't used afterwards.
llvm-svn: 158534
2012-06-15 19:28:20 +00:00
Jordan Rose 9da05858b4 [completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.
Specifically, @[] and @{} didn't have a type associated with them; we now
use "NSArray *" and "NSDictionary *", respectively. @"" has the type
"NSString *". @(), unfortunately, has type "id", since it (currently) may
be either an NSNumber or an NSString.

Add a test for all the Objective-C at-expression completions.

<rdar://problem/11507708&11507668&11507711>

llvm-svn: 158533
2012-06-15 18:19:56 +00:00
Jordan Rose 95dfae824e [analyzer] RetainCount: don't track objects init'd with a delegate
We already didn't track objects that have delegates or callbacks or
objects that are passed through void * "context pointers". It's a
not-uncommon pattern to release the object in its callback, and so
the leak message we give is not very helpful.

llvm-svn: 158532
2012-06-15 18:19:52 +00:00
Jordan Rose 2684c68ddc Warn when a static variable is referenced in a non-static inline function.
This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++,
probably because by default file-scope const/constexpr variables have internal
linkage, while functions have external linkage. There's also the issue of
anonymous namespaces to consider. Nevertheless, there should probably be a
similar warning, since the semantics of inlining a function that references
a variable with internal linkage do not seem well-defined.

<rdar://problem/11577619>

llvm-svn: 158531
2012-06-15 18:19:48 +00:00
Jordan Rose 7c0abc34f9 Test that -Wauto-var-id fires in value-dependent contexts.
There was already a test that it did not fire in type-dependent contexts.
This was already behaving correctly.

llvm-svn: 158530
2012-06-15 18:19:43 +00:00
Pete Cooper e24d6a19e3 Allow SROA to split up an array of vectors into multiple vectors, even when the vectors are dynamically indexed
llvm-svn: 158529
2012-06-15 18:07:29 +00:00
Rafael Espindola 1821c6c3b0 Some optimizations done by globalopt are safe only for internal linkage, not
linkonce linkage. For example, it is not valid to add unnamed_addr.

This also fixes a crash in g++.dg/opt/static5.C.

llvm-svn: 158528
2012-06-15 18:00:24 +00:00
Jakob Stoklund Olesen a15a224db0 Preserve <undef> flags in ARMExpandPseudo.
This probably mostly shows up in bugpoint-generated code.

llvm-svn: 158527
2012-06-15 17:46:54 +00:00
Jakob Stoklund Olesen 5767ad727c Use regunit liveness in RegisterCoalescer when it is available.
We only do very limited physreg coalescing now, but we still merge
virtual registers into reserved registers.

llvm-svn: 158526
2012-06-15 17:36:48 +00:00
Douglas Gregor 7efd007cfb Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in
PR13117.

llvm-svn: 158525
2012-06-15 16:59:29 +00:00
Alexey Samsonov 25c40e5a5b [Sanitizer] Fix type for placement new on 32-bit Mac
llvm-svn: 158524
2012-06-15 14:32:39 +00:00
Rafael Espindola 768b41c17a Factor macro argument parsing into helper methods and add support for .irp.
Patch extracted from a larger one by the PaX team. I added the testcases
and tightened error handling a bit.

llvm-svn: 158523
2012-06-15 14:02:34 +00:00
Alexey Samsonov 0d76e8983f [Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address
llvm-svn: 158522
2012-06-15 14:00:25 +00:00
NAKAMURA Takumi f500be025a Headers/xopintrin.h: Try to fix r158492. Did you mean, mm256?
llvm-svn: 158521
2012-06-15 13:37:44 +00:00
Alexey Samsonov 156958dd0c [Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime
llvm-svn: 158519
2012-06-15 13:09:52 +00:00
Alexey Samsonov 3efd6fc26c [Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc implementations of functions. Move strchr to sanitizer_libc.
llvm-svn: 158517
2012-06-15 12:24:07 +00:00
Bill Wendling f11b42e396 Free the allocated filename. Found by clang static analyzer.
llvm-svn: 158514
2012-06-15 09:12:04 +00:00
Bill Wendling 730295a5c9 Free the allocated filename. Found by clang static analyzer.
llvm-svn: 158513
2012-06-15 09:11:47 +00:00
James Dennett 84aa05287d Documentation fix: Add a missing parameter name for a \param command
llvm-svn: 158512
2012-06-15 09:04:10 +00:00
James Dennett 9426c6c6d3 Documentation fix: made the name given to \param match the code.
llvm-svn: 158511
2012-06-15 09:02:08 +00:00
James Dennett 7e704c87db Documentation cleanup:
* Converted comments to use \brief to provide summaries;
* Fixed uses of \arg that should be \p;
* Fixed \param [in] [out] to \param [in,out];
* Made minor formatting fixes.

llvm-svn: 158510
2012-06-15 08:55:05 +00:00
James Dennett 01f7a63ebc Documentation cleanup: use \p ParameterName when referring to a parameter,
not \arg ParameterName (which should be used only when documenting that
parameter, not when referring to it from elsewhere).

llvm-svn: 158509
2012-06-15 08:49:07 +00:00
Duncan Sands 7838603ffc Fix issues (infinite loop and/or crash) with self-referential instructions, for
example degenerate phi nodes and binops that use themselves in unreachable code.
Thanks to Charles Davis for the testcase that uncovered this can of worms.

llvm-svn: 158508
2012-06-15 08:37:50 +00:00
James Dennett 15d9e461bf Fix a documentation typo: \\brief -> \brief
llvm-svn: 158507
2012-06-15 08:37:50 +00:00
James Dennett 804664c82d Documentation cleanup: fix \params to match the code.
llvm-svn: 158506
2012-06-15 08:35:42 +00:00
James Dennett a70437956d Documentation cleanup:
* Escaped @ symbols that shouldn't be interpreted by Doxygen;
* Deleted \param documentation for function parameters that no longer exist;
* Fixed parameter names in \param Doxygen commands;
* Fixed some broken formatting.

llvm-svn: 158505
2012-06-15 08:32:48 +00:00
James Dennett a0ae493c1d Documentation cleanup: eliminated Doxygen warnings by deleting a doc comment
on ASTContext::CreateTypeSourceInfo that duplicated information from the
(more complete) version in ASTContext.h.

llvm-svn: 158504
2012-06-15 08:02:32 +00:00
James Dennett 845619a285 Documentation cleanup:
* Add \brief to produce a summary in the Doxygen output;
* Add missing parameter names to \param commands;
* Fix mismatched parameter names for \param commands;
* Add a parameter name so that the \param has a target.

llvm-svn: 158503
2012-06-15 07:41:35 +00:00
Alexey Samsonov 8c4dcd72e3 [Sanitizer] Use mmaped buffer in DumpProcessMaps to avoid large stack frames
llvm-svn: 158502
2012-06-15 07:41:23 +00:00
James Dennett 6e5cffb617 Documentation fixes: Added \brief markup and fixed some formatting.
llvm-svn: 158501
2012-06-15 07:35:42 +00:00
Alexey Samsonov 1042454b66 [TSan] don't use too new __attribute__((unused)) for class member
llvm-svn: 158500
2012-06-15 07:33:49 +00:00
Alexey Samsonov 40e5128412 [Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime
llvm-svn: 158499
2012-06-15 07:29:14 +00:00
James Dennett 2a4d13c5cf Documentation cleanup:
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.

llvm-svn: 158498
2012-06-15 07:13:21 +00:00
Craig Topper 11913052d6 Move AVX version of convert instructions that write to GPRs to the Op1 table.
llvm-svn: 158497
2012-06-15 07:02:58 +00:00
Alexey Samsonov e4a889866d [Sanitizer] move atomic ops, min/max and sort to commnon runtime
llvm-svn: 158496
2012-06-15 07:00:31 +00:00
James Dennett f44874fb21 Documentation cleanup: escape Objective-C @ symbols in Doxygen comments.
llvm-svn: 158495
2012-06-15 06:52:33 +00:00
James Dennett 89c503ff65 Documentation cleanup: fix erroneous uses of \arg.
llvm-svn: 158494
2012-06-15 06:48:13 +00:00
Alexey Samsonov 70afb91636 [Sanitizer] move more portability wrappers to common runtime: sleep, _exit, abort, atexit, pthread_self
llvm-svn: 158493
2012-06-15 06:37:34 +00:00
Craig Topper 9e28bf9345 Add XOP frcz instrinsics.
llvm-svn: 158492
2012-06-15 06:33:42 +00:00
James Dennett 1f8b48ebb1 Ongoing documentation cleanup:
* Added/tidied \brief summaries;
* Escaped # as needed for Doxygen;
* Drive-by: Fixed a rogue line > 80 columns.

llvm-svn: 158491
2012-06-15 06:26:16 +00:00
Alexey Samsonov ae1e171b72 [Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtime
llvm-svn: 158490
2012-06-15 06:08:19 +00:00
James Dennett 574cb4c2af Documentation cleanup for clang-c:
* Add parameter names to various \param commands;
* Ensure that \brief summaries are followed by blank lines where needed to
  prevent subsequent text being merged into the summary;
* Mark code examples with \code...\endcode so that they're appropriately
  formatted by Doxygen.
* Add qualification for links to field of structs (specifically callbacks);
* Escape #, @ and < as needed to avoid them being interpreted by Doxygen;
* Remove incorrect uses of "\see name", preferring #name;
* Fix a glitchy "\param Returns..." to be "\returns";
* Fix parameter names given to \param, typos and otherwise.

llvm-svn: 158489
2012-06-15 05:41:51 +00:00
John McCall d8d00be632 It turns out that implementing the rethrow-on-fallthrough
semantics of a ctor/dtor function-try-block catch handler
by pushing a normal cleanup is not just overkill but actually
actively wrong when the handler contains an explicit return
(which is only legal in a dtor).  Just emit the rethrow as
ordinary code at the fallthrough point.  Fixes PR13102.

llvm-svn: 158488
2012-06-15 05:27:05 +00:00
Richard Smith e6799ddae8 PR12717: Clang supports hexadecimal floating-point literals in all language
modes. For languages other than C99/C11, this isn't quite a conforming
extension, and for C++11, it breaks some reasonable code containing
user-defined literals.

In languages which don't officially have hexfloats, pare back this extension
to only apply in cases where the token starts 0x and does not contain an
underscore. The extension is still not quite conforming, but it's a lot closer
now.

llvm-svn: 158487
2012-06-15 05:07:49 +00:00
James Dennett 261a941a12 Ongoing documentation cleanup: fixed Doxygen markup errors, added \brief
annotations in many places where it involved little change, fixed some
examples and marked code examples with \code...\endcode, and changed a few
nearby mentions of C++0x to refer to C++11.

llvm-svn: 158486
2012-06-15 04:35:30 +00:00
Marshall Clow bfb85e676c Had a closing brace inside an #ifdef -- oops!
llvm-svn: 158485
2012-06-15 01:15:47 +00:00
Marshall Clow 71757ef3ed Adding acessors to COFFObjectFile so that clients can get at the (non-generic) bits
llvm-svn: 158484
2012-06-15 01:08:25 +00:00
David Blaikie 2af2b3071d Fix PR13065.
This condition (added in r158093) was overly conservative.

llvm-svn: 158483
2012-06-15 00:47:13 +00:00
Pete Cooper 1d1fa72837 Recommit r158407: Allow SROA to look at a vector type and see if the offset is out of range to be replaced with a scalar access. Now with additional fix and test for indexing into a vector inside a struct
llvm-svn: 158479
2012-06-14 23:53:53 +00:00
Richard Trieu 7cdfe8fa04 Fix T* p to T *p
llvm-svn: 158478
2012-06-14 23:18:09 +00:00