]> granicus.if.org Git - clang/log
clang
10 years agoRevert "Keep the old function order in CodeGenModule::applyReplacements."
Rafael Espindola [Mon, 11 Nov 2013 00:37:22 +0000 (00:37 +0000)]
Revert "Keep the old function order in CodeGenModule::applyReplacements."

This reverts commit r194357.

Debugging a cast failure during bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194358 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoKeep the old function order in CodeGenModule::applyReplacements.
Rafael Espindola [Sun, 10 Nov 2013 19:04:30 +0000 (19:04 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194357 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAvoid double StringMap lookups. No functionality change.
Benjamin Kramer [Sun, 10 Nov 2013 16:55:11 +0000 (16:55 +0000)]
Avoid double StringMap lookups. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194355 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCommentSema: Factor code better. No functionality change.
Benjamin Kramer [Sun, 10 Nov 2013 16:26:43 +0000 (16:26 +0000)]
CommentSema: Factor code better. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194354 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd gold plugin support to the FreeBSD link driver.
Roman Divacky [Sun, 10 Nov 2013 09:31:43 +0000 (09:31 +0000)]
Add gold plugin support to the FreeBSD link driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194350 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd -mconstructor aliases to some tests.
Rafael Espindola [Sat, 9 Nov 2013 23:05:07 +0000 (23:05 +0000)]
Add -mconstructor aliases to some tests.

clang-cl adds these, so this makes the tests a bit more realistic. These are the
tests where it would make a difference if the windows specific handling were
removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194336 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThis reverts commit r194330, r194329 and r194328.
Rafael Espindola [Sat, 9 Nov 2013 20:07:19 +0000 (20:07 +0000)]
This reverts commit r194330, r194329 and r194328.

The test was still failing on OS X and mingw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194334 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCommit the changes to make libc++ the default on FreeBSD >= 10, rather than
David Chisnall [Sat, 9 Nov 2013 15:10:56 +0000 (15:10 +0000)]
Commit the changes to make libc++ the default on FreeBSD >= 10, rather than
just the test...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194333 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFreeBSD 10 ships with only libc++, make sure it's the default when compiling
David Chisnall [Sat, 9 Nov 2013 15:03:56 +0000 (15:03 +0000)]
FreeBSD 10 ships with only libc++, make sure it's the default when compiling
c++ code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194332 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCorrectly set the target in fuse_ld.c correctly...
David Chisnall [Sat, 9 Nov 2013 14:43:08 +0000 (14:43 +0000)]
Correctly set the target in fuse_ld.c correctly...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194330 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd explicit target to the fuse_ld.c test.
David Chisnall [Sat, 9 Nov 2013 14:35:29 +0000 (14:35 +0000)]
Add explicit target to the fuse_ld.c test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194329 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd support for -fuse-ld=.
David Chisnall [Sat, 9 Nov 2013 14:16:52 +0000 (14:16 +0000)]
Add support for -fuse-ld=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194328 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTry to recover a bit better if a close brace is missing from the end of a class
Richard Smith [Sat, 9 Nov 2013 04:52:51 +0000 (04:52 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194319 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoComment parsing: recognize \def (but processing is a no-op, like the rest of
Dmitri Gribenko [Sat, 9 Nov 2013 03:50:37 +0000 (03:50 +0000)]
Comment parsing: recognize \def (but processing is a no-op, like the rest of
similar commands that duplicate the declaration name)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194312 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Fix alignment of ObjC string literals.
Daniel Jasper [Sat, 9 Nov 2013 03:08:25 +0000 (03:08 +0000)]
clang-format: Fix alignment of ObjC string literals.

This used to interfere with AlwaysBreakBeforeMultilineStrings.

This fixes llvm.org/PR17856.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194310 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't emit an internal destructor that is identical to an external one.
Rafael Espindola [Sat, 9 Nov 2013 01:57:21 +0000 (01:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194307 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse a StringRef. Saves 0.00000000000001s on execution time.
Bill Wendling [Sat, 9 Nov 2013 00:23:58 +0000 (00:23 +0000)]
Use a StringRef. Saves 0.00000000000001s on execution time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194301 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate macro expansion diagnostic examples to say 'expanded from:'
Hans Wennborg [Fri, 8 Nov 2013 23:52:29 +0000 (23:52 +0000)]
Update macro expansion diagnostic examples to say 'expanded from:'
instead of 'instantiated from:'. The actual wording of the note was
changed in r135135.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194297 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse rauw for all discardable aliases, not just linkonce_odr.
Rafael Espindola [Fri, 8 Nov 2013 23:46:20 +0000 (23:46 +0000)]
Use rauw for all discardable aliases, not just linkonce_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194296 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve clang-format's detection about comment binding.
Daniel Jasper [Fri, 8 Nov 2013 23:31:14 +0000 (23:31 +0000)]
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;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194294 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix name in test.
Rafael Espindola [Fri, 8 Nov 2013 23:06:10 +0000 (23:06 +0000)]
Fix name in test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194291 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove an incorrect optimization inside Clang's IRGen. Its check to determine
Nick Lewycky [Fri, 8 Nov 2013 23:00:12 +0000 (23:00 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194289 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIf a linkonce_odr dtor/ctor is identical to another one, just rauw.
Rafael Espindola [Fri, 8 Nov 2013 22:59:46 +0000 (22:59 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194288 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPy3k compat for clang-format Sublime Text extension.
Sean Silva [Fri, 8 Nov 2013 22:46:56 +0000 (22:46 +0000)]
Py3k compat for clang-format Sublime Text extension.

Sublime Text 2 uses Python 2.6
Sublime Text 3 uses Python 3.3

The `print` function has been available as a __future__ import since
2.6, so use it.

Patch by Johan Engelen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194287 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix grammar-o.
Bill Wendling [Fri, 8 Nov 2013 22:15:02 +0000 (22:15 +0000)]
Fix grammar-o.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194283 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix %select numbering confusion between diagnostic and Diag call.
Richard Smith [Fri, 8 Nov 2013 21:51:24 +0000 (21:51 +0000)]
Fix %select numbering confusion between diagnostic and Diag call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194281 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake -fdump-vtable-layouts print to stdout, not stderr
Reid Kleckner [Fri, 8 Nov 2013 21:28:00 +0000 (21:28 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194279 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve formatting of operators forced to new lines.
Daniel Jasper [Fri, 8 Nov 2013 19:56:28 +0000 (19:56 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194276 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThread-safety analysis: check guarded_by and pt_guarded_by on array access.
DeLesley Hutchins [Fri, 8 Nov 2013 19:42:01 +0000 (19:42 +0000)]
Thread-safety analysis: check guarded_by and pt_guarded_by on array access.
Currently supported only with -Wthread-safety-beta.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194275 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUntabify.
Richard Smith [Fri, 8 Nov 2013 19:03:29 +0000 (19:03 +0000)]
Untabify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194274 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIssue a diagnostic if we see a templated friend declaration that we do not
Richard Smith [Fri, 8 Nov 2013 18:59:56 +0000 (18:59 +0000)]
Issue a diagnostic if we see a templated friend declaration that we do not
support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194273 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Don't auto-break short macros in WebKit style.
Daniel Jasper [Fri, 8 Nov 2013 17:33:27 +0000 (17:33 +0000)]
clang-format: Don't auto-break short macros in WebKit style.

This fixes llvm.org/PR17842.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194268 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve linebreaking and indentation for ObjC calls.
Daniel Jasper [Fri, 8 Nov 2013 17:33:24 +0000 (17:33 +0000)]
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)]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194267 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert 'Tweak ContainerNonEmptyMap with "int" instead of "bool"'.
Jordan Rose [Fri, 8 Nov 2013 17:23:33 +0000 (17:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194265 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThread the info about vbptr sharing through ASTRecordLayout
Timur Iskhodzhanov [Fri, 8 Nov 2013 11:45:35 +0000 (11:45 +0000)]
Thread the info about vbptr sharing through ASTRecordLayout

Reviewed at http://llvm-reviews.chandlerc.com/D2120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194256 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove diagnostic leftover from the ancient times when C++1y support was incomplete.
Benjamin Kramer [Fri, 8 Nov 2013 09:48:11 +0000 (09:48 +0000)]
Remove diagnostic leftover from the ancient times when C++1y support was incomplete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194254 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Write files atomically
Alp Toker [Fri, 8 Nov 2013 08:07:19 +0000 (08:07 +0000)]
clang-format: Write files atomically

Switch clang-format over to Rewriter::overwriteChangedFiles().

The previous implementation was attempting to stream back directly to the
original file and failing if it was already memory mapped by MemoryBuffer,
an operation unsupported by Windows.

MemoryBuffer generally mmaps files larger than the physical page size so
this will have been difficult to reproduce consistently.

This change also reduces flicker in code editors and IDEs on all platforms
when reformatting in-place.

Note that other incorrect uses of MemoryBuffer exist in LLVM/clang and
will need a similar fix.

A test should be added for Windows when libFormat performance issues are
fixed (it takes longer than a day to format a 1MB file at present!)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194250 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImprove the missing ASM parser test for MS-style assembly
Alp Toker [Fri, 8 Nov 2013 06:50:48 +0000 (06:50 +0000)]
Improve the missing ASM parser test for MS-style assembly

It's better to test clang-check rather than the internal c-index-test utility.

Also adds a target so we can remove the XFAILs.

Thanks to Richard Barton for spotting the test failure on ARM.

Test originally from r193685.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194249 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd .clang-format without column limit to subdirectory tests/.
Daniel Jasper [Fri, 8 Nov 2013 06:45:35 +0000 (06:45 +0000)]
Add .clang-format without column limit to subdirectory tests/.

A column limit in the test folder can lead to trouble as the RUN, CHECK,
etc. comments can potentially be broken over multiple lines changing
their meaning. Without column limit, clang-format will simply keep the
test author's line breaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194248 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang/test/CXX/drs/dr1xx.cpp: Add explicit triple x86_64-unknown-unknown to satisfy...
NAKAMURA Takumi [Fri, 8 Nov 2013 05:16:50 +0000 (05:16 +0000)]
clang/test/CXX/drs/dr1xx.cpp: Add explicit triple x86_64-unknown-unknown to satisfy check7a and check8a since r194240.

For i686 targets and LLP64 targets, we can see;
  error: 'error' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr1xx.cpp Line 761: 'check7a' declared as an array with a negative size
    File clang/test/CXX/drs/dr1xx.cpp Line 765: 'check8a' declared as an array with a negative size
  2 errors generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194246 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp: Tweak ContainerNonEmptyMap...
NAKAMURA Takumi [Fri, 8 Nov 2013 04:00:53 +0000 (04:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194244 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix tests effected by r194221
David Majnemer [Fri, 8 Nov 2013 03:06:45 +0000 (03:06 +0000)]
Fix tests effected by r194221

GEP expressions were folded differently from before, change the tests to
reflect this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194243 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agos/DebugPrint/dump/g
Douglas Gregor [Fri, 8 Nov 2013 02:16:10 +0000 (02:16 +0000)]
s/DebugPrint/dump/g

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194242 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Properly indent ObjC calls wrapped before first selector
Daniel Jasper [Fri, 8 Nov 2013 02:08:01 +0000 (02:08 +0000)]
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];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194241 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTests for core issue 170-200.
Richard Smith [Fri, 8 Nov 2013 02:05:54 +0000 (02:05 +0000)]
Tests for core issue 170-200.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194240 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjective-C++ ARC: Improve the conversion to a const __unsafe_unretained reference.
Douglas Gregor [Fri, 8 Nov 2013 02:04:24 +0000 (02:04 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194239 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjectiveC migrator. Added a dropped check in my
Fariborz Jahanian [Fri, 8 Nov 2013 02:00:22 +0000 (02:00 +0000)]
ObjectiveC migrator. Added a dropped check in my
last patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194238 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a bogus assert I introduced in r194224
Douglas Gregor [Fri, 8 Nov 2013 01:20:25 +0000 (01:20 +0000)]
Fix a bogus assert I introduced in r194224

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194237 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[analyzer] Add IdenticalExprChecker, to find copy-pasted code.
Jordan Rose [Fri, 8 Nov 2013 01:15:39 +0000 (01:15 +0000)]
[analyzer] Add IdenticalExprChecker, to find copy-pasted code.

This syntactic checker looks for expressions on both sides of comparison
operators that are structurally the same. As a special case, the
floating-point idiom "x != x" for "isnan(x)" is left alone.

Currently this only checks comparison operators, but in the future we could
extend this to include logical operators or chained if-conditionals.

Checker by Per Viberg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194236 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[analyzer] Track whether an ObjC for-in loop had zero iterations.
Jordan Rose [Fri, 8 Nov 2013 01:15:35 +0000 (01:15 +0000)]
[analyzer] Track whether an ObjC for-in loop had zero iterations.

An Objective-C for-in loop will have zero iterations if the collection is
empty. Previously, we could only detect this case if the program asked for
the collection's -count /before/ the for-in loop. Now, the analyzer
distinguishes for-in loops that had zero iterations from those with at
least one, and can use this information to constrain the result of calling
-count after the loop.

In order to make this actually useful, teach the checker that methods on
NSArray, NSDictionary, and the other immutable collection classes don't
change the count.

<rdar://problem/14992886>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194235 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[analyzer] Specialize "loop executed 0 times" for for-in and for-range loops.
Jordan Rose [Fri, 8 Nov 2013 01:15:30 +0000 (01:15 +0000)]
[analyzer] Specialize "loop executed 0 times" for for-in and for-range loops.

The path note that says "Loop body executed 0 times" has been changed to
"Loop body skipped when range is empty" for C++11 for-range loops, and to
"Loop body skipped when collection is empty" for Objective-C for-in loops.

Part of <rdar://problem/14992886>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194234 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObjectiveC migrator. Fixes an obscure bug where
Fariborz Jahanian [Fri, 8 Nov 2013 01:15:17 +0000 (01:15 +0000)]
ObjectiveC migrator. Fixes an obscure bug where
NS_RETURNS_INNER_POINTER ends up unintentionally
on the @property under -objcmt-migrate-all
// rdar://15396636

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194233 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoubsan: Only emit constants for filenames and type descriptors once.
Will Dietz [Fri, 8 Nov 2013 01:09:22 +0000 (01:09 +0000)]
ubsan: Only emit constants for filenames and type descriptors once.

Produces neater IR in significantly less time.

(~18% faster -O0 compile time for sqlite3 with -fsanitize=undefined)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194231 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Make breaking before ternary operators configurable.
Daniel Jasper [Fri, 8 Nov 2013 00:57:11 +0000 (00:57 +0000)]
clang-format: Make breaking before ternary operators configurable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194229 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEliminate an unnecessary .c_str()
Douglas Gregor [Fri, 8 Nov 2013 00:38:03 +0000 (00:38 +0000)]
Eliminate an unnecessary .c_str()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194228 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago Adds the ability to inject a DiagnosticConsumer into ClangTools.
Manuel Klimek [Thu, 7 Nov 2013 23:18:05 +0000 (23:18 +0000)]
 Adds the ability to inject a DiagnosticConsumer into ClangTools.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194226 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoModules: Teach the preprocessor to recognize 'import' only after an '@'.
Douglas Gregor [Thu, 7 Nov 2013 22:55:02 +0000 (22:55 +0000)]
Modules: Teach the preprocessor to recognize 'import' only after an '@'.

The preprocessor currently recognizes module declarations to load a
module based on seeing the 'import' keyword followed by an
identifier. This sequence is fairly unlikely in C (one would need a
type named 'import'), but is more common in Objective-C (where a
variable named 'import' can cause problems). Since import declarations
currently require a leading '@', recognize that in the preprocessor as
well. Fixes <rdar://problem/15084587>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194225 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRe-instate contextual conversion to Objective-C pointers in message sends.
Douglas Gregor [Thu, 7 Nov 2013 22:34:54 +0000 (22:34 +0000)]
Re-instate contextual conversion to Objective-C pointers in message sends.

When performing an Objective-C message send to a value of class type,
perform a contextual conversion to an Objective-C pointer type. We've
had this for a long time, but it recently regressed. Fixes
<rdar://problem/15234703>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194224 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIntroduce MatchFinder::matchAST.
Peter Collingbourne [Thu, 7 Nov 2013 22:30:36 +0000 (22:30 +0000)]
Introduce MatchFinder::matchAST.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194223 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRe-introduce MatchFinder::addDynamicMatcher.
Peter Collingbourne [Thu, 7 Nov 2013 22:30:32 +0000 (22:30 +0000)]
Re-introduce MatchFinder::addDynamicMatcher.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194222 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPR17800: When performing pack expansion, we must always rebuild the AST nodes
Richard Smith [Thu, 7 Nov 2013 20:07:17 +0000 (20:07 +0000)]
PR17800: When performing pack expansion, we must always rebuild the AST nodes
to avoid breaking AST invariants by reusing Stmt nodes within the same
function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194217 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve binary operator detection in macros.
Daniel Jasper [Thu, 7 Nov 2013 19:56:07 +0000 (19:56 +0000)]
clang-format: Improve binary operator detection in macros.

Before:
  #define M(NAME) assert(!Context.Verifying &&#NAME);

After:
  #define M(NAME) assert(!Context.Verifying && #NAME);

This fixes llvm.org/PR16156.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194216 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTests for CWG issue 165-170.
Richard Smith [Thu, 7 Nov 2013 19:26:14 +0000 (19:26 +0000)]
Tests for CWG issue 165-170.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194215 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve ObjC variadic and binary expression parameters.
Daniel Jasper [Thu, 7 Nov 2013 19:23:49 +0000 (19:23 +0000)]
clang-format: Improve ObjC variadic and binary expression parameters.

Before:
  [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
                           aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
                           aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa];
  [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa];

After:
  [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
                        aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
                        aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa];
  [self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa];

This addresses llvm.org/PR15349 and llvm.org/PR16185.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194214 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPR17615: A delegating constructor initializer is a full-expression. Don't
Richard Smith [Thu, 7 Nov 2013 18:45:03 +0000 (18:45 +0000)]
PR17615: A delegating constructor initializer is a full-expression. Don't
forget to clean up temporaries at the end of it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194213 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded a test case for the fix to bug 17632 in r193751
Chris Wailes [Thu, 7 Nov 2013 18:35:18 +0000 (18:35 +0000)]
Added a test case for the fix to bug 17632 in r193751

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194212 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoXFAIL the test for non-x86 targets for which this message cannot be generated.
Richard Barton [Thu, 7 Nov 2013 18:05:57 +0000 (18:05 +0000)]
XFAIL the test for non-x86 targets for which this message cannot be generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194211 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Improve formatting of constructor initializers.
Daniel Jasper [Thu, 7 Nov 2013 17:52:51 +0000 (17:52 +0000)]
clang-format: Improve formatting of constructor initializers.

Before:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa(aaaa,
                                                                      aaaa)) {}
After:
  Constructor()
      : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
            aaaaaaaaaaaaaaaaaaaaaaaaa(aaaa, aaaa)) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194210 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Remove old hack that mainly made incorrect tests pass.
Daniel Jasper [Thu, 7 Nov 2013 17:43:07 +0000 (17:43 +0000)]
clang-format: Remove old hack that mainly made incorrect tests pass.

As a side-effect, constructors definitions will correctly be recognized
and formatted as function declarations. Tests will be added in a
follow-up patch actually using the correct recognition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194209 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove an unnecessary condition that I added hastily: Unsigned numbers are obviously...
Faisal Vali [Thu, 7 Nov 2013 16:57:56 +0000 (16:57 +0000)]
Remove an unnecessary condition that I added hastily: Unsigned numbers are obviously >= 0 ;)

Also - others have complained about some white space issues - sorry about that - continues to be a pain point for me - will try and see what I can do with clang-format this evening after work - as a short term fix, if anyone can email me the files that they have already identified with issues, it would help me speed up a focused fix. sorry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194206 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Fix corner case for brace alignment.
Daniel Jasper [Thu, 7 Nov 2013 14:02:28 +0000 (14:02 +0000)]
clang-format: Fix corner case for brace alignment.

Before:
  Constructor::Constructor()
      : some_value{ //
            aaaaaaa //
  } {}

After:
  Constructor::Constructor()
      : some_value{ //
            aaaaaaa //
        } {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194204 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMinor refinement of VTableBuilder.h: fix wrong indentation, rename a struct field...
Timur Iskhodzhanov [Thu, 7 Nov 2013 13:34:02 +0000 (13:34 +0000)]
Minor refinement of VTableBuilder.h: fix wrong indentation, rename a struct field with a more appropriate name

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194202 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd parens for || in && in assert. No functionality change.
Benjamin Kramer [Thu, 7 Nov 2013 11:03:53 +0000 (11:03 +0000)]
Add parens for || in && in assert. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194200 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUbuntu has published its Saucy release. 'Trusty Tahr' dev has just started. Add its...
Sylvestre Ledru [Thu, 7 Nov 2013 09:31:30 +0000 (09:31 +0000)]
Ubuntu has published its Saucy release. 'Trusty Tahr' dev has just started. Add its support in Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194198 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixed bug in return type of __builtin_va_start().
Enea Zaffanella [Thu, 7 Nov 2013 08:14:26 +0000 (08:14 +0000)]
Fixed bug in return type of __builtin_va_start().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194197 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMark generic lambdas, and thus C++14, as complete. Add commented-out stub for C++17.
Richard Smith [Thu, 7 Nov 2013 06:41:26 +0000 (06:41 +0000)]
Mark generic lambdas, and thus C++14, as complete. Add commented-out stub for C++17.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194194 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTests for DR150 - DR165.
Richard Smith [Thu, 7 Nov 2013 06:24:09 +0000 (06:24 +0000)]
Tests for DR150 - DR165.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194192 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRewriteBuffer: Remove an unused typedef
Alp Toker [Thu, 7 Nov 2013 06:11:33 +0000 (06:11 +0000)]
RewriteBuffer: Remove an unused typedef

This hasn't been used for some time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194191 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUnbreak the Clang -Werror build by removing some unused variables
David Blaikie [Thu, 7 Nov 2013 05:52:35 +0000 (05:52 +0000)]
Unbreak the Clang -Werror build by removing some unused variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194190 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate cxx_dr_status.html to match current cwg issue list.
Richard Smith [Thu, 7 Nov 2013 05:34:58 +0000 (05:34 +0000)]
Update cxx_dr_status.html to match current cwg issue list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194189 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThis patch implements capturing of variables within generic lambdas.
Faisal Vali [Thu, 7 Nov 2013 05:17:06 +0000 (05:17 +0000)]
This patch implements capturing of variables within generic lambdas.

Both Richard and I felt that the current wording in the working paper needed some tweaking - Please see http://llvm-reviews.chandlerc.com/D2035 for additional context and references to core-reflector messages that discuss wording tweaks.

What is implemented is what we had intended to specify in Bristol; but, recently felt that the specification might benefit from some tweaking and fleshing.

As a rough attempt to explain the semantics: If a nested lambda with a default-capture names a variable within its body, and if the enclosing full expression that contains the name of that variable is instantiation-dependent - then an enclosing lambda that is capture-ready (i.e. within a non-dependent context) must capture that variable, if all intervening nested lambdas can potentially capture that variable if they need to, and all intervening parent lambdas of the capture-ready lambda can and do capture the variable.

Of note, 'this' capturing is also currently underspecified in the working paper for generic lambdas.  What is implemented here is if the set of candidate functions in a nested generic lambda includes both static and non-static member functions (regardless of viability checking - i.e. num and type of parameters/arguments) - and if all intervening nested-inner lambdas between the capture-ready lambda and the function-call containing nested lambda can capture 'this' and if all enclosing lambdas of the capture-ready lambda can capture 'this', then 'this' is speculatively captured by that capture-ready lambda.

Hopefully a paper for the C++ committee (that Richard and I had started some preliminary work on) is forthcoming.

This essentially makes generic lambdas feature complete, except for known bugs. The more prominent ones (and the ones I am currently aware of) being:
  - generic lambdas and init-captures are broken - but a patch that fixes this is already in the works ...
  - nested variadic expansions such as:
    auto K = [](auto ... OuterArgs) {
      vp([=](auto ... Is) {
          decltype(OuterArgs) OA = OuterArgs;
          return 0;
        }(5)...);
      return 0;
    };
    auto M = K('a', ' ', 1, " -- ", 3.14);
   currently cause crashes.  I think I know how to fix this (since I had done so in my initial implementation) - but it will probably take some work and back & forth with Doug and Richard.

A warm thanks to all who provided feedback - and especially to Doug Gregor and Richard Smith for their pivotal guidance: their insight and prestidigitation in such matters is boundless!

Now let's hope this commit doesn't upset the buildbot gods ;)

Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194188 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd the fact that Clang too is planning to start using C++11 (in some
Chandler Carruth [Thu, 7 Nov 2013 00:26:32 +0000 (00:26 +0000)]
Add the fact that Clang too is planning to start using C++11 (in some
limited ways) after the next release. See the lengthy discussions (which
are on-going) and the corresponding commit to LLVM's release notes.
Nothing is actually changing at this point, this is just further
spreading the plan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194184 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[-fms-extensions] Add support for __FUNCDNAME__
David Majnemer [Wed, 6 Nov 2013 23:31:56 +0000 (23:31 +0000)]
[-fms-extensions] Add support for __FUNCDNAME__

Summary:
Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled
function name via __FUNCDNAME__.  This implementation is very naive and
unoptimized, it is expected that __FUNCDNAME__ would be used rarely in
practice.

Reviewers: rnk, rsmith, thakis

CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D2109

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194181 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: Hide ignored joined flags as well
Alp Toker [Wed, 6 Nov 2013 23:17:02 +0000 (23:17 +0000)]
clang-cl: Hide ignored joined flags as well

This is an addendum to r194174.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194180 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-format: Separate line-merging logic into its own class.
Daniel Jasper [Wed, 6 Nov 2013 23:12:09 +0000 (23:12 +0000)]
clang-format: Separate line-merging logic into its own class.

No functional changes (intended).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194179 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDisable a tooling test on Windows.
Peter Collingbourne [Wed, 6 Nov 2013 23:02:51 +0000 (23:02 +0000)]
Disable a tooling test on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194178 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWork around an MSVC 2013 miscompile with the Redeclarable class. Fixes PR16606
Aaron Ballman [Wed, 6 Nov 2013 22:39:46 +0000 (22:39 +0000)]
Work around an MSVC 2013 miscompile with the Redeclarable class.  Fixes PR16606

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194176 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate \param in ToolInvocation() corresponding to r194164. [-Wdocumentation]
NAKAMURA Takumi [Wed, 6 Nov 2013 22:37:12 +0000 (22:37 +0000)]
Update \param in ToolInvocation() corresponding to r194164. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194175 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: Hide ignored flags
Alp Toker [Wed, 6 Nov 2013 22:36:09 +0000 (22:36 +0000)]
clang-cl: Hide ignored flags

We don't want to them to appear in the help text for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194174 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThis patch modified ExeBasename as clang-cl.exe to match the preceding comment.
Yaron Keren [Wed, 6 Nov 2013 21:57:50 +0000 (21:57 +0000)]
This patch modified ExeBasename as clang-cl.exe to match the preceding comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194170 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[build] Update runtime library and tests to work with relocatable SDKs on OS X 10.9.
Daniel Dunbar [Wed, 6 Nov 2013 21:44:54 +0000 (21:44 +0000)]
[build] Update runtime library and tests to work with relocatable SDKs on OS X 10.9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194168 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoclang-cl: Add /FS as an ignored flag
Alp Toker [Wed, 6 Nov 2013 21:01:23 +0000 (21:01 +0000)]
clang-cl: Add /FS as an ignored flag

CMake-generated Makefiles include this cl flag which can be safely ignored
until we get PDB server support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194165 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIntroduce ClangTool::buildASTs, and buildASTFromCode.
Peter Collingbourne [Wed, 6 Nov 2013 20:12:45 +0000 (20:12 +0000)]
Introduce ClangTool::buildASTs, and buildASTFromCode.

These allow clients to retrieve persistent AST objects (ASTUnits) which
can be used in an ad-hoc manner after parsing.

To accommodate this change, the code for processing a CompilerInvocation
using a FrontendAction has been factored out to FrontendActionFactory, and
a new base class, ToolAction, has been introduced, allowing the tool to do
arbitrary things with each CompilerInvocation.  This change was necessary
because ASTUnit does not use the FrontendAction interface directly.

This change also causes the FileManager in ClangTool to use shared ownership.
This will become necessary because ASTUnit takes shared ownership of
FileManager (ClangTool's FileManager is currently unused by ASTUnit; this
is a FIXME).  As shown in the tests, any client of ToolInvocation will
need to be modified to use shared ownership for FileManager.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194164 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix diagnostic goof in r194161.
Richard Smith [Wed, 6 Nov 2013 19:43:09 +0000 (19:43 +0000)]
Fix diagnostic goof in r194161.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194162 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a limit to the length of a sequence of 'operator->' functions we will
Richard Smith [Wed, 6 Nov 2013 19:31:51 +0000 (19:31 +0000)]
Add a limit to the length of a sequence of 'operator->' functions we will
follow when building a class member access expression. Based on a patch by
Rahul Jain!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194161 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the -cxx-abi microsoft -mconstructor-aliases combination.
Rafael Espindola [Wed, 6 Nov 2013 19:18:55 +0000 (19:18 +0000)]
Fix the -cxx-abi microsoft -mconstructor-aliases combination.

On the microsoft ABI clang is producing one weak_odr and one linkonce_odr
destructor, which is reasonable since only one is required.

The fix is simply to move the assert past the special case treatment of
linkonce_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194158 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThread safety analysis: minor bugfix to smart pointer handling, and expanded
DeLesley Hutchins [Wed, 6 Nov 2013 18:40:01 +0000 (18:40 +0000)]
Thread safety analysis: minor bugfix to smart pointer handling, and expanded
test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194157 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSilencing some MSVC warnings about not all control paths returning a value when they...
Aaron Ballman [Wed, 6 Nov 2013 18:15:02 +0000 (18:15 +0000)]
Silencing some MSVC warnings about not all control paths returning a value when they actually do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194156 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[libclang] Some changes on the linker options for libclang on a CMake build.
Argyrios Kyrtzidis [Wed, 6 Nov 2013 08:37:50 +0000 (08:37 +0000)]
[libclang] Some changes on the linker options for libclang on a CMake build.

- Use the 'libclang.exports' file.
- Pass -Wl,-current_version
- Set install name to "@rpath"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194134 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoft
Timur Iskhodzhanov [Wed, 6 Nov 2013 06:24:31 +0000 (06:24 +0000)]
Fix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194132 91177308-0d34-0410-b5e6-96231b3b80d8