]> granicus.if.org Git - clang/log
clang
8 years agoThis patch adds doxygen comments for all the intrinsincs in the header file pmmintrin...
Ekaterina Romanova [Mon, 8 Feb 2016 22:35:09 +0000 (22:35 +0000)]
This patch adds doxygen comments for all the intrinsincs in the header file pmmintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document.

Differential Revision: http://reviews.llvm.org/D16913

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

8 years agoMake ParentMap work with explicit specializations of function templates.
Nico Weber [Mon, 8 Feb 2016 22:23:09 +0000 (22:23 +0000)]
Make ParentMap work with explicit specializations of function templates.

For an explicit specialization, we first build a FunctionDecl, and then
we call SubstDecl() on it to build a second FunctionDecl, which has the
first FunctionDecl as canonical decl.

The address of an explicit specialization of function template used to be the
canonical decl of the FunctionDecl.  This is different from all the other
DeduceTemplateArguments() calls in SemaOverload, and since the canonical decl
isn't visited by ParentMap while the redecl is, it also made ParentMap assert
when computing the parent of a address-of-explicit-specialization-fun-template.

To fix, remove the getCanonicalDecl() call.  No behavior difference for clang,
but it fixes an assert in ParentMap (which is e.g. used by libTooling).

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

8 years ago[Concepts] Remove the IsConcept bit and associated member functions from VarDecl
Nathan Wilson [Mon, 8 Feb 2016 22:02:50 +0000 (22:02 +0000)]
[Concepts] Remove the IsConcept bit and associated member functions from VarDecl
because the information is now stored in TemplateDecl.

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

8 years ago[Coverage] Fix crash when handling certain macro expansions
Vedant Kumar [Mon, 8 Feb 2016 19:25:45 +0000 (19:25 +0000)]
[Coverage] Fix crash when handling certain macro expansions

When handling 'if' statements, we crash if the condition and the consequent
branch are spanned by a single macro expansion.

The crash occurs because of a sanity 'reset' in popRegions(): if an expansion
exactly spans an entire region, we set MostRecentLocation to the start of the
expansion (its 'include location'). This ensures we don't handleFileExit()
ourselves out of the expansion before we're done processing all of the regions
within it. This is tested in test/CoverageMapping/macro-expressions.c.

This causes a problem when an expansion spans both the condition and the
consequent branch of an 'if' statement. MostRecentLocation is updated to the
start of the 'if' statement in popRegions(), so the file for the expansion
isn't exited by the time we're done handling the statement. We then crash with
'fatal: File exit not handled before popRegions'.

The fix for this is to detect these kinds of expansions, and conservatively
update MostRecentLocation to the end of expansion region containing the
conditional. I've added tests to make sure we don't have the same problem with
other kinds of statements.

rdar://problem/23630316

Differential Revision: http://reviews.llvm.org/D16934

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

8 years agoSimplify test cases
Xinliang David Li [Mon, 8 Feb 2016 19:14:14 +0000 (19:14 +0000)]
Simplify test cases

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

8 years agoRemove dead code.
Richard Smith [Mon, 8 Feb 2016 19:10:14 +0000 (19:10 +0000)]
Remove dead code.

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

8 years agoFix missing space (NFC)
Rong Xu [Mon, 8 Feb 2016 18:12:41 +0000 (18:12 +0000)]
Fix missing space (NFC)

Fixed the inconsistently placed : (missing space) introduced in in r259811.

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

8 years agoUse llvm::TempDIScope instead of manually deleting a temporary MDNode.
Adrian Prantl [Mon, 8 Feb 2016 17:03:28 +0000 (17:03 +0000)]
Use llvm::TempDIScope instead of manually deleting a temporary MDNode.

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

8 years agoRe-apply for the 2nd-time r259977 - [OpenMP] Reorganize code to allow specialized...
Samuel Antao [Mon, 8 Feb 2016 15:59:20 +0000 (15:59 +0000)]
Re-apply for the 2nd-time r259977 - [OpenMP] Reorganize code to allow specialized code generation for different devices.

This was reverted by r260036, but was not the cause of the problem in the buildbot.

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

8 years agoMove static functions returning UDTs outside of the extern "C" block. Silences an...
Aaron Ballman [Mon, 8 Feb 2016 15:52:13 +0000 (15:52 +0000)]
Move static functions returning UDTs outside of the extern "C" block. Silences an MSVC warning, and reduces the number of exported symbols.

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

