]> granicus.if.org Git - clang/log
clang
11 years agoclang-format: Fix indenting corner case with comment and else.
Daniel Jasper [Wed, 30 Oct 2013 14:04:10 +0000 (14:04 +0000)]
clang-format: Fix indenting corner case with comment and else.

Before:
  if (a) {
    f();
  }
      // or else ..
      else {
    g();
  }

After:
  if (a) {
    f();
  }
  // or else ..
  else {
    g();
  }

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

11 years agoclang-format: Fix whitespaces in include directives.
Daniel Jasper [Wed, 30 Oct 2013 13:54:53 +0000 (13:54 +0000)]
clang-format: Fix whitespaces in include directives.

Before (clang-format wouldn't change):
  #include  "a.h"
  #include<a>

After:
  #include "a.h"
  #include <a>

This fixes llvm.org/PR16151.

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

11 years agoMake thunk this/return adjustment ABI-specific. Also, fix the return adjustment when...
Timur Iskhodzhanov [Wed, 30 Oct 2013 11:55:43 +0000 (11:55 +0000)]
Make thunk this/return adjustment ABI-specific. Also, fix the return adjustment when using -cxx-abi microsoft

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

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

11 years agoclang-format: fix for \r\r\n produced in multiline block comments
Daniel Jasper [Wed, 30 Oct 2013 07:36:40 +0000 (07:36 +0000)]
clang-format: fix for \r\r\n produced in multiline block comments

Patch by Christopher Olsen. Thank you!

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

11 years ago[mips] Delete unused functions.
Akira Hatanaka [Wed, 30 Oct 2013 02:38:17 +0000 (02:38 +0000)]
[mips] Delete unused functions.

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

11 years agoPR17731: When determining whether a tag and a non-tag were declared in the same
Richard Smith [Wed, 30 Oct 2013 01:02:04 +0000 (01:02 +0000)]
PR17731: When determining whether a tag and a non-tag were declared in the same
scope, be careful about function-scope declarations (which are not declared in
their semantic context).

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

11 years agoMinor efficiency refactor related to 193661. No functional change.
Warren Hunt [Wed, 30 Oct 2013 00:14:55 +0000 (00:14 +0000)]
Minor efficiency refactor related to 193661.  No functional change.

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

11 years agoActivating latent test case for r193661.
Warren Hunt [Wed, 30 Oct 2013 00:08:34 +0000 (00:08 +0000)]
Activating latent test case for r193661.

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

11 years agoFixing code gen to handle microsoft layouts for which size % alignment
Warren Hunt [Tue, 29 Oct 2013 23:49:26 +0000 (23:49 +0000)]
Fixing code gen to handle microsoft layouts for which size % alignment
!= 0

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

11 years agoChanged tests_typestate to test_typestate for consistency.
Chris Wailes [Tue, 29 Oct 2013 20:28:41 +0000 (20:28 +0000)]
Changed tests_typestate to test_typestate for consistency.

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

11 years agoAdd -lm to sanitizer link arguments.
Evgeniy Stepanov [Tue, 29 Oct 2013 19:48:47 +0000 (19:48 +0000)]
Add -lm to sanitizer link arguments.

We'll need to intercept a few function in libm.

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

11 years agoAdd support for the separate version of /FI.
Rafael Espindola [Tue, 29 Oct 2013 19:42:01 +0000 (19:42 +0000)]
Add support for the separate version of /FI.

Patch by Jeff Muizelaar.

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

11 years ago[mips] Align the stack to 16-bytes for -mfp64.
Akira Hatanaka [Tue, 29 Oct 2013 19:00:35 +0000 (19:00 +0000)]
[mips] Align the stack to 16-bytes for -mfp64.

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

11 years ago[mips] Use the distance between the current argument's starting address and
Akira Hatanaka [Tue, 29 Oct 2013 18:41:15 +0000 (18:41 +0000)]
[mips] Use the distance between the current argument's starting address and
the previous argument's ending address to compute the type of the padding
argument.

No intended functionality change.

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

11 years ago[mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
Akira Hatanaka [Tue, 29 Oct 2013 18:30:33 +0000 (18:30 +0000)]
[mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
at the end of handleTargetFeatures.

No intended functionality change.

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

11 years agoR600: Add Sea Islands GPUs
Tom Stellard [Tue, 29 Oct 2013 16:38:29 +0000 (16:38 +0000)]
R600: Add Sea Islands GPUs

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

11 years agoclang-format: Option to control spacing in template argument lists.
Daniel Jasper [Tue, 29 Oct 2013 14:52:02 +0000 (14:52 +0000)]
clang-format: Option to control spacing in template argument lists.

Same as SpacesInParentheses, this option allows adding a space inside
the '<' and '>' of a template parameter list.

Patch by Christopher Olsen.

This fixes llvm.org/PR17301.

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

11 years agoResubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."
Samuel Benzaquen [Tue, 29 Oct 2013 14:37:15 +0000 (14:37 +0000)]
Resubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."

Summary: This resubmits r193100, plus a fix for a breakage with MSVC.

Reviewers: klimek, rnk

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D2005

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

11 years agoFix an assertion when handling a custom case of virtual inheritance; also reduce...
Timur Iskhodzhanov [Tue, 29 Oct 2013 14:13:45 +0000 (14:13 +0000)]
Fix an assertion when handling a custom case of virtual inheritance; also reduce code duplication

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

11 years agoAdd a missing lit-test expectation (forgotten to write initially?)
Timur Iskhodzhanov [Tue, 29 Oct 2013 13:29:32 +0000 (13:29 +0000)]
Add a missing lit-test expectation (forgotten to write initially?)

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

11 years agoUse LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows...
Sylvestre Ledru [Tue, 29 Oct 2013 13:01:41 +0000 (13:01 +0000)]
Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb)

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

11 years agoARM: fix AST for __builtin_arm_strex call
Tim Northover [Tue, 29 Oct 2013 12:32:58 +0000 (12:32 +0000)]
ARM: fix AST for __builtin_arm_strex call

The AST was constructed so that this builtin returned the default BoolTy and
since I'd opted for custom SemaChecking, I should have set it properly at that
point.

This caused an assertion failure when the types didn't match up with what we
generated. This makes it return an IntTy, which is as good as anything.

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

11 years agoclang-format: Fix overloaded operator for global-scoped conversions.
Daniel Jasper [Tue, 29 Oct 2013 12:24:23 +0000 (12:24 +0000)]
clang-format: Fix overloaded operator for global-scoped conversions.

Before:
  operator::A();

After:
  operator ::A();

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

11 years agoTeach the driver to not try to use 'lib32' multilib spellings on ARM
Chandler Carruth [Tue, 29 Oct 2013 10:27:30 +0000 (10:27 +0000)]
Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

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

11 years agoARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Bernard Ogden [Tue, 29 Oct 2013 09:47:51 +0000 (09:47 +0000)]
ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang

Allow users to disable or enable CRC subtarget feature.

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

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

11 years agoDoh, got this turned around. This is in fact the consistent ordering.
Chandler Carruth [Tue, 29 Oct 2013 08:57:33 +0000 (08:57 +0000)]
Doh, got this turned around. This is in fact the consistent ordering.

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

11 years agoClean up the deeply misleading name of the "MultiLibSuffix". This is
Chandler Carruth [Tue, 29 Oct 2013 08:53:03 +0000 (08:53 +0000)]
Clean up the deeply misleading name of the "MultiLibSuffix". This is
actually a MIPS-only hack to shim in random ABI directory suffixes in
numerous places throughout the toolchain's path search. It shouldn't
appear to be anything more general or useful.

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

11 years agoUse Rewriter::overwriteChangedFiles() directly
Alp Toker [Tue, 29 Oct 2013 08:32:41 +0000 (08:32 +0000)]
Use Rewriter::overwriteChangedFiles() directly

This replaces the custom code in RefactoringTool::saveRewrittenFiles() which
lacked atomic file saving and error diagnostics, resolving an old FIXME from
r157331.

Landing this time with the proper return code, plus a very unhelpful comment
cleared up.

Rubber-stamped by Manuel Klimek.

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

11 years agoRevert "Use Rewriter::overwriteChangedFiles() directly"
Alp Toker [Tue, 29 Oct 2013 07:56:03 +0000 (07:56 +0000)]
Revert "Use Rewriter::overwriteChangedFiles() directly"

This wasn't ready for prime time yet, seems to break tools-extra.

This reverts commit r193590.

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

11 years agoRemove obsolete RewriteBuffer comment
Alp Toker [Tue, 29 Oct 2013 07:47:57 +0000 (07:47 +0000)]
Remove obsolete RewriteBuffer comment

The string buffer in question was replaced with RewriteRope in r43884
back in 2007.

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

11 years agoUse Rewriter::overwriteChangedFiles() directly
Alp Toker [Tue, 29 Oct 2013 07:47:49 +0000 (07:47 +0000)]
Use Rewriter::overwriteChangedFiles() directly

The old code in RefactoringTool::saveRewrittenFiles() lacked
atomic moves and diagnostics and had FIXME to this effect.

Rubber-stamped by Manuel Klimek.

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

11 years agoAdd missing attributes [[gnu::no_sanitize_address]] and
Nick Lewycky [Tue, 29 Oct 2013 03:54:41 +0000 (03:54 +0000)]
Add missing attributes [[gnu::no_sanitize_address]] and
[[gnu::no_address_safety_analysis]].

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

11 years agoTreat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
Nick Lewycky [Tue, 29 Oct 2013 03:33:57 +0000 (03:33 +0000)]
Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
the difference.

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

11 years agoFix "existant" typos
Alp Toker [Tue, 29 Oct 2013 02:34:44 +0000 (02:34 +0000)]
Fix "existant" typos

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

11 years agoCleanup comments and braces. No functionality changed, just trying to
Chandler Carruth [Tue, 29 Oct 2013 02:27:56 +0000 (02:27 +0000)]
Cleanup comments and braces. No functionality changed, just trying to
record what is *actually* going on here as the comments existing in the
code are confusing at best, and in places outright misleading.

The API is even more misleading. Yay.

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

11 years agoSwitch %clang -cc1 tests to %clang_cc1
Alp Toker [Mon, 28 Oct 2013 23:47:09 +0000 (23:47 +0000)]
Switch %clang -cc1 tests to %clang_cc1

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

11 years agoRevert "Support cross linking to arm on ubuntu."
Rafael Espindola [Mon, 28 Oct 2013 23:14:34 +0000 (23:14 +0000)]
Revert "Support cross linking to arm on ubuntu."

This reverts commit r193528 (and fixes).

It broke Chandler's setup.

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

11 years agoAllow a new syntax in a module requires-declaration:
Richard Smith [Mon, 28 Oct 2013 22:18:19 +0000 (22:18 +0000)]
Allow a new syntax in a module requires-declaration:

  requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

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

11 years agoFix a parser crash when there are #pragmas in a context which requires a single
Richard Smith [Mon, 28 Oct 2013 22:04:30 +0000 (22:04 +0000)]
Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!

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

11 years agoMore windows path handling.
Rafael Espindola [Mon, 28 Oct 2013 19:40:25 +0000 (19:40 +0000)]
More windows path handling.

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

11 years agoRelax test to pass with windows paths.
Rafael Espindola [Mon, 28 Oct 2013 19:19:29 +0000 (19:19 +0000)]
Relax test to pass with windows paths.

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

11 years agoSupport cross linking to arm on ubuntu.
Rafael Espindola [Mon, 28 Oct 2013 18:52:30 +0000 (18:52 +0000)]
Support cross linking to arm on ubuntu.

With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

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

11 years ago[libsanitizer] configure+make: install include/sanitizer into Clang
Alexander Potapenko [Mon, 28 Oct 2013 08:21:35 +0000 (08:21 +0000)]
[libsanitizer] configure+make: install include/sanitizer into Clang

When building Clang with compiler-rt, copy the contents of compiler-rt/include/sanitizer into lib/clang/3.4/include/sanitizer

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

11 years agoStaticAnalyzer/Checkers/DynamicTypePropagation.cpp: Fix in comments. 80-col and an...
NAKAMURA Takumi [Mon, 28 Oct 2013 04:14:33 +0000 (04:14 +0000)]
StaticAnalyzer/Checkers/DynamicTypePropagation.cpp: Fix in comments. 80-col and an utf8 char.

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

11 years agoFix typo in test's REQUIRES line
Alp Toker [Sun, 27 Oct 2013 19:03:12 +0000 (19:03 +0000)]
Fix typo in test's REQUIRES line

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

11 years agoDefine [U]LLONG_{MIN,MAX} for C++11, add tests.
JF Bastien [Sun, 27 Oct 2013 19:00:49 +0000 (19:00 +0000)]
Define [U]LLONG_{MIN,MAX} for C++11, add tests.

Add tests for limits.h, not just [U]LLONG_{MIN,MAX}.

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

11 years agoFix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr definition...
Timur Iskhodzhanov [Sun, 27 Oct 2013 17:10:27 +0000 (17:10 +0000)]
Fix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr definition and declaration

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

11 years agoFix option typo.
Rafael Espindola [Sun, 27 Oct 2013 14:46:16 +0000 (14:46 +0000)]
Fix option typo.

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

11 years agoFix option spelling.
Rafael Espindola [Sun, 27 Oct 2013 14:11:19 +0000 (14:11 +0000)]
Fix option spelling.

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

11 years agoUse -target instead of triple and use FileCheck.
Rafael Espindola [Sun, 27 Oct 2013 13:59:51 +0000 (13:59 +0000)]
Use -target instead of triple and use FileCheck.

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

11 years agoAdd trunk revision number on the online HTML docs.
Bill Wendling [Sun, 27 Oct 2013 05:00:50 +0000 (05:00 +0000)]
Add trunk revision number on the online HTML docs.

Patch by Vassil Vassilev.
PR13435

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

11 years agoRemove REQUIRES aarch64-registered-target from test
Alp Toker [Sat, 26 Oct 2013 21:42:32 +0000 (21:42 +0000)]
Remove REQUIRES aarch64-registered-target from test

Registered targets don't matter for Sema tests, this passes fine.

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

11 years agoCheck IR and don't use temporary files.
Rafael Espindola [Sat, 26 Oct 2013 20:55:05 +0000 (20:55 +0000)]
Check IR and don't use temporary files.

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

11 years agoclang-format: Fix ObjC method exprs with variadic parameters.
Daniel Jasper [Sat, 26 Oct 2013 17:00:22 +0000 (17:00 +0000)]
clang-format: Fix ObjC method exprs with variadic parameters.

Before:
  _versionLabel.text = [
    NSString stringWithFormat:NSLocalizedString(@"version: %@", @"Label"),
    [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]
  ];

After:
  _versionLabel.text =
      [NSString stringWithFormat:NSLocalizedString(@"version: %@", @"Label"),
          [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]];

This fixed llvm.org/PR17695.

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

11 years agoFileCheckize
Alp Toker [Sat, 26 Oct 2013 15:43:55 +0000 (15:43 +0000)]
FileCheckize

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

11 years agoQuote wildcard in test's grep argument
Alp Toker [Sat, 26 Oct 2013 14:52:48 +0000 (14:52 +0000)]
Quote wildcard in test's grep argument

The * could otherwise cause shell pathname expansion.

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

11 years agoRemove unused diagnostic.
Benjamin Kramer [Sat, 26 Oct 2013 10:12:33 +0000 (10:12 +0000)]
Remove unused diagnostic.

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

11 years agoSema: Emit a nicer diagnostic when IndirectFieldDecls show up inappropriately in...
David Majnemer [Sat, 26 Oct 2013 06:12:44 +0000 (06:12 +0000)]
Sema: Emit a nicer diagnostic when IndirectFieldDecls show up inappropriately in non-type template arguments

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

11 years agoSema: Correctly build pointer-to-member arguments from a template argument with an...
David Majnemer [Sat, 26 Oct 2013 05:02:13 +0000 (05:02 +0000)]
Sema: Correctly build pointer-to-member arguments from a template argument with an IndirectFieldDecl

We only considered FieldDecl and CXXMethodDecl as appropriate which
would cause us to believe the IndirectFieldDecl corresponded to an
argument of it's field type instead of a pointer-to-member type.

This fixes PR17696.

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

11 years agoclang/test/CodeGenCXX/debug-info-namespace.cpp: Suppress this also on msys, for now...
NAKAMURA Takumi [Sat, 26 Oct 2013 02:04:06 +0000 (02:04 +0000)]
clang/test/CodeGenCXX/debug-info-namespace.cpp: Suppress this also on msys, for now since r193116.

Clang confuses among dosish paths. In this case, "Input/foo.cpp" and "Input\foo.cpp" cannot be unified.

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

11 years ago[analyzer] Don't emit an "Assuming x is <OP> y" if it's not a comparison op.
Jordan Rose [Sat, 26 Oct 2013 01:16:26 +0000 (01:16 +0000)]
[analyzer] Don't emit an "Assuming x is <OP> y" if it's not a comparison op.

We could certainly be more precise in many of our diagnostics, but before we
were printing "Assuming x is && y", which is just ridiculous.

<rdar://problem/15167979>

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

11 years agoObjectiveC arc. Warn when an implicitly 'strong' property
Fariborz Jahanian [Sat, 26 Oct 2013 00:35:39 +0000 (00:35 +0000)]
ObjectiveC arc. Warn when an implicitly 'strong' property
is redeclared as 'weak' in class extension.
// rdar://15304886

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

11 years agoDocument that -fsanitize=function is Linux-only.
Peter Collingbourne [Sat, 26 Oct 2013 00:21:57 +0000 (00:21 +0000)]
Document that -fsanitize=function is Linux-only.

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

11 years agoSkip this test when using lit integrated shell
Alp Toker [Fri, 25 Oct 2013 22:30:07 +0000 (22:30 +0000)]
Skip this test when using lit integrated shell

It wasn't passing on UNIX with LIT_USE_INTERNAL_SHELL=1
due to cat globbing.

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

11 years agoMinor performance improvement to not do unnecessary work
Fariborz Jahanian [Fri, 25 Oct 2013 22:04:47 +0000 (22:04 +0000)]
Minor performance improvement to not do unnecessary work
in my last patch. // rdar://14989999

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

11 years agoObjectiveC: under -Wunused-property-ivar warn if property's
Fariborz Jahanian [Fri, 25 Oct 2013 21:44:50 +0000 (21:44 +0000)]
ObjectiveC: under -Wunused-property-ivar warn if property's
backing warning is not used in one of its accessor methods.
// rdar://14989999

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

11 years agoclang-format.py: Make formatting unnamed buffers work again (broke in r190691).
Nico Weber [Fri, 25 Oct 2013 20:06:20 +0000 (20:06 +0000)]
clang-format.py: Make formatting unnamed buffers work again (broke in r190691).

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

11 years agoDon't check for -L options that gcc doesn't use.
Rafael Espindola [Fri, 25 Oct 2013 19:44:29 +0000 (19:44 +0000)]
Don't check for -L options that gcc doesn't use.

GCC on fedora 18 ARM only uses 2 -L options. Clang prints two extra ones, but
we should not include them in the test as they are not required.

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

11 years agoI am about to change llvm::MemoryBuffer::getFile take take a Twine. Change
Rafael Espindola [Fri, 25 Oct 2013 19:00:49 +0000 (19:00 +0000)]
I am about to change llvm::MemoryBuffer::getFile take take a Twine. Change
clang first so that the build still works.

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

11 years agoJust detect a distro as being fedora or not.
Rafael Espindola [Fri, 25 Oct 2013 18:09:41 +0000 (18:09 +0000)]
Just detect a distro as being fedora or not.

We don't have any checks that depend on the version of fedora, so we can
simplify.

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

11 years agoMerge two adjacent ifs.
Rafael Espindola [Fri, 25 Oct 2013 17:06:04 +0000 (17:06 +0000)]
Merge two adjacent ifs.

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

11 years agoAdd -Wstring-plus-char, which warns when adding char literals to C strings.
Jordan Rose [Fri, 25 Oct 2013 16:52:00 +0000 (16:52 +0000)]
Add -Wstring-plus-char, which warns when adding char literals to C strings.

Specifically, this warns when a character literal is added (using '+') to a
variable with type 'char *' (or any other pointer to character type). Like
-Wstring-plus-int, there is a fix-it to change "foo + 'a'" to "&foo['a']"
iff the character literal is on the right side of the string.

Patch by Anders Rönnholm!

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

11 years agoUsed OwningPtr to clean up some memory management in Consumed.cpp.
Chris Wailes [Fri, 25 Oct 2013 15:33:28 +0000 (15:33 +0000)]
Used OwningPtr to clean up some memory management in Consumed.cpp.

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

11 years agoclang-format: Adapt line break penalties for LLVM style.
Daniel Jasper [Fri, 25 Oct 2013 14:29:37 +0000 (14:29 +0000)]
clang-format: Adapt line break penalties for LLVM style.

Specifically make clang-format less eager to break after the opening
parenthesis of a function call.

Before:
  aaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
  aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
                        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

Apparently that is preferable. This penalties are adapted
conservatively, we might have to increase them a little bit further.

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

11 years agoSema: Do not allow lambda expressions to appear inside of constant expressions
David Majnemer [Fri, 25 Oct 2013 09:12:52 +0000 (09:12 +0000)]
Sema: Do not allow lambda expressions to appear inside of constant expressions

We would previously not diagnose this which would lead to crashes (on
very strange code).

This fixes PR17675.

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

11 years agoRemove dead variables.
Benjamin Kramer [Fri, 25 Oct 2013 07:40:50 +0000 (07:40 +0000)]
Remove dead variables.

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

11 years agoConsider used attributes in hidden decls.
Rafael Espindola [Fri, 25 Oct 2013 01:28:12 +0000 (01:28 +0000)]
Consider used attributes in hidden decls.

Without this patch we would warn and fail to output the function in the test.

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

11 years agoSimplify and refactor the uninitialized field warning.
Richard Trieu [Fri, 25 Oct 2013 00:56:00 +0000 (00:56 +0000)]
Simplify and refactor the uninitialized field warning.

Change the uninitialized field warnings so that field initializers are checked
inside the constructor.  Previously, in class initializers were checked
separately.  Running one set of checks also simplifies the logic for preventing
duplicate warnings.  Added new checks to warn when an uninitialized field is
used in base class initialization.  Also fixed misspelling of uninitialized
and moved all code for this warning together.

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

11 years agoRefactor: Extract specializing the generic lambda call operator during conversion...
Faisal Vali [Thu, 24 Oct 2013 23:40:02 +0000 (23:40 +0000)]
Refactor: Extract specializing the generic lambda call operator during conversion to fptr deduction into its own function.

No functionality change.

All clang regression tests pass.

Thanks!

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

11 years agoRemove unused CodeGenOptions from CodeGenTypes.
Mark Lacey [Thu, 24 Oct 2013 22:08:55 +0000 (22:08 +0000)]
Remove unused CodeGenOptions from CodeGenTypes.

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

11 years agoAdd driver support for FP, SIMD and crypto defaults.
Bernard Ogden [Thu, 24 Oct 2013 18:32:51 +0000 (18:32 +0000)]
Add driver support for FP, SIMD and crypto defaults.

Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0

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

11 years agoClean up char/numeric comparisons in ARM getTargetDefines
Bernard Ogden [Thu, 24 Oct 2013 18:32:44 +0000 (18:32 +0000)]
Clean up char/numeric comparisons in ARM getTargetDefines

Change-Id: Ie07228411b68252adcd5cf80b27ccd2eb3b031d9

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

11 years agoSet appropriate FPU default for Linux on v8
Bernard Ogden [Thu, 24 Oct 2013 18:32:41 +0000 (18:32 +0000)]
Set appropriate FPU default for Linux on v8

Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb

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

11 years agoTeach clang driver about Cortex-A53 and Cortex-A57.
Bernard Ogden [Thu, 24 Oct 2013 18:32:36 +0000 (18:32 +0000)]
Teach clang driver about Cortex-A53 and Cortex-A57.

Adds some Cortex-A53 strings where they were missing before.
Cortex-A57 is entirely new to clang.

Doesn't touch code only used by Darwin, in consequence of which
one of the A53 lines has been removed.

Change-Id: I5edb58f6eae93947334787e26a8772c736de6483

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

11 years agoObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C
Fariborz Jahanian [Thu, 24 Oct 2013 17:40:28 +0000 (17:40 +0000)]
ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C
class metadata for certain deployment targets. // rdar://14802916

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

11 years agoRevert "Tooling/ReplacementsYaml.h: Prune Tooling's llvm::yaml::ScalarTraits<std...
Argyrios Kyrtzidis [Thu, 24 Oct 2013 15:49:10 +0000 (15:49 +0000)]
Revert "Tooling/ReplacementsYaml.h: Prune Tooling's llvm::yaml::ScalarTraits<std::string> corresponding to LLVM r193344."

This reverts commit r193350, because it addressed an llvm API change that has been reverted.

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

11 years agoclang-format: Properly reset nested AnnotatedLine structure.
Daniel Jasper [Thu, 24 Oct 2013 15:23:11 +0000 (15:23 +0000)]
clang-format: Properly reset nested AnnotatedLine structure.

This fixes llvm.org/PR17682.

Without this patch, the following code leads to invalid reads/writes:
  DEBUG({
    return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
           aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
  });
  #if a
  #else
  #endif

Because of the #if-#else structure, the code is formatted and annotated
twice and becauce of the nested block, the annotated lines form a
hierarchical structure. This structure was not properly reset between
runs.

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

11 years agoReplaced duplicate code with calls to forwardInfo.
Chris Wailes [Thu, 24 Oct 2013 14:28:17 +0000 (14:28 +0000)]
Replaced duplicate code with calls to forwardInfo.

Also made move constructor handling safer.

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

11 years agoTooling/ReplacementsYaml.h: Prune Tooling's llvm::yaml::ScalarTraits<std::string...
NAKAMURA Takumi [Thu, 24 Oct 2013 14:24:30 +0000 (14:24 +0000)]
Tooling/ReplacementsYaml.h: Prune Tooling's llvm::yaml::ScalarTraits<std::string> corresponding to LLVM r193344.

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

11 years agoclang-format: Be more conservative about column layout formatting.
Daniel Jasper [Thu, 24 Oct 2013 14:14:49 +0000 (14:14 +0000)]
clang-format: Be more conservative about column layout formatting.

Specifically, if a braced list has at least one nested braced list,
format it either all on one line or in one column (i.e. one item per
line).

This seems in general to be an improvement as the structure of nested
braced lists can make a tightly packed outer braced list hard to read.

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

11 years agoARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs
Tim Northover [Thu, 24 Oct 2013 10:48:50 +0000 (10:48 +0000)]
ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs

These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.

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

11 years agoclang-format: Cleanup array initializer and dict initializer formatting.
Daniel Jasper [Thu, 24 Oct 2013 10:31:50 +0000 (10:31 +0000)]
clang-format: Cleanup array initializer and dict initializer formatting.

Significant changes:
- Also recognize these literals with missing "@" for robustness.
- Reorganize tests.

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

11 years agoTeach Clang to accept and ignore -f[no-]implicit-templates.
Chandler Carruth [Thu, 24 Oct 2013 09:21:37 +0000 (09:21 +0000)]
Teach Clang to accept and ignore -f[no-]implicit-templates.

This GCC flag is useful when you want to control whether implicit
template instantiation occurs at the commandline level. Clang doesn't
currently support such controls, but technically *always* implicitly
instantiating (what Clang does, and what every other compiler still in
use does by default) is valid behavior even under
-fno-implicit-templates, it just may be slow and very wasteful. If
people really want this, we can try to implement it, but I don't have an
actual use.

This should help fix the build of libstdc++ with Clang, its build system
uses this flag.

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

11 years agoTeach Clang to recognize and ignore GCC's -fdiagnostics-show-location
Chandler Carruth [Thu, 24 Oct 2013 09:17:35 +0000 (09:17 +0000)]
Teach Clang to recognize and ignore GCC's -fdiagnostics-show-location
flag. We should probably wire at least some variants of this up to our
actual diagnostics engine, but I'm leaving that for someone else. This
fixes the builds of packages which hard code something here, at least
including libstdc++ itself.

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

11 years agoUse the same SourceManager for ModuleMaps and compilations.
Manuel Klimek [Thu, 24 Oct 2013 07:51:24 +0000 (07:51 +0000)]
Use the same SourceManager for ModuleMaps and compilations.

This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMap
search will find a module.map file (as the FileEntry exists in the
FileManager), but will be unable to get the content from the
SourceManager (as ModuleMap previously created its own SourceManager).

Two problems needed to be fixed which this patch exposed:

1. Storing the inferred module map
When writing out a module, the ASTWriter stores the names of the files
in the main source manager; when loading the AST again, the ASTReader
errs out if such a file is found missing, unless it is overridden.
Previously CompilerInstance's compileModule method would store the
inferred module map to a temporary file; the problem with this approach
is that now that the module map is handled by the main source manager,
the ASTWriter stores the name of the temporary module map as source to
the compilation; later, when the module is loaded, the temporary file
has already been deleted, which leads to a compilation error. This patch
changes the inferred module map to instead inject a virtual file into
the source manager. This both saves some disk IO, and works with how the
ASTWriter/ASTReader handle overridden source files.

2. Changing test input in test/Modules/Inputs/*
Now that the module map file is handled by the main source manager, the
VerifyDiagnosticConsumer will not ignore diagnostics created while
parsing the module map file. The module test test/Modules/renamed.m uses
-I test/Modules/Inputs and triggers recursive loading of all module maps
in test/Modules/Inputs, some of which had conflicting names, thus
leading errors while parsing the module maps. Those diagnostics already
occur on trunk, but before this patch they would not break the test, as
they were ignored by the VerifyDiagnosticConsumer. This patch thus
changes the module maps that have been recently introduced which broke
the invariant of compatible modules maps in test/Modules/Inputs.

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

11 years agoRemove dead recursive function.
Benjamin Kramer [Thu, 24 Oct 2013 07:39:30 +0000 (07:39 +0000)]
Remove dead recursive function.

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

11 years agoSupport GNU attributes in alias-declarations now that GCC has implemented them
Richard Smith [Thu, 24 Oct 2013 01:21:09 +0000 (01:21 +0000)]
Support GNU attributes in alias-declarations now that GCC has implemented them
and we know where they go.

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

11 years agoFix a test file option from -emit-llvm -o to -emit-llvm-only.
Faisal Vali [Thu, 24 Oct 2013 01:11:55 +0000 (01:11 +0000)]
Fix a test file option from -emit-llvm -o to -emit-llvm-only.

As requested by Rafael Espindola here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091556.html

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

11 years agoPR17666: Instead of allowing an initial identifier argument in any attribute
Richard Smith [Thu, 24 Oct 2013 01:07:54 +0000 (01:07 +0000)]
PR17666: Instead of allowing an initial identifier argument in any attribute
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.

I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.

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

11 years agoFix an instantiation bug with nested generic lambdas and conversion to fptrs.
Faisal Vali [Thu, 24 Oct 2013 01:05:22 +0000 (01:05 +0000)]
Fix an instantiation bug with nested generic lambdas and conversion to fptrs.

This patch fixes the typelocs of the conversion-operator and the conversion-operator-name and adds the parameters of the call operator to the FunctionProtoTypeLoc of the respective entities. Thus, when the template declarations (conversion operators) undergo deduction and instantiation/transformation/substitution - they add themselves to the local instantiation scope if needed.

This patch supports the following:

auto L = [](auto b) {
  return [](auto a) ->decltype(a) { return a; };
};
int (*fp)(int) = L(8);

Richard LGTM'd this patch: http://llvm-reviews.chandlerc.com/D1831

Thanks!

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