Commit Graph

33203 Commits

Author SHA1 Message Date
Jordan Rose 4c56c22634 [analyzer] Silence warnings coming from allocators used by std::basic_string.
This is similar to r194004: because we can't reason about the data structure
invariants of std::basic_string, the analyzer decides it's possible for an
allocator to be used to deallocate the string's inline storage. Just ignore
this by walking up the stack, skipping past methods in classes with
"allocator" in the name, and seeing if we reach std::basic_string that way.

PR17866

llvm-svn: 194764
2013-11-15 02:11:19 +00:00
Jordan Rose 11288ce34c [analyzer] Include bug column numbers in HTML output (in a comment).
This has no effect on user-visible output, but can be used by post-processing
tools that work with the generated HTML, rather than using CmpRuns.py's
interface to work with plists.

Patch by György Orbán!

llvm-svn: 194763
2013-11-15 02:11:11 +00:00
Richard Smith e6c19f22b2 Modern gcc is happy to constant evaluate __builtin_strlen in various cases
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.

llvm-svn: 194762
2013-11-15 02:10:04 +00:00
Tom Stellard 5558304ba2 R600: Add processor type for Hawaii
llvm-svn: 194751
2013-11-14 23:45:53 +00:00
David Peixotto 4afe079663 Fix typo
llvm-svn: 194744
2013-11-14 22:58:17 +00:00
David Peixotto dfb661434d Pass -Wa,-I and -Xassembler -I args to integrated assembler
This patch adds -I to the arguments that are passed to the
integrated assembler from -Wa, and -Xassembler args.

llvm-svn: 194743
2013-11-14 22:52:58 +00:00
Richard Smith 00f5d8927b DR408: If a static data member of incomplete array type is declared in a class
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.

Patch by Karthik Bhat!