8 years agoclang/test/OpenMP/parallel_private_codegen.cpp: Fix an expression.
NAKAMURA Takumi [Mon, 8 Feb 2016 14:04:28 +0000 (14:04 +0000)]
clang/test/OpenMP/parallel_private_codegen.cpp: Fix an expression.

  call x86_thiscallcc void @_ZN2SSC1ERi(

It matched to:

  <call> x86_this<callcc void @_ZN2SSC1ERi(>

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

8 years ago[OPENMP] Fix test incompatibility with arm buildbots
Alexey Bataev [Mon, 8 Feb 2016 13:47:46 +0000 (13:47 +0000)]
[OPENMP] Fix test incompatibility with arm buildbots

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

8 years ago[OPENMP] Fixed test incompat with MSVC
Alexey Bataev [Mon, 8 Feb 2016 13:02:00 +0000 (13:02 +0000)]
[OPENMP] Fixed test incompat with MSVC

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

8 years agoAVX512: Change builtin function name for scalar intrinsics. Add "mask" to function...
Igor Breger [Mon, 8 Feb 2016 12:36:48 +0000 (12:36 +0000)]
AVX512: Change builtin function name for scalar intrinsics. Add "mask" to function name to reflect the function behavior.

Differential Revision: http://reviews.llvm.org/D16957

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

8 years agoclang-format: Fix weird alignment when not aligning after brackets.
Daniel Jasper [Mon, 8 Feb 2016 09:52:54 +0000 (09:52 +0000)]
clang-format: Fix weird alignment when not aligning after brackets.

Before:
  bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
      ccccccc(aaaaaaaaaaaaaaaaa, //
           b));

After:
  bbbbbbbbbbbb(aaaaaaaaaaaaaaaaaaaaaaaa, //
      ccccccc(aaaaaaaaaaaaaaaaa, //
        b));

This fixes llvm.org/PR24905.

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

8 years ago[OPENMP 4.5] Ccapture/codegen of private non-static data members.
Alexey Bataev [Mon, 8 Feb 2016 09:29:13 +0000 (09:29 +0000)]
[OPENMP 4.5] Ccapture/codegen of private non-static data members.
OpenMP 4.5 introduces privatization of non-static data members of current class in non-static member functions.
To correctly handle such kind of privatization a new (pseudo)declaration VarDecl-based node is added. It allows to reuse an existing code for capturing variables in Lambdas/Block/Captured blocks of code for correct privatization and codegen.

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

8 years ago[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p1 by
Nathan Wilson [Mon, 8 Feb 2016 05:34:00 +0000 (05:34 +0000)]
[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p1 by
diagnosing when 'concept' is specified on a function or template
specialization.

Since a concept can only be applied to a function or variable template,
the concept bit is stored in TemplateDecl as a PointerIntPair.

Reviewers: rsmith, faisalv, aaron.ballman, hubert.reinterpretcast

Differential Revision: http://reviews.llvm.org/D13357

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

8 years ago[analyzer] Avoid crash when attempting to evaluate binary operation on LazyCompoundVal.
Devin Coughlin [Mon, 8 Feb 2016 00:28:24 +0000 (00:28 +0000)]
[analyzer] Avoid crash when attempting to evaluate binary operation on LazyCompoundVal.

Instead, return UnknownValue if either operand is a nonloc::LazyCompoundVal. This is a
spot fix for PR 24951.

rdar://problem/23682244

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

8 years ago[MS ABI] Don't emit RTTI descriptors for dllimport vtables
David Majnemer [Sun, 7 Feb 2016 22:42:05 +0000 (22:42 +0000)]
[MS ABI] Don't emit RTTI descriptors for dllimport vtables

A dllimport'd vtable always points one past the RTTI data, this means
that the initializer will never end up referencing the data.  Our
emission is a harmless waste.

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

8 years agoclang-format: [JS] Don't count shortened object literals as blocks.
Daniel Jasper [Sun, 7 Feb 2016 22:17:13 +0000 (22:17 +0000)]
clang-format: [JS] Don't count shortened object literals as blocks.

Before:
  f({a},
    () => {
      g();  //
    });

After:
  f({a}, () => {
    g();  //
  });

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

8 years agoMake nozlibcompress.c pass and reenable it.
Nico Weber [Sun, 7 Feb 2016 21:32:17 +0000 (21:32 +0000)]
Make nozlibcompress.c pass and reenable it.

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

8 years agoclang-format: [JS] Support @see annotations in JSDoc comments in Google
Daniel Jasper [Sun, 7 Feb 2016 21:22:16 +0000 (21:22 +0000)]
clang-format: [JS] Support @see annotations in JSDoc comments in Google
style.

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

8 years agoDisable failing nozlibcompress.c
Nico Weber [Sun, 7 Feb 2016 21:00:17 +0000 (21:00 +0000)]
Disable failing nozlibcompress.c

This test hasn't been running after it was added until r259976 made
"REQUIRES: nozlib" work, and now that the test runs it fails.

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

8 years ago[Frontend] Make the memory management of FrontendAction pointers explicit by using...
Argyrios Kyrtzidis [Sun, 7 Feb 2016 19:28:36 +0000 (19:28 +0000)]
[Frontend] Make the memory management of FrontendAction pointers explicit by using unique_ptr.

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

8 years ago[libclang] Add missing CINDEX_LINKAGE from a function.
Argyrios Kyrtzidis [Sun, 7 Feb 2016 18:21:28 +0000 (18:21 +0000)]
[libclang] Add missing CINDEX_LINKAGE from a function.

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

8 years agoMake -fno-math-builtin a cc1 option
Matthew Simpson [Sun, 7 Feb 2016 17:14:03 +0000 (17:14 +0000)]
Make -fno-math-builtin a cc1 option

This patch makes -fno-math-builtin a frontend only option instead of a driver
option. The appropriate test case was committed in r186899 when the flag was
introduced. This should fix PR26317.

Contributed-by: Frank Herrmann <fgh@4gh.tv>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260044 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[analyzer] Invalidate destination of std::copy() and std::copy_backward().
Devin Coughlin [Sun, 7 Feb 2016 16:55:44 +0000 (16:55 +0000)]
[analyzer] Invalidate destination of std::copy() and std::copy_backward().

Now that the libcpp implementations of these methods has a branch that doesn't call
memmove(), the analyzer needs to invalidate the destination for these methods explicitly.

rdar://problem/23575656

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

8 years agoRevert "Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code generat...
Renato Golin [Sun, 7 Feb 2016 15:43:09 +0000 (15:43 +0000)]
Revert "Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code generation for different devices."

This reverts commit r259985, as it still fails one buildbot.

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

8 years agoUse CodeGenModule::addReplacement() instead of directly accessing Replacements[].
Yaron Keren [Sun, 7 Feb 2016 12:44:35 +0000 (12:44 +0000)]
Use CodeGenModule::addReplacement() instead of directly accessing Replacements[].
This helps when trying to debug who inserted into Replacements.

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

8 years agoFix test case problem(caused by clang-format
Xinliang David Li [Sun, 7 Feb 2016 07:13:18 +0000 (07:13 +0000)]
Fix test case problem(caused by clang-format

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

8 years ago[PGO] add profile/coverage test cases for defaulted ctor/ctors
Xinliang David Li [Sun, 7 Feb 2016 06:57:29 +0000 (06:57 +0000)]
[PGO] add profile/coverage test cases for defaulted ctor/ctors

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

8 years agoFix typo in comment. NFC
Craig Topper [Sun, 7 Feb 2016 06:39:23 +0000 (06:39 +0000)]
Fix typo in comment. NFC

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

8 years agoDriver: adjust linker invocation for GNUTools
Saleem Abdulrasool [Sun, 7 Feb 2016 06:03:38 +0000 (06:03 +0000)]
Driver: adjust linker invocation for GNUTools

Adjust the driver to invoke the linker more similar to gcc.  -dynamic-linker is
only passed if -static and -shared are not part of the compiler (driver)
invocation.  Replicate the passing of -export-rdynamic as per the GCC link spec:

  %{!static: %{rdynamic:-export-dynamic} %{!shared:-dynamic-linker ...}}

This behaviour is consistent across all the targets that are supported, so no
need to conditionalise it on the target.

Resolves PR24245.

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

8 years agoSema: handle typo correction on ARC'ed ivar
Saleem Abdulrasool [Sun, 7 Feb 2016 02:30:59 +0000 (02:30 +0000)]
Sema: handle typo correction on ARC'ed ivar

The ivar ref would be transformed by the Typo Correction TreeTransform, but not
be owned, resulting in the source location being invalid.  This would eventually
lead to an assertion in findCapturingExpr.  Prevent this assertion from
triggering.

Resolves PR25113.

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

8 years agoSema: handle typo correction with ARC'ed objc properties
Saleem Abdulrasool [Sun, 7 Feb 2016 02:30:55 +0000 (02:30 +0000)]
Sema: handle typo correction with ARC'ed objc properties

We would previously assert in findCapturingExpr when performing a typo
correction resulting in an assignment of an ObjC property with a strong lifetype
specifier due to the expression not being rooted in the file (invalid SLoc)
during the retain cycle check on the typo-corrected expression.  Handle the
expression type appropriately during the TreeTransform to ensure that we have a
source location associated with the expression.

Fixes PR26486.

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

8 years agoIndex: provide adjustment thunk information for C++ manglings
Saleem Abdulrasool [Sat, 6 Feb 2016 22:36:34 +0000 (22:36 +0000)]
Index: provide adjustment thunk information for C++ manglings

Add support for exposing the adjustment thunk for virtual methods as
appropriate.

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

8 years agoAdd a missing call to MDNode::deleteTemporary().
Adrian Prantl [Sat, 6 Feb 2016 18:39:34 +0000 (18:39 +0000)]
Add a missing call to MDNode::deleteTemporary().
Follow-up to r259975. Kudos to the ASAN bots!

<rdar://problem/24493203>

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

8 years ago[analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc.
Devin Coughlin [Sat, 6 Feb 2016 17:17:32 +0000 (17:17 +0000)]
[analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc.

It is common for the ivars for read-only assign properties to always be stored retained,
so don't warn for a release in dealloc for the ivar backing these properties.

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

8 years agoRe-apply r259977 - [OpenMP] Reorganize code to allow specialized code generation...
Samuel Antao [Sat, 6 Feb 2016 06:52:48 +0000 (06:52 +0000)]
Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code generation for different devices.

This was reverted due to a failure in a buildbot, but it turned out the failure was unrelated.

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

8 years agoRevert r259977 - [OpenMP] Reorganize code to allow specialized code generation for...
Samuel Antao [Sat, 6 Feb 2016 06:22:46 +0000 (06:22 +0000)]
Revert r259977 - [OpenMP] Reorganize code to allow specialized code generation for different devices.

It triggered some problem in the configuration related with zlib and exposed in the driver.

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

8 years ago[OpenMP] Reorganize code to allow specialized code generation for different devices.
Samuel Antao [Sat, 6 Feb 2016 02:12:34 +0000 (02:12 +0000)]
[OpenMP] Reorganize code to allow specialized code generation for different devices.

Summary:
Different devices may in some cases require different code generation schemes in order to implement OpenMP. This is required not only for performance reasons, but also because it may not be possible to have the current (default) implementation working for these devices. E.g. GPU's cannot implement the same scheme a target such as powerpc or x86b would use, in the sense that it does not have the ability to fork threads, instead all the threads are always executing and need to be managed by the implementation.

This patch proposes a reorganization of the code in the OpenMP code generation to pave the way to have specialized implementation of OpenMP support. More than a "real" patch this is more a request for comments in order to understand if what is proposed is acceptable or if there are better/easier ways to do it.

In this patch part of the common OpenMP codegen infrastructure is moved to a new file under a new namespace (CGOpenMPCommon) so it can be shared between the default implementation and the specialized one. When CGOpenMPRuntime is created, an attempt to select a specialized implementation is done.

In the patch a specialization for nvptx targets is done which currently checks if the target is an OpenMP device and trap if it is not.

Let me know comments suggestions you may have.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: Hahnfeld, cfe-commits, fraggamuffin, caomhin, jholewinski

Differential Revision: http://reviews.llvm.org/D16784

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

8 years ago[modules] Compress files embedded into a .pcm file, to reduce the disk usage of ...
Richard Smith [Sat, 6 Feb 2016 02:06:43 +0000 (02:06 +0000)]
[modules] Compress files embedded into a .pcm file, to reduce the disk usage of -fembed-all-files mode.

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

8 years agoFix a crash when emitting dbeug info for forward-declared scoped enums.
Adrian Prantl [Sat, 6 Feb 2016 01:59:09 +0000 (01:59 +0000)]
Fix a crash when emitting dbeug info for forward-declared scoped enums.
It is possible for enums to be created as part of their own
declcontext. We need to cache a placeholder to avoid the type being
created twice before hitting the cache.

<rdar://problem/24493203>

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

8 years ago[www] Update analyzer release notes to correct the checker-278 build date.
Devin Coughlin [Sat, 6 Feb 2016 00:59:14 +0000 (00:59 +0000)]
[www] Update analyzer release notes to correct the checker-278 build date.

This is not the future.

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

8 years ago[www] Update analyzer website for checker-278.
Devin Coughlin [Sat, 6 Feb 2016 00:53:33 +0000 (00:53 +0000)]
[www] Update analyzer website for checker-278.

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

8 years ago[PGO] Test case update
Xinliang David Li [Fri, 5 Feb 2016 23:36:08 +0000 (23:36 +0000)]
[PGO] Test case update

  Temporarily relax check in test to avoid
  breakage for format change in LLVM side. Once that is
  done, the test case will be retightened.

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

8 years agoEliminate an unnecessary enum, use the LLVM version. NFC
Paul Robinson [Fri, 5 Feb 2016 23:23:25 +0000 (23:23 +0000)]
Eliminate an unnecessary enum, use the LLVM version. NFC

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

8 years agoExempt char array initializers from -Wconstant-converion.
Richard Trieu [Fri, 5 Feb 2016 23:02:38 +0000 (23:02 +0000)]
Exempt char array initializers from -Wconstant-converion.

Sometimes, char arrays are used as bit storage, with no difference made between
signed and unsigned char.  Thus, it is reasonable to use 0 to 255 instead of
-128 to 127 and not trigger this warning.

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

8 years ago[CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers.
Artem Belevich [Fri, 5 Feb 2016 22:54:05 +0000 (22:54 +0000)]
[CUDA] Bug 26497 : Remove wrappers for variants provided by CUDA headers.

... and pull global-scope ones into std namespace with using-declaration.

Differential Revision: http://reviews.llvm.org/D16932

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

8 years agoMove DebugInfoKind enum from Driver to Basic. NFC
Paul Robinson [Fri, 5 Feb 2016 21:54:42 +0000 (21:54 +0000)]
Move DebugInfoKind enum from Driver to Basic. NFC

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

8 years agoAdd an ARC autoreleased-return-value caller marker on i386.
John McCall [Fri, 5 Feb 2016 21:37:38 +0000 (21:37 +0000)]
Add an ARC autoreleased-return-value caller marker on i386.

rdar://24531556

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

8 years ago[SystemZ] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros
Ulrich Weigand [Fri, 5 Feb 2016 21:34:28 +0000 (21:34 +0000)]
[SystemZ] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros

Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_[1248] macros on SystemZ.

This fixes a miscompile of GCC C++11 standard library headers
due to use of those macros in an ABI-changing manner.

See e.g. /usr/include/c++/4.8.5/ext/concurrence.h:

  // Compile time constant that indicates prefered locking policy in
  // the current configuration.
  static const _Lock_policy __default_lock_policy =
#ifdef __GTHREADS
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \
     && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4))
  _S_atomic;
#else
  _S_mutex;
#endif
#else
  _S_single;
#endif

A different choice of __default_lock_policy causes different
sizes of several of the C++11 data structures, which are then
incompatible when inlined in clang-compiled code with what the
(GCC-compiled) external library expects.

This in turn leads to various crashes when using std::thread
in code compiled with clang, as see e.g. via the ThreadPool
unit tests.  See PR 26473 for an example.

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

8 years agoDo not honor explicit alignment attribute on fields for PS4.
Sunil Srivastava [Fri, 5 Feb 2016 20:50:02 +0000 (20:50 +0000)]
Do not honor explicit alignment attribute on fields for PS4.
This change reverts r257462 for PS4 triple.

Differential Revision: http://reviews.llvm.org/D16788

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

8 years ago[Parser] Perform CachedTokens update dependent on token consumption
Bruno Cardoso Lopes [Fri, 5 Feb 2016 19:36:39 +0000 (19:36 +0000)]
[Parser] Perform CachedTokens update dependent on token consumption

In the context where we break one tok::greatergreater into two
tok::greater in order to correctly update the cached tokens; update the
CachedTokens with two tok::greater only if ParseGreaterThanInTemplateList
clients asks to consume the last token. Otherwise we only need to add
one because the second is already added later on, as a not yet cached token.

Differential Revision: http://reviews.llvm.org/D16906

rdar://problem/24488367

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

8 years ago[modules] Separately track whether an identifier's preprocessor information and
Richard Smith [Fri, 5 Feb 2016 19:03:40 +0000 (19:03 +0000)]
[modules] Separately track whether an identifier's preprocessor information and
name lookup information have changed since deserialization. For a C++ modules
build, we do not need to re-emit the identifier into the serialized identifier
table if only the name lookup information has changed (and in all cases, we
don't need to re-emit the macro information if only the name lookup information
has changed).

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

8 years ago[ASTMatchers] Allow hasName() to look through inline namespaces
Samuel Benzaquen [Fri, 5 Feb 2016 18:29:24 +0000 (18:29 +0000)]
[ASTMatchers] Allow hasName() to look through inline namespaces

Summary:
Allow hasName() to look through inline namespaces.
This will fix the interaction between some clang-tidy checks and libc++.

libc++ defines names in an inline namespace named std::<version_#>.
When we try to match a name using hasName("std::xxx") it fails to match and the clang-tidy check does not work.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D15506

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

8 years agoclang-format: Fix corner case in template detection.
Daniel Jasper [Fri, 5 Feb 2016 14:17:16 +0000 (14:17 +0000)]
clang-format: Fix corner case in template detection.

Before:
  f(a.operator() < A > ());

After:
  f(a.operator()<A>());

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

8 years ago[analyzer] Suppress localization diagnostics in debug classes and methods.
Devin Coughlin [Fri, 5 Feb 2016 04:22:15 +0000 (04:22 +0000)]
[analyzer] Suppress localization diagnostics in debug classes and methods.

If the class or method name case-insensitively contains the term "debug",
suppress warnings about string constants flowing to user-facing UI APIs.

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

8 years agoCodeGen: correct Windows ARM C++ assertion
Saleem Abdulrasool [Fri, 5 Feb 2016 04:12:40 +0000 (04:12 +0000)]
CodeGen: correct Windows ARM C++ assertion

Because the Decl is explicitly passed as nullptr further up the call chain, it
is possible to invoke isa on a nullptr, which will assert.  Guard against the
nullptr.

Take the opportunity to reuse the helper method rather than re-implementing this
logic.

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

8 years ago[CMake] One more try to make CMake clean up after itself
Chris Bieneman [Fri, 5 Feb 2016 03:59:08 +0000 (03:59 +0000)]
[CMake] One more try to make CMake clean up after itself

Seriously... CMake... You're on my list...

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

8 years agoRevert "[CMake] Improve the clang order-file generation workflow"
Chris Bieneman [Fri, 5 Feb 2016 03:40:37 +0000 (03:40 +0000)]
Revert "[CMake] Improve the clang order-file generation workflow"

This reverts commit r259862, and attempts to fix builder CMakeCaches.

Will try this again some other time...

Conflicts:

CMakeLists.txt
tools/driver/CMakeLists.txt

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

8 years ago[CMake] One more try to fix this.
Chris Bieneman [Fri, 5 Feb 2016 03:02:40 +0000 (03:02 +0000)]
[CMake] One more try to fix this.

This change will catch any bots that generated the order file that GNU ld doesn't like and delete it before trying to generate one that I think GNU ld will deal with.

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

8 years ago[CMake] Speculative fix for linker error on Linux
Chris Bieneman [Fri, 5 Feb 2016 02:51:33 +0000 (02:51 +0000)]
[CMake] Speculative fix for linker error on Linux

I can't reproduce this locally, but I think this may fix it.

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

8 years ago[modules] Factor out common code to mark identifier being "from AST", and add a
Richard Smith [Fri, 5 Feb 2016 01:40:54 +0000 (01:40 +0000)]
[modules] Factor out common code to mark identifier being "from AST", and add a
call in one more place to reduce the size of identifier tables in non-leaf
modules. No behavior change.

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

8 years ago[CMake] Trying to fix a bot failure I introduced in r259862
Chris Bieneman [Fri, 5 Feb 2016 01:27:31 +0000 (01:27 +0000)]
[CMake] Trying to fix a bot failure I introduced in r259862

CMake caching behavior makes me sad.

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

8 years ago[CMake] Improve the clang order-file generation workflow
Chris Bieneman [Fri, 5 Feb 2016 01:22:03 +0000 (01:22 +0000)]
[CMake] Improve the clang order-file generation workflow

Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

Reviewers: bogner

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16896

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

8 years agoDon't synthesize an ImportDecl for a module named in -fmodule-implementation-of
Ben Langmuir [Fri, 5 Feb 2016 01:10:05 +0000 (01:10 +0000)]
Don't synthesize an ImportDecl for a module named in -fmodule-implementation-of

When building a PCH with modules enabled this import would assert in the
ASTWriter and (if assertions were disabled) sometimes crash the compiler
that loaded the resulting PCH when trying to lookup the submodule ID.

rdar://problem/24137448

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

8 years agoPR25271: When attaching default template arguments to redeclarations of a
Richard Smith [Thu, 4 Feb 2016 22:54:41 +0000 (22:54 +0000)]
PR25271: When attaching default template arguments to redeclarations of a
template, keep looking for default arguments if we see a template parameter
pack. There may be default arguments preceding a pack with no default argument.

Patch by Jannis Harder!

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

8 years agoInstall cmake files to lib/cmake/clang
Niels Ole Salscheider [Thu, 4 Feb 2016 20:08:27 +0000 (20:08 +0000)]
Install cmake files to lib/cmake/clang

This is the right location for platform-specific files.

Also, search for LLVM's CMake files in this directory.

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

8 years agoFix a crash when there is a typo in the return statement.
Manman Ren [Thu, 4 Feb 2016 20:05:40 +0000 (20:05 +0000)]
Fix a crash when there is a typo in the return statement.

If the typo happens after a successful deduction for an earlier
return statement, we should check if the deduced type is null
before using it.

The typo correction happens after we try to deduce the return
type and we ignore the deduction from the typo and continue
to typo correction.

rdar://24342247

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

8 years ago[PGO] code simplification: use existing VP annotation API /NFC
Xinliang David Li [Thu, 4 Feb 2016 19:54:17 +0000 (19:54 +0000)]
[PGO] code simplification: use existing VP annotation API /NFC

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

8 years ago[PGO] cc1 option name change for profile instrumentation
Rong Xu [Thu, 4 Feb 2016 18:39:09 +0000 (18:39 +0000)]
[PGO] cc1 option name change for profile instrumentation

This patch changes cc1 option -fprofile-instr-generate to an enum option
-fprofile-instrument={clang|none}. It also changes cc1 options
-fprofile-instr-generate= to -fprofile-instrument-path=.
The driver level option -fprofile-instr-generate and -fprofile-instr-generate=
remain intact. This change will pave the way to integrate new PGO
instrumentation in IR level.

Review: http://reviews.llvm.org/D16730

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

8 years ago[x86] Correct setting of WIntType for MCU target
Andrey Bokhanko [Thu, 4 Feb 2016 11:54:45 +0000 (11:54 +0000)]
[x86] Correct setting of WIntType for MCU target

Differential Revision: http://reviews.llvm.org/D16626

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

8 years ago[OPENMP 4.0] Fixed support of array sections/array subscripts.
Alexey Bataev [Thu, 4 Feb 2016 11:27:03 +0000 (11:27 +0000)]
[OPENMP 4.0] Fixed support of array sections/array subscripts.
Codegen for array sections/array subscripts worked only for expressions with arrays as base. Patch fixes codegen for bases with pointer/reference types.

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

8 years agoAdd -nocudainc option to CUDA preprocessor test.
Samuel Antao [Thu, 4 Feb 2016 08:13:16 +0000 (08:13 +0000)]
Add -nocudainc option to CUDA preprocessor test.

If include files are used in the CUDA preprocessor tests it will cause a
failure due to a missing header file in hosts that do not match the triple
in the test. E.g. powerpc64le have CUDA support but the include files
cannot be used for an x86 target.

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

8 years agoBasic: mark TLS as supported on Windows on ARM
Saleem Abdulrasool [Thu, 4 Feb 2016 05:05:23 +0000 (05:05 +0000)]
Basic: mark TLS as supported on Windows on ARM

LLVM can now lower TLS access as per the MS ABI on ARM.  This enables the
generation of TLS access for Windows on ARM.

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

8 years agoPR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpres...
Alexey Bataev [Thu, 4 Feb 2016 04:22:09 +0000 (04:22 +0000)]
PR23057: fix use-after-free due to local token buffer in ParseCXXAmbiguousParenExpression, by Dmitry Polukhin
Differential Revision: http://reviews.llvm.org/D16572
A    test/Parser/cxx-ambig-paren-expr-asan.cpp
M    lib/Parse/ParseExprCXX.cpp

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

8 years agoFix predefine for __NSConstantString struct type
Ben Langmuir [Thu, 4 Feb 2016 00:55:24 +0000 (00:55 +0000)]
Fix predefine for __NSConstantString struct type

Per review feedback the name was wrong and it can be used outside
Objective-C.

Unfortunately, making the internal struct visible broke some ASTMatchers
tests that assumed that the first record decl would be from user code,
rather than a builtin type.  I'm worried that this will also affect
users' code.  So this patch adds a typedef to wrap the internal struct
and only makes the typedef visible to namelookup.  This is sufficient to
allow the ASTReader to merge the decls we need without making the struct
itself visible.

rdar://problem/24425801

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

8 years agoBump DiagnosticSemaKinds count; we're close to hitting it.
Manman Ren [Wed, 3 Feb 2016 23:35:29 +0000 (23:35 +0000)]
Bump DiagnosticSemaKinds count; we're close to hitting it.

 $ grep '= DIAG_START_SEMA' include/clang/Basic/DiagnosticIDs.h
       DIAG_START_ANALYSIS      = DIAG_START_SEMA            + 3000
 $ grep 'def ' include/clang/Basic/DiagnosticSemaKinds.td | wc -l
       2994

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

8 years agoReapply r259624, it is likely not the commit causing the bot failures.
Quentin Colombet [Wed, 3 Feb 2016 22:41:00 +0000 (22:41 +0000)]
Reapply r259624, it is likely not the commit causing the bot failures.
Original message:
Make CF constant string decl visible to name lookup to fix module errors

The return type of the __builtin___*StringMakeConstantString functions
is a pointer to a struct, so we need that struct to be visible to name
lookup so that we will correctly merge multiple declarations of that
type if they come from different modules.

Incidentally, to make this visible to name lookup we need to rename the
type to __NSConstantString, since the real NSConstantString is an
Objective-C interface type.  This shouldn't affect anyone outside the
compiler since users of the constant string builtins cast the result
immediately to CFStringRef.

Since this struct type is otherwise implicitly created by the AST
context and cannot access namelookup, we make this a predefined type
and initialize it in Sema.

Note: this issue of builtins that refer to types not visible to name
lookup technically also affects other builtins (e.g. objc_msgSendSuper),
but in all other cases the builtin is a library builtin and the issue
goes away if you include the library that defines the types it uses,
unlike for these constant string builtins.

rdar://problem/24425801

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

8 years ago[cfi] Safe handling of unaddressable vtable pointers (clang).
Evgeniy Stepanov [Wed, 3 Feb 2016 22:18:55 +0000 (22:18 +0000)]
[cfi] Safe handling of unaddressable vtable pointers (clang).

Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
the vtable pointer against the set of all known vtable addresses and
lets the runtime handler know if it is safe to inspect the vtable.

http://reviews.llvm.org/D16823

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

8 years agoRevert r259624 - Make CF constant string decl visible to name lookup to fix module...
Quentin Colombet [Wed, 3 Feb 2016 22:14:53 +0000 (22:14 +0000)]
Revert r259624 - Make CF constant string decl visible to name lookup to fix module errors.

This breaks some internal bots in stage2: clang seg fault.
Looking with Ben to see what is going on.

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

8 years ago[CUDA] added declarations for device-side system calls
Artem Belevich [Wed, 3 Feb 2016 20:53:58 +0000 (20:53 +0000)]
[CUDA] added declarations for device-side system calls

...and std:: wrappers for free/malloc.

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

8 years agoEnsure that we substitute into the declaration of a template parameter pack
Richard Smith [Wed, 3 Feb 2016 20:40:30 +0000 (20:40 +0000)]
Ensure that we substitute into the declaration of a template parameter pack
(that is not a pack expansion) during template argument deduction, even if we
deduced that the pack would be empty.

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

8 years agoRefactor conversion of deduced template arguments to reduce repetition.
Richard Smith [Wed, 3 Feb 2016 20:15:01 +0000 (20:15 +0000)]
Refactor conversion of deduced template arguments to reduce repetition.

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

8 years ago[Sema debugger support] Require non-void types to be complete in unknown-anytype...
Douglas Gregor [Wed, 3 Feb 2016 19:13:08 +0000 (19:13 +0000)]
[Sema debugger support] Require non-void types to be complete in unknown-anytype casts.

When performing a cast from an __unknown_anytype function call to a
non-void type, we need to make sure that type is complete. Fixes
rdar://problem/23959960.

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

8 years agoAdded Anastasia Stulova as a code owner for OpenCL
Anastasia Stulova [Wed, 3 Feb 2016 18:51:19 +0000 (18:51 +0000)]
Added Anastasia Stulova as a code owner for OpenCL

Reviewers: Chris Lattner

Subscribers: cfe-dev

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

8 years agoFix regression from r259622: the operand of an increment that is the operand of
Richard Smith [Wed, 3 Feb 2016 18:48:43 +0000 (18:48 +0000)]
Fix regression from r259622: the operand of an increment that is the operand of
a cast expression is not the operand of a cast expression itself, so if it's
parenthesized we need to form a ParenExpr not a ParenListExpr.

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

8 years agoAdd builtins for bitreverse intrinsic
Matt Arsenault [Wed, 3 Feb 2016 17:49:38 +0000 (17:49 +0000)]
Add builtins for bitreverse intrinsic

Follow the naming convention that bswap uses since it's a
similar sort of operation.

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

8 years agoclang-format: Fix formatting of ternary expressions with comments.
Daniel Jasper [Wed, 3 Feb 2016 17:27:10 +0000 (17:27 +0000)]
clang-format: Fix formatting of ternary expressions with comments.

Before:
  int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
      /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
       ccccccccccccccccccccccccccc;

After:
  int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
      /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :
              ccccccccccccccccccccccccccc;

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

8 years agoAdd back the ABITest makefiles
Chris Bieneman [Wed, 3 Feb 2016 17:16:01 +0000 (17:16 +0000)]
Add back the ABITest makefiles

These files are standalone and not integrated with CMake, so we probably want them.

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

8 years ago[OpenMP] Parsing + sema for target parallel for directive.
Arpith Chacko Jacob [Wed, 3 Feb 2016 15:46:42 +0000 (15:46 +0000)]
[OpenMP] Parsing + sema for target parallel for directive.

Summary:
This patch adds parsing + sema for the target parallel for directive along with testcases.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16759

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

8 years agoMinor cleanup to remove casts and improve some const correctness. NFC.
Aaron Ballman [Wed, 3 Feb 2016 15:20:51 +0000 (15:20 +0000)]
Minor cleanup to remove casts and improve some const correctness. NFC.

Patch by Alexander Riccio.

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

8 years ago[OpenCL] Adding reserved operator logical xor for OpenCL
Anastasia Stulova [Wed, 3 Feb 2016 15:17:14 +0000 (15:17 +0000)]
[OpenCL] Adding reserved operator logical xor for OpenCL

This patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g),
which results in a more meaningful error message.

Patch by Neil Hickey!

Review: http://reviews.llvm.org/D13280

M    test/SemaOpenCL/unsupported.cl
M    include/clang/Basic/TokenKinds.def
M    include/clang/Basic/DiagnosticParseKinds.td
M    lib/Basic/OperatorPrecedence.cpp
M    lib/Lex/Lexer.cpp
M    lib/Parse/ParseExpr.cpp

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

8 years agoProvide match function to look over an entire TU again.
Daniel Jasper [Wed, 3 Feb 2016 14:29:55 +0000 (14:29 +0000)]
Provide match function to look over an entire TU again.

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

8 years agoForgot to remove file in previous commit.
Yury Gribov [Wed, 3 Feb 2016 13:36:31 +0000 (13:36 +0000)]
Forgot to remove file in previous commit.

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

8 years ago[analyzer] AnalysisConsumer: print fully-qualified function name while displaying...
Yury Gribov [Wed, 3 Feb 2016 13:35:33 +0000 (13:35 +0000)]
[analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress

-analyzer-display progress option prints only function names which may be ambiguous. This patch forces AnalysisConsumer to print fully-qualified function names.
Patch by Alex Sidorin!

Differential Revision: http://reviews.llvm.org/D16804

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

8 years ago-inline-asm][X86] Add ability to use AVX512 in MS inline asm
Marina Yatsina [Wed, 3 Feb 2016 11:32:08 +0000 (11:32 +0000)]
-inline-asm][X86] Add ability to use AVX512 in MS inline asm

Defined the new AVX512 registers in clang inline asm.
Fixed a bug in the MC subtarget info creation during the parsing of MS asm statement - now it receives the actual CPU and target features information.

Differential Revision: http://reviews.llvm.org/D16757

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

8 years agoReduce initial Sema memory consumption by 400KB. By Elisavet Sakellari.
Axel Naumann [Wed, 3 Feb 2016 10:45:22 +0000 (10:45 +0000)]
Reduce initial Sema memory consumption by 400KB. By Elisavet Sakellari.

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

8 years agoclang-format: [JS/TypeScript] Support "enum" as an optional property name, too.
Daniel Jasper [Wed, 3 Feb 2016 05:33:44 +0000 (05:33 +0000)]
clang-format: [JS/TypeScript] Support "enum" as an optional property name, too.

Before:
  enum?: string
  [];

After:
  enum?: string[];

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