]> granicus.if.org Git - clang/log
clang
8 years agoAMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.
Nikolay Haustov [Thu, 30 Jun 2016 09:06:33 +0000 (09:06 +0000)]
AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.

Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.

Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl

Subscribers: kzhuravl, cfe-commits

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

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

8 years ago[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set
Michael Zuckerman [Thu, 30 Jun 2016 08:05:46 +0000 (08:05 +0000)]
[Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd instruction set

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

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

8 years ago[ASTMatcher] Add a node matcher for EnumType.
Haojian Wu [Thu, 30 Jun 2016 07:50:01 +0000 (07:50 +0000)]
[ASTMatcher] Add a node matcher for EnumType.

Reviewers: aaron.ballman

Subscribers: cfe-commits, klimek

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

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

8 years ago[cmake] Remove stale comment. NFC.
Michael Gottesman [Thu, 30 Jun 2016 05:51:18 +0000 (05:51 +0000)]
[cmake] Remove stale comment. NFC.

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

8 years ago[MS ABI] Pick an inheritance model if we resolve an overload set
David Majnemer [Thu, 30 Jun 2016 03:02:03 +0000 (03:02 +0000)]
[MS ABI] Pick an inheritance model if we resolve an overload set

We didn't assign an inheritance model for 'Foo' if the event an
exrepssion like '&Foo::Bar' occured if 'Bar' could resolve to multiple
functions.

Once the overload set is resolved to a particular member, we enforce a
specific inheritance model.

This fixes PR28360.

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

8 years ago[CodeView] Implement support for bitfields in Clang
David Majnemer [Thu, 30 Jun 2016 03:01:59 +0000 (03:01 +0000)]
[CodeView] Implement support for bitfields in Clang

Emit the underlying storage offset in addition to the starting bit
position of the field.

This fixes PR28162.

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

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

8 years agoUse the same type for adjacent bit field members.
Akira Hatanaka [Thu, 30 Jun 2016 00:07:17 +0000 (00:07 +0000)]
Use the same type for adjacent bit field members.

MSVC doesn't pack the bit field members if different types are used.
This came up in a patch review.

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160627/163107.html

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

8 years ago[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".
Siva Chandra [Wed, 29 Jun 2016 22:38:59 +0000 (22:38 +0000)]
[Tooling] Add optional argument to getFullyQualifiedName to prepend "::".

Reviewers: rsmith, saugustine, rnk

Subscribers: klimek, cfe-commits

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

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

8 years ago[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.
Michael Gottesman [Wed, 29 Jun 2016 21:59:23 +0000 (21:59 +0000)]
[ClangConfig] Store all of the targets exported in the variable CLANG_EXPORTED_TARGETS.

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

8 years ago[ClangConfig] Unset some variables after we are done using them to configure ClangCon...
Michael Gottesman [Wed, 29 Jun 2016 21:59:20 +0000 (21:59 +0000)]
[ClangConfig] Unset some variables after we are done using them to configure ClangConfig.cmake.in files.

This ensures that the values do not bleed over in between computations. It may
make sense in the future to just refactor this code into functions to provide
"true scoping".

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

8 years ago[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake...
Michael Gottesman [Wed, 29 Jun 2016 21:59:19 +0000 (21:59 +0000)]
[ClangConfig] Instead of hard coding the ClangTargets location to /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@.

This just makes ClangConfig more consistent with LLVMConfig.

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

8 years ago[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when...
Michael Gottesman [Wed, 29 Jun 2016 21:59:15 +0000 (21:59 +0000)]
[ClangConfig] Follow LLVM's example and only install Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled.

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

8 years ago[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig...
Michael Gottesman [Wed, 29 Jun 2016 21:59:14 +0000 (21:59 +0000)]
[cmake] Instead of just copying ClangConfig.cmake, configure it using ClangConfig.cmake.in.

This will allow for cmake to expand variables in ClangConfig.cmake for
downstream users.

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

8 years agoP0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
Richard Smith [Wed, 29 Jun 2016 21:17:59 +0000 (21:17 +0000)]
P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.
No semantic analysis yet.

This is a pain to disambiguate correctly, because the parsing rules for the
declaration form of a condition and of an init-statement are quite different --
for a token sequence that looks like a declaration, we frequently need to
disambiguate all the way to the ')' or ';'.

We could do better here in some cases by stopping disambiguation once we've
decided whether we've got an expression or not (rather than keeping going until
we know whether it's an init-statement declaration or a condition declaration),
by unifying our parsing code for the two types of declaration and moving the
syntactic checks into Sema; if this has a measurable impact on parsing
performance, I'll look into that.

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

8 years ago[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_D...
Michael Gottesman [Wed, 29 Jun 2016 21:12:38 +0000 (21:12 +0000)]
[ClangConfig] Copy ClangConfig.cmake to ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}.

This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in
${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in
${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an
in tree build.

In the case where clang is built out of tree, this is still correct since
CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same.

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

8 years agoConvert another case over to RevertingTentativeParsingAction.
Richard Smith [Wed, 29 Jun 2016 21:12:37 +0000 (21:12 +0000)]
Convert another case over to RevertingTentativeParsingAction.

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

8 years agoSwitch to an RAII object to revert tentative parsing automatically.
Richard Smith [Wed, 29 Jun 2016 21:06:51 +0000 (21:06 +0000)]
Switch to an RAII object to revert tentative parsing automatically.

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

8 years ago[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with...
Michael Gottesman [Wed, 29 Jun 2016 20:22:46 +0000 (20:22 +0000)]
[ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR with a deref of the variable.

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

8 years ago[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from...
Michael Gottesman [Wed, 29 Jun 2016 20:22:44 +0000 (20:22 +0000)]
[cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt.

This matches LLVM.

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

8 years ago[OpenCL] Allow -cl-std and other standard -cl- options in driver
Yaxun Liu [Wed, 29 Jun 2016 19:39:32 +0000 (19:39 +0000)]
[OpenCL] Allow -cl-std and other standard -cl- options in driver

Allow -cl-std and other standard -cl- options from cc1 to driver.

Added a test for the options moved.

Patch by Aaron En Ye Shi.

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

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

8 years agoAdd CapturedDecl::parameters() ArrayRef accessors following r273647.
Yaron Keren [Wed, 29 Jun 2016 18:55:53 +0000 (18:55 +0000)]
Add CapturedDecl::parameters() ArrayRef accessors following r273647.

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

8 years agoRe-land "[MS] Don't expect vftables to be provided for extern template instantiations"
Reid Kleckner [Wed, 29 Jun 2016 18:29:21 +0000 (18:29 +0000)]
Re-land "[MS] Don't expect vftables to be provided for extern template instantiations"

Reverts r273305 and re-instates r273296.

We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator
delete lookup occurs when the vtable is referenced. We already had a
special case to look up operator delete when dllimport was used, but I
think should really mark virtual destructors referenced any time the
vtable is used.

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

8 years agoAvailabilityAttr: update the document for macosx
Manman Ren [Wed, 29 Jun 2016 15:50:08 +0000 (15:50 +0000)]
AvailabilityAttr: update the document for macosx

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

8 years ago[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel...
Simon Pilgrim [Wed, 29 Jun 2016 14:04:08 +0000 (14:04 +0000)]
[X86][SSE2] Updated tests to match llvm\test\CodeGen\X86\sse2-intrinsics-fast-isel-x86_64.ll

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

8 years ago[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.
Alexey Bader [Wed, 29 Jun 2016 12:30:26 +0000 (12:30 +0000)]
[OpenCL] Add attribute 'pure' to read_image built-in functions to enable optimizations.

Reviewers: Anastasia, yaxunl

Subscribers: pekka.jaaskelainen, pxli168, cfe-commits

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

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

8 years ago[OpenCL] Fix typo in as_type test.
Alexey Bader [Wed, 29 Jun 2016 12:25:58 +0000 (12:25 +0000)]
[OpenCL] Fix typo in as_type test.

Reset astype variable in f6 function to avoid matching with wrong value from f5 function.

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

8 years agoUse ArgList::hasFlag to check if -miamcu/-mno-iamcu is passed. NFC.
Andrey Turetskiy [Wed, 29 Jun 2016 10:57:17 +0000 (10:57 +0000)]
Use ArgList::hasFlag to check if -miamcu/-mno-iamcu is passed. NFC.

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

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

8 years ago[Driver][AArch64] Add support for Broadcom Vulcan core.
Pankaj Gode [Wed, 29 Jun 2016 10:00:31 +0000 (10:00 +0000)]
[Driver][AArch64] Add support for Broadcom Vulcan core.

Adding support for new Broadcom Vulcan core (ARMv8.1A).

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

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

8 years ago[AVX512] Zero extend cmp intrinsic return value.
Igor Breger [Wed, 29 Jun 2016 08:14:17 +0000 (08:14 +0000)]
[AVX512]  Zero extend cmp intrinsic return value.

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

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

8 years agoRevert "[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)"
Vedant Kumar [Wed, 29 Jun 2016 05:33:09 +0000 (05:33 +0000)]
Revert "[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)"

This reverts commit 161ff9db3a3d0d62880d1cb18d58182cd3034912 (r273056).

This is breaking stage2 instrumented builds with "malformed coverage
data" errors.

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

8 years ago[Diag] Add getter shouldAlwaysPrint. NFC
Adam Nemet [Wed, 29 Jun 2016 04:55:31 +0000 (04:55 +0000)]
[Diag] Add getter shouldAlwaysPrint. NFC

For the new hotness attribute, the API will take the pass rather than
the pass name so we can no longer play the trick of AlwaysPrint being a
special pass name. This adds a getter to help the transition.

There is also a corresponding llvm patch.

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

8 years agoMark inheriting constructors as deleted if the corresponding defaulted default
Richard Smith [Wed, 29 Jun 2016 01:10:27 +0000 (01:10 +0000)]
Mark inheriting constructors as deleted if the corresponding defaulted default
constructor would be; this is effectively required by P0136R1. This has the
effect of exposing the validity of the base class initialization steps to
SFINAE checks.

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

8 years agoRevert "[PS4] Tighten up a test (noticed in passing)"
Sean Silva [Wed, 29 Jun 2016 00:29:23 +0000 (00:29 +0000)]
Revert "[PS4] Tighten up a test (noticed in passing)"

This reverts commit r269709.

r262285 changed this deliberately so that the test would not be
sensitive to which binaries are in the same directory as clang.
See the commit message of that commit for more background.

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

8 years agoFunction declarations are, in fact, permitted in the init-statement of a for
Richard Smith [Tue, 28 Jun 2016 23:26:18 +0000 (23:26 +0000)]
Function declarations are, in fact, permitted in the init-statement of a for
loop. Don't confuse Sema by saying they're not.

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

8 years ago[Sema] Disallow ambigious base classes in template argument deduction
Erik Pilkington [Tue, 28 Jun 2016 23:05:09 +0000 (23:05 +0000)]
[Sema] Disallow ambigious base classes in template argument deduction

Fixes PR28195.

Differential revision: http://reviews.llvm.org/D21653

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

8 years agoObjC Class Property: diagnostics when accessing a class property using instance.
Manman Ren [Tue, 28 Jun 2016 23:01:49 +0000 (23:01 +0000)]
ObjC Class Property: diagnostics when accessing a class property using instance.

When a class property is accessed with an object instance, before this commit,
we try to apply a typo correction of the same property:
property 'c' not found on object of type 'A *'; did you mean 'c'?

With this commit, we correctly emit a diagnostics:
property 'c' is a class property; did you mean to access it with class 'A'?

rdar://26866973

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

8 years agoAvailabilityAttr: we accept "macos" as the platform name.
Manman Ren [Tue, 28 Jun 2016 20:55:30 +0000 (20:55 +0000)]
AvailabilityAttr: we accept "macos" as the platform name.

We continue accepting "macosx" but canonicalize it to "macos", When emitting
diagnostics, we use "macOS" instead of "OS X".

The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can
directly compare the Platform in AvailabilityAttr with the PlatformName
in TargetInfo.

rdar://26795172
rdar://26800775

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

8 years agocxx_status: make c++17 footnote list formatting consistent with other footnote lists.
Richard Smith [Tue, 28 Jun 2016 20:37:43 +0000 (20:37 +0000)]
cxx_status: make c++17 footnote list formatting consistent with other footnote lists.

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

8 years agocxx_status: fix footnote for p0136.
Richard Smith [Tue, 28 Jun 2016 20:37:00 +0000 (20:37 +0000)]
cxx_status: fix footnote for p0136.

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

8 years agoUpdate cxx_dr_status from test/CXX/drs.
Richard Smith [Tue, 28 Jun 2016 20:35:53 +0000 (20:35 +0000)]
Update cxx_dr_status from test/CXX/drs.

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

8 years ago[CMake] Adding USES_TERMINAL to a few additional custom targets
Chris Bieneman [Tue, 28 Jun 2016 20:30:52 +0000 (20:30 +0000)]
[CMake] Adding USES_TERMINAL to a few additional custom targets

These are all long-running commands that should be in the ninja console job pool.

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

8 years agoFix unreasonably-precise CHECK.
Richard Smith [Tue, 28 Jun 2016 19:09:30 +0000 (19:09 +0000)]
Fix unreasonably-precise CHECK.

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

8 years agoP0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:
Richard Smith [Tue, 28 Jun 2016 19:03:57 +0000 (19:03 +0000)]
P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:

Replace inheriting constructors implementation with new approach, voted into
C++ last year as a DR against C++11.

Instead of synthesizing a set of derived class constructors for each inherited
base class constructor, we make the constructors of the base class visible to
constructor lookup in the derived class, using the normal rules for
using-declarations.

For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived
class that tracks the requisite additional information. We create shadow
constructors (not found by name lookup) in the derived class to model the
actual initialization, and have a new expression node,
CXXInheritedCtorInitExpr, to model the initialization of a base class from such
a constructor. (This initialization is special because it performs real perfect
forwarding of arguments.)

In cases where argument forwarding is not possible (for inalloca calls,
variadic calls, and calls with callee parameter cleanup), the shadow inheriting
constructor is not emitted and instead we directly emit the initialization code
into the caller of the inherited constructor.

Note that this new model is not perfectly compatible with the old model in some
corner cases. In particular:
 * if B inherits a private constructor from A, and C uses that constructor to
   construct a B, then we previously required that A befriends B and B
   befriends C, but the new rules require A to befriend C directly, and
 * if a derived class has its own constructors (and so its implicit default
   constructor is suppressed), it may still inherit a default constructor from
   a base class

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

8 years ago[CMake] Connect check-compiler-rt to check-all
Chris Bieneman [Tue, 28 Jun 2016 18:32:22 +0000 (18:32 +0000)]
[CMake] Connect check-compiler-rt to check-all

When using the LLVM_BUILD_EXTERNAL_COMPILER_RT option with
LLVM_ENABLE_TESTS we should also bind check-compiler-rt to check-all so
that the compiler-rt tests run too.

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

8 years agoUpdate the expected masked load/store intrinsics names in tests
Artur Pilipenko [Tue, 28 Jun 2016 18:28:45 +0000 (18:28 +0000)]
Update the expected masked load/store intrinsics names in tests

The mangling of their names was changed in order to support arbitrary addrspace pointers as arguments in rL274043.

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

8 years agoNFC. Test commit, remove a redundant empty line in Tooling.cpp
Artur Pilipenko [Tue, 28 Jun 2016 17:56:29 +0000 (17:56 +0000)]
NFC. Test commit, remove a redundant empty line in Tooling.cpp

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

8 years ago[CMake] Pass LLVM_LIT_ARGS into compiler-rt build.
Chris Bieneman [Tue, 28 Jun 2016 17:00:49 +0000 (17:00 +0000)]
[CMake] Pass LLVM_LIT_ARGS into compiler-rt build.

If top-level lit args are specified, you probably want that in the sub-project too.

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

8 years ago[CMake] [Apple Clang] Enable Compiler-RT tests on stage2 builds
Chris Bieneman [Tue, 28 Jun 2016 16:32:48 +0000 (16:32 +0000)]
[CMake] [Apple Clang] Enable Compiler-RT tests on stage2 builds

We want to be able to run the compiler-rt tests on stage2 build configurations in CI. This should enable that.

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

8 years ago[ASTMatchers] Add isLambda() matcher.
Samuel Benzaquen [Tue, 28 Jun 2016 14:08:56 +0000 (14:08 +0000)]
[ASTMatchers] Add isLambda() matcher.

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

8 years ago[SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.
Chris Dewhurst [Tue, 28 Jun 2016 12:55:55 +0000 (12:55 +0000)]
[SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.

The final change is required to extend the back-end's AtomicExpandPass that was implemented for Sparc (64 bit) and later extended for Sparc (32 bit).

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

8 years ago[Driver] Add method to redirect output of Compilation.
Nikolay Haustov [Tue, 28 Jun 2016 08:00:42 +0000 (08:00 +0000)]
[Driver] Add method to redirect output of Compilation.

Summary:
Currently output of child process, however in my use case, it
needs to be captured and presented to the user.

Add Redirect method to Compilation and use existing infrastructure
for redirecting output of commands.

Reviewers: tstellarAMD

Subscribers: cfe-commits

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

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

8 years agoRevert r273950, (empty). Please recommit it with readable commit message.
NAKAMURA Takumi [Tue, 28 Jun 2016 06:10:54 +0000 (06:10 +0000)]
Revert r273950, (empty). Please recommit it with readable commit message.

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

8 years ago[clang-cl] Define _MSVC_LANG
David Majnemer [Tue, 28 Jun 2016 03:13:16 +0000 (03:13 +0000)]
[clang-cl] Define _MSVC_LANG

Recently, Microsoft added support for a flag, /std, which controls which
version of the language rules MSVC should use.
MSVC hasn't updated __cplusplus though.
Instead, they added a new macro, _MSVC_LANG, which is defined in a
similar fashion to __cplusplus.  This is used to indicate which mode the
compiler is in.

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

8 years ago[intrin.h] Certain _Interlocked intrinsics return the old value
David Majnemer [Tue, 28 Jun 2016 02:54:43 +0000 (02:54 +0000)]
[intrin.h] Certain _Interlocked intrinsics return the old value

This fixes PR28326.

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

8 years agoAvoid accessing an invalid PresumedLoc.
Jordan Rose [Tue, 28 Jun 2016 01:02:31 +0000 (01:02 +0000)]
Avoid accessing an invalid PresumedLoc.

DiagnosticNoteRenderer asserts trying to emit its "while building
module Foo imported from bar.h:5" note when the presumed location
of the import is invalid. This assertion was added in r267914,
where most uses of 'getFilename' were updated to test 'isValid'
instead. This one must have been missed.

I can't come up with a test because this location is always valid
in C-based code, but external clients that manually import modules
(*cough*Swift*cough*) sometimes provide invalid SourceLocations.

rdar://problem/26099576

http://reviews.llvm.org/D21111

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

8 years agoFrontend: clang-format a statement, NFC
Saleem Abdulrasool [Tue, 28 Jun 2016 00:19:32 +0000 (00:19 +0000)]
Frontend: clang-format a statement, NFC

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

8 years agoAMDGPU: Add builtin to read exec mask
Matt Arsenault [Tue, 28 Jun 2016 00:13:17 +0000 (00:13 +0000)]
AMDGPU: Add builtin to read exec mask

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

8 years agogit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273950 91177308-0d34-0410...
Chris Dewhurst [Mon, 27 Jun 2016 22:11:12 +0000 (22:11 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273950 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAttempting to fix lit test test/Headers/opencl-c-header.cl on cygwin.
Yaxun Liu [Mon, 27 Jun 2016 21:43:00 +0000 (21:43 +0000)]
Attempting to fix lit test test/Headers/opencl-c-header.cl on cygwin.

"chmod u-x *" does not work for lit on cygwin.

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

8 years agoAdd simple, stupid, pattern-based fuzzer / reducer for modules bugs. I've
Richard Smith [Mon, 27 Jun 2016 19:43:46 +0000 (19:43 +0000)]
Add simple, stupid, pattern-based fuzzer / reducer for modules bugs. I've
already used this to find and reduce quite a few bugs, and it works pretty well
if you can find the right patterns.

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

8 years ago[ExprConstant] Fix PR28314 - crash while evluating objectsize.
George Burgess IV [Mon, 27 Jun 2016 19:40:41 +0000 (19:40 +0000)]
[ExprConstant] Fix PR28314 - crash while evluating objectsize.

This fixes a crash in code like:
```
struct A {
  struct B b;
  char c[1];
}

int foo(struct A* a) { return __builtin_object_size(a->c, 0); }
```

We wouldn't check whether the structs we were examining were invalid,
and getting the layout of an invalid struct is (unsurprisingly) A Bad
Thing. With this patch, we'll always return conservatively if we see an
invalid struct, since I'm assuming the presence of an invalid struct
means that our compilation failed (so having a conservative result isn't
such a big deal).

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

8 years ago[OpenMP] Diagnose missing cases of statements between target and teams directives
Kelvin Li [Mon, 27 Jun 2016 19:15:43 +0000 (19:15 +0000)]
[OpenMP] Diagnose missing cases of statements between target and teams directives

Clang fails to diagnose cases such as
#pragma omp target
  while(0) {
    #pragma omp teams
    {}
  }

A patch by David Sheinkman.

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

8 years agoResubmission of http://reviews.llvm.org/D21564 after fixes.
Carlo Bertolli [Mon, 27 Jun 2016 14:55:37 +0000 (14:55 +0000)]
Resubmission of http://reviews.llvm.org/D21564 after fixes.
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:

The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.

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

8 years ago[clang-cl] Implement support for /std
David Majnemer [Mon, 27 Jun 2016 02:32:12 +0000 (02:32 +0000)]
[clang-cl] Implement support for /std

/std: supports two arguments, c++14 and c++latest.  Currently, c++latest
maps to c++1z but this might change down the road.

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

8 years ago[X86] add _mm_loadu_si64
Asaf Badouh [Sun, 26 Jun 2016 13:51:54 +0000 (13:51 +0000)]
[X86] add _mm_loadu_si64

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

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

8 years agoFix unused variable warning after r273754.
James Y Knight [Sat, 25 Jun 2016 16:40:53 +0000 (16:40 +0000)]
Fix unused variable warning after r273754.

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

8 years ago[X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates larger...
Craig Topper [Sat, 25 Jun 2016 07:31:14 +0000 (07:31 +0000)]
[X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates larger than 16. This was accidentally broken in r272246.

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

8 years agoFix bad test expectation.
Peter Collingbourne [Sat, 25 Jun 2016 00:37:14 +0000 (00:37 +0000)]
Fix bad test expectation.

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

8 years agoCodeGen: Start emitting checked loads when both trapping CFI and -fwhole-program...
Peter Collingbourne [Sat, 25 Jun 2016 00:24:06 +0000 (00:24 +0000)]
CodeGen: Start emitting checked loads when both trapping CFI and -fwhole-program-vtables are enabled.

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

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

8 years agoImplement C++17 P0386R2, inline variables. (The 'inline' specifier gives a
Richard Smith [Sat, 25 Jun 2016 00:15:56 +0000 (00:15 +0000)]
Implement C++17 P0386R2, inline variables. (The 'inline' specifier gives a
variable weak discardable linkage and partially-ordered initialization, and is
implied for constexpr static data members.)

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

8 years agoAdd support for musl-libc on ARM Linux.
Rafael Espindola [Fri, 24 Jun 2016 21:35:06 +0000 (21:35 +0000)]
Add support for musl-libc on ARM Linux.

Patch by Lei Zhang!

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

8 years agoCodeGen: Update Clang to use the new type metadata.
Peter Collingbourne [Fri, 24 Jun 2016 21:21:46 +0000 (21:21 +0000)]
CodeGen: Update Clang to use the new type metadata.

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

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

8 years ago[CMake] Remove CLANG_APPEND_VC_REV option
Chris Bieneman [Fri, 24 Jun 2016 20:21:12 +0000 (20:21 +0000)]
[CMake] Remove CLANG_APPEND_VC_REV option

I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem.

Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf).

The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems.

This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary.

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

8 years agoRevert r273705
Carlo Bertolli [Fri, 24 Jun 2016 19:20:02 +0000 (19:20 +0000)]
Revert r273705

 [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

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

8 years ago[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute...
Carlo Bertolli [Fri, 24 Jun 2016 18:53:35 +0000 (18:53 +0000)]
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

http://reviews.llvm.org/D21564

This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:

The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.

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

8 years agoclang-format: [JS] Fix build breakage.
Martin Probst [Fri, 24 Jun 2016 17:45:13 +0000 (17:45 +0000)]
clang-format: [JS] Fix build breakage.

Checking Line.MustBeDeclaration does actually break the field and param initializer use case.

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

8 years agoDeadStoresChecker: Don't warn about dead stores into volatile variables
Stephan Bergmann [Fri, 24 Jun 2016 16:26:43 +0000 (16:26 +0000)]
DeadStoresChecker: Don't warn about dead stores into volatile variables

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

8 years agoCorrect error in change description.
Richard Smith [Fri, 24 Jun 2016 14:23:32 +0000 (14:23 +0000)]
Correct error in change description.

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

8 years agoRemaining motions pass.
Richard Smith [Fri, 24 Jun 2016 14:10:58 +0000 (14:10 +0000)]
Remaining motions pass.

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

8 years agoInline variables tentatively approved for C++17.
Richard Smith [Fri, 24 Jun 2016 14:04:07 +0000 (14:04 +0000)]
Inline variables tentatively approved for C++17.

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

8 years agoUpdates from further motions.
Richard Smith [Fri, 24 Jun 2016 13:25:08 +0000 (13:25 +0000)]
Updates from further motions.

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

8 years agoFix make-check issues
Strahinja Petrovic [Fri, 24 Jun 2016 13:11:15 +0000 (13:11 +0000)]
Fix make-check issues

Fixing build issue for test test/CodeGen/struct-union-BE.c.

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

8 years agoMore approved features for C++17.
Richard Smith [Fri, 24 Jun 2016 12:21:30 +0000 (12:21 +0000)]
More approved features for C++17.

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

8 years agoDynamic memory allocation with alignment has been approved for C++17.
Richard Smith [Fri, 24 Jun 2016 12:16:11 +0000 (12:16 +0000)]
Dynamic memory allocation with alignment has been approved for C++17.

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

8 years agoUsing for attributes voted into C++17.
Richard Smith [Fri, 24 Jun 2016 12:15:12 +0000 (12:15 +0000)]
Using for attributes voted into C++17.

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

8 years agoThis patch fixes problem with passing structures and unions
Strahinja Petrovic [Fri, 24 Jun 2016 12:12:41 +0000 (12:12 +0000)]
This patch fixes problem with passing structures and unions
smaller than register as argument in variadic functions on
big endian architectures.
Differential Revision: http://reviews.llvm.org/D21611

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

8 years agoAdd (commented out) status entries for the upcoming WG21 motions.
Richard Smith [Fri, 24 Jun 2016 11:20:31 +0000 (11:20 +0000)]
Add (commented out) status entries for the upcoming WG21 motions.

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

8 years agoIgnoringImplicit matcher.
Cong Liu [Fri, 24 Jun 2016 09:38:03 +0000 (09:38 +0000)]
IgnoringImplicit matcher.

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

8 years agotry to fix the MSVC build
David Majnemer [Fri, 24 Jun 2016 05:48:59 +0000 (05:48 +0000)]
try to fix the MSVC build

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

8 years agoUse even more ArrayRefs
David Majnemer [Fri, 24 Jun 2016 05:33:44 +0000 (05:33 +0000)]
Use even more ArrayRefs

No functional change is intended, just a small refactoring.

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

8 years agoUse more ArrayRefs
David Majnemer [Fri, 24 Jun 2016 04:05:48 +0000 (04:05 +0000)]
Use more ArrayRefs

No functional change is intended, just a small refactoring.

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

8 years agoUse the same underlying type for bitfields
David Majnemer [Fri, 24 Jun 2016 04:05:35 +0000 (04:05 +0000)]
Use the same underlying type for bitfields

MSVC allocates fresh storage for consecutive bitfields with different
underlying types.

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

8 years agoParser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]
NAKAMURA Takumi [Thu, 23 Jun 2016 22:47:59 +0000 (22:47 +0000)]
Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]

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

8 years agoclang-format: [JS] handle conditionals in fields, default params.
Martin Probst [Thu, 23 Jun 2016 21:51:49 +0000 (21:51 +0000)]
clang-format: [JS] handle conditionals in fields, default params.

Summary:

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoInvoke simplifycfg and sroa before instcombine.
Dehao Chen [Thu, 23 Jun 2016 20:13:10 +0000 (20:13 +0000)]
Invoke simplifycfg and sroa before instcombine.

Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions.

Reviewers: davidxl, wmi, dnovillo

Subscribers: llvm-commits

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

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

8 years agoclang-format: [JS] recognize more type locations.
Martin Probst [Thu, 23 Jun 2016 19:52:32 +0000 (19:52 +0000)]
clang-format: [JS] recognize more type locations.

Summary: Includes parenthesized type expressions and type aliases.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoImplement p0292r2 (constexpr if), a likely C++1z feature.
Richard Smith [Thu, 23 Jun 2016 19:16:49 +0000 (19:16 +0000)]
Implement p0292r2 (constexpr if), a likely C++1z feature.

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

8 years agoRe-commit r273548, reverted in r273589, with a fix to not produce
Richard Smith [Thu, 23 Jun 2016 19:02:52 +0000 (19:02 +0000)]
Re-commit r273548, reverted in r273589, with a fix to not produce
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such
a case, the loop condition variable is modified on each iteration of the loop
by definition.

Original commit message:

Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

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

8 years agoAdd a test case for the regression in -Wfor-loop-analysis caused by r273548.
Peter Collingbourne [Thu, 23 Jun 2016 18:11:19 +0000 (18:11 +0000)]
Add a test case for the regression in -Wfor-loop-analysis caused by r273548.

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

8 years agoRevert r273548, "Rearrange condition handling so that semantic checks on a condition...
Peter Collingbourne [Thu, 23 Jun 2016 18:11:15 +0000 (18:11 +0000)]
Revert r273548, "Rearrange condition handling so that semantic checks on a condition variable"
as it caused a regression in -Wfor-loop-analysis.

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