llvm-svn: 194740
2013-11-14 22:40:45 +00:00
Chad Rosier 7aaee48bf0 [AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
and accumulate instructions.

llvm-svn: 194732
2013-11-14 22:02:24 +00:00
Fariborz Jahanian da267d0551 ObjectiveC migrator: This patch sets access property
attributes on 'readonly' properties. // rdar://15460787

llvm-svn: 194718
2013-11-14 18:28:58 +00:00
Joey Gouly 561bba2e9f [OpenCL] Make sure we put string literals in the constant address space.
llvm-svn: 194717
2013-11-14 18:26:10 +00:00
Jordan Rose dba2692865 [analyzer] Treat MSVC's _wassert as noreturn.
This makes sure the analyzer actually honors assert() in an MSVC project.

Patch by Anders Montonen!

llvm-svn: 194716
2013-11-14 17:55:00 +00:00
Argyrios Kyrtzidis 61f2032d3b [objcmt] Introduce "objcmt-white-list-dir-path=" option.
This options accepts a path to a directory, collects the filenames of the files
it contains, and the migrator will only modify files with the same filename.

llvm-svn: 194710
2013-11-14 16:33:29 +00:00
Argyrios Kyrtzidis c47c63b2dd [objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are companion flags.
Ignore them when determining if some transformation was enabled.

llvm-svn: 194709
2013-11-14 16:33:20 +00:00
Benjamin Kramer e8a2c18bc7 Move classes into anonymous namespaces.
llvm-svn: 194706
2013-11-14 15:46:10 +00:00
Ted Kremenek 435b4c786a Revert r194663 and r194647.
Per feedback from Jordan Rose I realized this wasn't the right way to go.

llvm-svn: 194664
2013-11-14 04:44:56 +00:00
Ted Kremenek 428b61dc14 Refine -Wunused-variable to only suppress warning for __bridge_transfer, not all bridge casts.
Also refine test case to capture the intention of this suppression.  Essentially
some developers use __bridge_transfer as if it were a safe CFRelease.

llvm-svn: 194663
2013-11-14 04:27:00 +00:00
Kevin Qin caac85e612 [AArch64 neon] support poly64 and relevant intrinsic functions.
llvm-svn: 194660
2013-11-14 03:29:16 +00:00
Kevin Qin 1718af6f0a Implement aarch64 neon instruction class misc.
llvm-svn: 194657
2013-11-14 02:45:18 +00:00
Serge Pavlov 3cb8022849 Added warning on structures/unions that are empty or contain only
bit fields of zero size. Warnings are generated in C++ mode and if
only such type is defined inside extern "C" block.
The patch fixed PR5065.

Differential Revision: http://llvm-reviews.chandlerc.com/D2151

llvm-svn: 194653
2013-11-14 02:13:03 +00:00
Jiangning Liu 18b707cb3f Implement AArch64 NEON instruction set AdvSIMD (table).
llvm-svn: 194649
2013-11-14 01:57:55 +00:00
Ted Kremenek f6171b3cdf Suppress -Wunused-variable when initializer uses bridge casts for memory management.
Fixes <rdar://problem/15432770>.

llvm-svn: 194647
2013-11-14 01:42:17 +00:00
Fariborz Jahanian ae02d1552f ObjectiveC ARC. objc_bridge attribute should be applied to
toll-free bridging cf types only. // rdar//15454846 wip.

llvm-svn: 194640
2013-11-14 00:43:05 +00:00
Fariborz Jahanian 0a0a39708c ObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
that teaches the compiler about a subset of toll-free 
bridging semantics. This is wip. // rdar://15454846

llvm-svn: 194633
2013-11-13 23:59:17 +00:00
Argyrios Kyrtzidis ee02a8a926 [objcmt] If no objcmt options were specified, default to enable literals+subscripting.
llvm-svn: 194629
2013-11-13 23:38:22 +00:00
Argyrios Kyrtzidis 55ecf99285 [objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

llvm-svn: 194628
2013-11-13 23:38:20 +00:00
Argyrios Kyrtzidis 7a2645f91f [objcmt] If the frontend option is frontend::MigrateSource then we don't need to create
the arcmt wrappers.

llvm-svn: 194627
2013-11-13 23:38:17 +00:00
Rafael Espindola d967badc64 Don't use alias from derived dtor to base dtor at -O0.
This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.

This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.

llvm-svn: 194618
2013-11-13 23:20:45 +00:00
Reid Kleckner 59e4a6f5e2 -fms-extensions: Recognize _alloca as an alias for the alloca builtin
Differential Revision: http://llvm-reviews.chandlerc.com/D1989

llvm-svn: 194617
2013-11-13 22:58:53 +00:00
Reid Kleckner cf8933d1b7 Only provide MS builtins when -fms-extensions is on
We already have builtins that are only available in GNU mode, so this
mirrors that.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D2128

llvm-svn: 194615
2013-11-13 22:47:22 +00:00
Dmitri Gribenko 7244bee1a8 libclang does not depend directly on clangFormat; but clangIndex does
llvm-svn: 194611
2013-11-13 22:26:04 +00:00
Dmitri Gribenko 9e6051135a Documentation parsing: move comment-to-XML conversion routines to libIndex
llvm-svn: 194610
2013-11-13 22:16:51 +00:00
Warren Hunt 486e71460d No functional change. Renaming a variable in RecordLayoutBuilder and
improving comments to make documentation more accurate.

Differential Revision:http://llvm-reviews.chandlerc.com/D2172

llvm-svn: 194609
2013-11-13 22:16:13 +00:00
Chad Rosier e714a962b5 [AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.

llvm-svn: 194599
2013-11-13 20:05:44 +00:00
Rafael Espindola 7cf6f00f56 Drop windows specific handling of equivalent destructors.
Now that the relevant tests use -mconstructor-aliases and the missing
features have been implemented, we can just drop this.

No functionality change.

llvm-svn: 194595
2013-11-13 18:46:32 +00:00
Weiming Zhao 580dcfbd27 Adds ARM backend options: -mrestrict-it and -mno-restrict-it
To support the generation of IT block in Thumbv7 way or
Thumbv8 way

llvm-svn: 194593
2013-11-13 18:31:23 +00:00
Argyrios Kyrtzidis 3e8547a5ca [objcmt] Use FileIDs directly instead of their hash value.
No functionality change.

llvm-svn: 194590
2013-11-13 18:20:31 +00:00
Timur Iskhodzhanov 4ddf59201a No need to use CGM.getCXXABI() from CXXABI
llvm-svn: 194584
2013-11-13 16:03:43 +00:00
Alexander Kornienko 393e3088a1 Correctly mark first token in the presence of UTF-8 BOM.
Summary: Fixes http://llvm.org/PR17753

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2159

llvm-svn: 194576
2013-11-13 14:04:17 +00:00
Diego Novillo 5c29705c13 Add -fprofile-sample-use to Clang's driver.
This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.

llvm-svn: 194567
2013-11-13 12:22:39 +00:00
Serge Pavlov 750db65bac Warn on duplicate function specifier
This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.

Differential Revision: http://llvm-reviews.chandlerc.com/D2025

llvm-svn: 194559
2013-11-13 06:57:53 +00:00
Richard Smith 7309f60b9e PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. Patch by Ivan A. Kosarev!

llvm-svn: 194540
2013-11-13 01:24:28 +00:00
Fariborz Jahanian 2e793d6124 ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
on inferred property attribute under
 -objcmt-ns-nonatomic-iosonly  option.
// rdar://15442742

llvm-svn: 194532
2013-11-13 00:08:36 +00:00
Rafael Espindola 129d313c8d Avoid producing mismatched comdats.
The problem was that given

template<typename T>
struct foo {
  ~foo() {}
};
template class foo<int>;

We would produce a alias, creating a comdat with D0 and D1, since the symbols
have to be weak. Another TU is not required to have a explicit template
instantiation definition or an explict template instantiation declaration and
for

template<typename T>
struct foo {
  ~foo() {}
};
foo<int> a;

we would produce a comdat with only one symbol in it.

llvm-svn: 194520
2013-11-12 22:06:46 +00:00
Weiming Zhao 87bb4920e9 add intrinsics: __builtin_arm_{dmb,dsb} for ARM
llvm-svn: 194513
2013-11-12 21:42:50 +00:00
Fariborz Jahanian ff6c97c0d2 ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://15363492

llvm-svn: 194507
2013-11-12 20:50:26 +00:00
Fariborz Jahanian bed1be926d ObjectiveC migrator. Another alternative to
"atomic" or "nonatomic" for properties is
NS_NONATOMIC_IOSONLY. Use it if available.
// rdar://15442742

llvm-svn: 194503
2013-11-12 19:25:50 +00:00
Alexander Kornienko 875395f9f8 Remove extra whitespace instead of breaking the line in comments when possible.
Summary: Solves the problem described in http://llvm.org/PR17756

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2131

llvm-svn: 194493
2013-11-12 17:50:13 +00:00
Alexander Kornienko 3abbb8a433 Do not insert backslashes, when breaking line comments after preprocessor directives.
Summary: This solves http://llvm.org/PR17536

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D2142

llvm-svn: 194491
2013-11-12 17:30:49 +00:00
Fariborz Jahanian fd4ce193ba ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://15363492

llvm-svn: 194489
2013-11-12 17:08:46 +00:00
Daniel Sanders 8b59af15ed [mips][msa] Enable inlinse assembly for MSA.
Like GCC, this re-uses the 'f' constraint and a new 'w' print-modifier:
  asm ("ldi.w %w0, 1", "=f"(result));

Unlike GCC, the 'w' print-modifer is not _required_ to produce the intended
output. This is a consequence of differences in the internal handling of
the registers in each compiler. To be source-compatible between the
compilers, users must use the 'w' print-modifier.

MSA registers (including control registers) are supported in clobber lists.

llvm-svn: 194476
2013-11-12 12:56:01 +00:00
Robert Lytton eaf6f36e6d XCore target requires preferred alignment.
The xcore llvm backend does not handle 8 byte alignment viz:
  "%BadAlignment = alloca i64, align 8"
So getPreferredTypeAlign() must never overalign.

llvm-svn: 194462
2013-11-12 10:09:34 +00:00
Robert Lytton cc4246614f XCore target Type defines.
Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

llvm-svn: 194461
2013-11-12 10:09:30 +00:00
Robert Lytton 6b1deb4cf9 XCore target has -fno-use-cxa-atexit as default.
llvm-svn: 194460
2013-11-12 10:09:22 +00:00
Rafael Espindola 0196a1d98f Keep the old function order in CodeGenModule::applyReplacements.
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.

This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.

This is a fixed version of r194357 which handles replacing a destructor with
another which is an alias to a third one.

llvm-svn: 194452
2013-11-12 04:53:19 +00:00
Rafael Espindola b44676c221 This reverts commit r194435 and r194434.
Trying to get the bots green.

llvm-svn: 194450
2013-11-12 04:33:56 +00:00
Faisal Vali 218e94b6b6 COSMETIC: Fix 80 column overflow in some comments introduced in r194188
no functionality change.

llvm-svn: 194449
2013-11-12 03:56:08 +00:00
Faisal Vali 8bc2bc71f6 A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++.
See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev.

This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda.

A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME.

Patch was LGTM'd by Richard (just barely :)

http://llvm-reviews.chandlerc.com/D2144

llvm-svn: 194448
2013-11-12 03:48:27 +00:00
Richard Smith adf3018125 Remove C++11ism.
llvm-svn: 194446
2013-11-12 02:58:11 +00:00
Richard Smith 16e1b07597 Rather than duplicating extension diagnostics to allow them to cause a
substitution failure, allow a flag to be set on the Diagnostic object,
to mark it as 'causes substitution failure'.

Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior
rather than a bunch of flags.

llvm-svn: 194444
2013-11-12 02:41:45 +00:00
Reid Kleckner a5eef14eba -fms-compatibility: Use C++98 null pointer constant rules
Patch by Will Wilson!

llvm-svn: 194441
2013-11-12 02:22:34 +00:00
Faisal Vali 97d8c33fa7 COSMETIC: Right justify an asterix in the previous refactoring.
Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;)

No functionality change.

llvm-svn: 194439
2013-11-12 01:46:33 +00:00
Faisal Vali 524ca28b2b REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.
No Functionality change.

This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope. 

llvm-svn: 194438
2013-11-12 01:40:44 +00:00
Fariborz Jahanian 1236485573 ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://15363492

llvm-svn: 194434
2013-11-11 23:44:52 +00:00
Akira Hatanaka c4baedd71d [mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.

llvm-svn: 194426
2013-11-11 22:10:46 +00:00
Sylvestre Ledru e293b1a8d8 Revert "Using an invalid -O falls back on -O3 instead of an error"
This reverts commit r194403.

Was breaking too many tests...

llvm-svn: 194420
2013-11-11 20:51:44 +00:00
Rafael Espindola b15683e635 Fix pr17875.
The assert this patch deletes was valid only when aliasing D2 to D1, not when
looking at a base class. Since the assert was in the path where we had already
decided to not produce an alias, just drop it.

llvm-svn: 194411
2013-11-11 19:35:06 +00:00
Tim Northover e77f78cbad Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
llvm-svn: 194408
2013-11-11 19:11:22 +00:00
Sylvestre Ledru 26386be183 Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c 
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c 
warning: invalid value '20' in '-O20'. Fall back on value '3'

Reviewers: rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits, hfinkel, rengolin

Differential Revision: http://llvm-reviews.chandlerc.com/D2125

llvm-svn: 194403
2013-11-11 19:01:05 +00:00
Chad Rosier 249c714bb4 [AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.
llvm-svn: 194395
2013-11-11 18:04:22 +00:00
Joerg Sonnenberger 0e921f2bd9 NetBSD 6.99.26 switched to default rounding mode, so adjust
__FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2
variances on NetBSD.

llvm-svn: 194377
2013-11-11 14:00:37 +00:00
Rafael Espindola 8d693a3429 Revert "Keep the old function order in CodeGenModule::applyReplacements."
This reverts commit r194357.

Debugging a cast failure during bootstrap.

llvm-svn: 194358
2013-11-11 00:37:22 +00:00
Rafael Espindola 732c99c4ae Keep the old function order in CodeGenModule::applyReplacements.
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.

This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.

llvm-svn: 194357
2013-11-10 19:04:30 +00:00
Benjamin Kramer eed8061b9f Avoid double StringMap lookups. No functionality change.
llvm-svn: 194355
2013-11-10 16:55:11 +00:00
Benjamin Kramer 70e2e17872 CommentSema: Factor code better. No functionality change.
llvm-svn: 194354
2013-11-10 16:26:43 +00:00
Roman Divacky f0d7f94490 Add gold plugin support to the FreeBSD link driver.
llvm-svn: 194350
2013-11-10 09:31:43 +00:00
Rafael Espindola 236db46f79 This reverts commit r194330, r194329 and r194328.
The test was still failing on OS X and mingw.

llvm-svn: 194334
2013-11-09 20:07:19 +00:00
David Chisnall 867ccd865e Commit the changes to make libc++ the default on FreeBSD >= 10, rather than
just the test...

llvm-svn: 194333
2013-11-09 15:10:56 +00:00
David Chisnall e6dcfaf127 Add support for -fuse-ld=.
llvm-svn: 194328
2013-11-09 14:16:52 +00:00
Richard Smith da35e963bc Try to recover a bit better if a close brace is missing from the end of a class
definition. If we see something that looks like a namespace definition inside a
class, that strongly indicates that a close brace was missing somewhere.

llvm-svn: 194319
2013-11-09 04:52:51 +00:00
Daniel Jasper 279430585a clang-format: Fix alignment of ObjC string literals.
This used to interfere with AlwaysBreakBeforeMultilineStrings.

This fixes llvm.org/PR17856.

llvm-svn: 194310
2013-11-09 03:08:25 +00:00
Rafael Espindola 961ba21a47 Don't emit an internal destructor that is identical to an external one.
It is not safe to emit alias to undefined (not supported by ELF or COFF), but
it is safe to rauw when the alias would have been internal or linkonce_odr.

llvm-svn: 194307
2013-11-09 01:57:21 +00:00
Rafael Espindola 23d3751170 Use rauw for all discardable aliases, not just linkonce_odr.
llvm-svn: 194296
2013-11-08 23:46:20 +00:00
Daniel Jasper 0e93cdb0d0 clang-format: Improve clang-format's detection about comment binding.
Before, existing code in the form of:

  int a; // this is a.
  // This is
  // b.
  int b;

Got turned into:

  int a; // this is a.
         // This is
  // b.
  int b;

llvm-svn: 194294
2013-11-08 23:31:14 +00:00
Nick Lewycky 22e55a0590 Remove an incorrect optimization inside Clang's IRGen. Its check to determine
whether we can safely lower a conditional operator to select was insufficient.
I've left a large comment in place to explaining the sort of problems that this
transform can encounter in clang in the hopes of discouraging others from
reimplementing it wrongly again in the future. (The test should also help with
that, but it's easy to work around any single test I might add and think that
your particular implementation doesn't miscompile any code.)

llvm-svn: 194289
2013-11-08 23:00:12 +00:00
Rafael Espindola e2ec6faa36 If a linkonce_odr dtor/ctor is identical to another one, just rauw.
Unlike an alias a rauw is always safe, so we don't need to avoid this
optimization when the replacement is not know to be available in every TU.

llvm-svn: 194288
2013-11-08 22:59:46 +00:00
Richard Smith 68b1453ce0 Fix %select numbering confusion between diagnostic and Diag call.
llvm-svn: 194281
2013-11-08 21:51:24 +00:00
Reid Kleckner 5bc6d0fbe4 Make -fdump-vtable-layouts print to stdout, not stderr
This makes it consistent with -fdump-record-layouts, which was moved to
outs() in r186219.  My reasoning for going with stdout is that when one
of these options is present, the layouts are really a program output,
and shouldn't be interleaved with diagnostics, which are on stderr.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D2127

llvm-svn: 194279
2013-11-08 21:28:00 +00:00
Daniel Jasper 9e5ede0f8b clang-format: Improve formatting of operators forced to new lines.
Before:
  unsigned ContentSize =
      sizeof(int16_t) // DWARF ARange version number
      +
      sizeof(int32_t) // Offset of CU in the .debug_info section
      +
      sizeof(int8_t) // Pointer Size (in bytes)
      +
      sizeof(int8_t); // Segment Size (in bytes)

After:
  unsigned ContentSize =
      sizeof(int16_t)   // DWARF ARange version number
      + sizeof(int32_t) // Offset of CU in the .debug_info section
      + sizeof(int8_t)  // Pointer Size (in bytes)
      + sizeof(int8_t); // Segment Size (in bytes)

This fixes llvm.org/PR17687.

llvm-svn: 194276
2013-11-08 19:56:28 +00:00
DeLesley Hutchins e73d6b605c Thread-safety analysis: check guarded_by and pt_guarded_by on array access.
Currently supported only with -Wthread-safety-beta.

llvm-svn: 194275
2013-11-08 19:42:01 +00:00
Richard Smith 003c5e1db9 Untabify.
llvm-svn: 194274
2013-11-08 19:03:29 +00:00
Richard Smith cd556eb265 Issue a diagnostic if we see a templated friend declaration that we do not
support.

llvm-svn: 194273
2013-11-08 18:59:56 +00:00
Daniel Jasper 98fb6e1b9f clang-format: Don't auto-break short macros in WebKit style.
This fixes llvm.org/PR17842.

llvm-svn: 194268
2013-11-08 17:33:27 +00:00
Daniel Jasper 4478e5245e clang-format: Improve linebreaking and indentation for ObjC calls.
Before:
  popup_wdow_.reset([[RenderWidgetPopupWindow alloc]
      iniithContentRect:
          NSMakRet(origin_global.x, origin_global.y, pos.width(), pos.height())
                syeMask:NSBorderlessWindowMask
                  bking:NSBackingStoreBuffered
                    der:NO]);
  [self param:function( //
      parameter)]

After:
  popup_wdow_.reset([[RenderWidgetPopupWindow alloc]
      iniithContentRect:NSMakRet(origin_global.x, origin_global.y, pos.width(),
                                 pos.height())
                syeMask:NSBorderlessWindowMask
                  bking:NSBackingStoreBuffered
                    der:NO]);
  [self param:function( //
                  parameter)]

llvm-svn: 194267
2013-11-08 17:33:24 +00:00
Jordan Rose 5650bcb18e Revert 'Tweak ContainerNonEmptyMap with "int" instead of "bool"'.
I've added the missing ImutProfileInfo [sic] specialization for bool,
so this patch on r194235 is no longer needed.

This reverts r194244 / 2baea2887dfcf023c8e3560e5d4713c42eed7b6b.

llvm-svn: 194265
2013-11-08 17:23:33 +00:00
Timur Iskhodzhanov 2c9341f979 Thread the info about vbptr sharing through ASTRecordLayout
Reviewed at http://llvm-reviews.chandlerc.com/D2120

llvm-svn: 194256
2013-11-08 11:45:35 +00:00
NAKAMURA Takumi d23177a27e StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp: Tweak ContainerNonEmptyMap with "int" instead of "bool", to appease building since r194235.
In ADT/ImmutableSet, ImutProfileInfo<bool> cannot be matched to ImutProfileInteger.
I didn't have idea it'd the right way if PROFILE_INTEGER_INFO(bool) could be added there.

llvm-svn: 194244
2013-11-08 04:00:53 +00:00
Douglas Gregor 9f2ed47133 s/DebugPrint/dump/g
llvm-svn: 194242
2013-11-08 02:16:10 +00:00
Daniel Jasper b302f9a0fb clang-format: Properly indent ObjC calls wrapped before first selector
Before:
  [self // break
      a:a
     aa:aa
  aaaaa:aaa];

After:
  [self // break
          a:a
         aa:aa
      aaaaa:aaa];

llvm-svn: 194241
2013-11-08 02:08:01 +00:00
Douglas Gregor c9f019ab0f Objective-C++ ARC: Improve the conversion to a const __unsafe_unretained reference.
Under ARC++, a reference to a const Objective-C pointer is implicitly
treated as __unsafe_unretained, and can be initialized with (e.g.) a
__strong lvalue. Make sure this behavior does not break template
argument deduction and (related) that partial ordering still prefers a
'T* const&' template over a 'T const&' template when this case kicks
in. Fixes <rdar://problem/14467941>.

llvm-svn: 194239
2013-11-08 02:04:24 +00:00
Fariborz Jahanian 22626e7b49 ObjectiveC migrator. Added a dropped check in my
last patch.

llvm-svn: 194238
2013-11-08 02:00:22 +00:00