]> granicus.if.org Git - clang/log
clang
8 years ago[ThinLTO] Clang side of renaming of function index (NFC)
Teresa Johnson [Tue, 15 Mar 2016 00:04:44 +0000 (00:04 +0000)]
[ThinLTO] Clang side of renaming of function index (NFC)

This is the companion to an LLVM patch that renamed the function index
data structures and files to use the more general module summary index.

(Recommit after fixing LLVM side to add back missed file)

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

8 years agoclang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to expect...
NAKAMURA Takumi [Mon, 14 Mar 2016 23:00:44 +0000 (23:00 +0000)]
clang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to expect x86_thiscallcc.

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

8 years agoRevert "[ThinLTO] Clang side of renaming of function index (NFC)"
Teresa Johnson [Mon, 14 Mar 2016 21:18:17 +0000 (21:18 +0000)]
Revert "[ThinLTO] Clang side of renaming of function index (NFC)"

This reverts commit r263491. Missed a file on the LLVM side.

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

8 years ago[ThinLTO] Clang side of renaming of function index (NFC)
Teresa Johnson [Mon, 14 Mar 2016 21:06:06 +0000 (21:06 +0000)]
[ThinLTO] Clang side of renaming of function index (NFC)

This is the companion to an LLVM patch that renamed the function index
data structures and files to use the more general module summary index.

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

8 years ago[CMake] Updating Apple Clang CMake caches
Chris Bieneman [Mon, 14 Mar 2016 20:23:21 +0000 (20:23 +0000)]
[CMake] Updating Apple Clang CMake caches

This is a big update that gets the public configurations more in line with the ones we're actually using internally to ship Clang in Xcode.

From here forward I expect most of the changes in these files to be incremental as the changes get made internally.

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

8 years agoRelax test introduced in r263464 to accept ARM ABI output.
Peter Collingbourne [Mon, 14 Mar 2016 20:13:59 +0000 (20:13 +0000)]
Relax test introduced in r263464 to accept ARM ABI output.

Should fix ARM bots.

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

8 years agoclang-format: [JS] Handle certain cases of ASI.
Daniel Jasper [Mon, 14 Mar 2016 19:21:36 +0000 (19:21 +0000)]
clang-format: [JS] Handle certain cases of ASI.

Automatic Semicolon Insertion can only be properly handled by parsing
source code. However conservatively catching just a few, common
situations prevents breaking code during development, which greatly
improves usability.

JS code should still use semicolons, and ASI code should be flagged by
a compiler or linter.

Patch by Martin Probst. Thank you.

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

8 years agoCodeGen: Use 32-bit gep offsets to address vtable address points.
Peter Collingbourne [Mon, 14 Mar 2016 19:07:10 +0000 (19:07 +0000)]
CodeGen: Use 32-bit gep offsets to address vtable address points.

The relative vtable ABI will use a struct rather than an array as the type
of a vtable. LLVM only allows 32-bit integers as struct indices, so we need
to use 32-bit integers to get addresses of address points. In order to keep
the code simple, we might as well do that unconditionally.

It's probably a reasonable implementation limit to support no more than 2
billion virtual functions per class.

This change causes quite a bit of churn in the test suite, so I'm making
it separately.

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

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

8 years agoCodeGen: Mark functions used in vtables as unnamed_addr.
Peter Collingbourne [Mon, 14 Mar 2016 18:41:59 +0000 (18:41 +0000)]
CodeGen: Mark functions used in vtables as unnamed_addr.

This marks virtual function declarations, as well as runtime library functions
__cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This
will allow us to correctly form relative references to them from vtables in
the relative vtable ABI.

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

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

8 years ago[modules] Don't diagnose non-modular includes from modular files that are
Richard Smith [Mon, 14 Mar 2016 17:52:37 +0000 (17:52 +0000)]
[modules] Don't diagnose non-modular includes from modular files that are
implementation units of modules rather than interface units.

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

8 years ago[OpenMP] Replace offloading option that start with -o with -fo.
Samuel Antao [Mon, 14 Mar 2016 15:57:41 +0000 (15:57 +0000)]
[OpenMP] Replace offloading option that start with -o with -fo.

Summary:
The current offloading implementation is using -omptargets and -omp-host-ir-file-path options in the frontend. This causes the user a lot of trouble due to to the conflicts with the -o option. E.g. if the user misspells  omptargets he will end up with a file with a weird name.

This patches replaces these two options with  -fomptargets and -fomp-host-ir-file-path to avoid these issues, and it is also more consistent with the other options like -fopenmp.

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

Subscribers: cfe-commits, caomhin, fraggamuffin

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

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

8 years agoRevert "Recommitted r261634 "Supporting all entities declared in lexical scope in...
Benjamin Kramer [Mon, 14 Mar 2016 14:58:28 +0000 (14:58 +0000)]
Revert "Recommitted r261634 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26715 at r263379."

This reverts commit r263425. Breaks self-host.

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

8 years agoFix some more tests with CLANG_DEFAULT_CXX_STDLIB
Jonas Hahnfeld [Mon, 14 Mar 2016 14:34:10 +0000 (14:34 +0000)]
Fix some more tests with CLANG_DEFAULT_CXX_STDLIB

Also use -stdlib=platform instead of -stdlib=libstdc++ when testing if Clang
chooses the correct default for the given platform.

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

8 years agoMake FreeBSD and NetBSD use CLANG_DEFAULT_CXX_STDLIB
Jonas Hahnfeld [Mon, 14 Mar 2016 14:34:04 +0000 (14:34 +0000)]
Make FreeBSD and NetBSD use CLANG_DEFAULT_CXX_STDLIB

Also introduce -stdlib=platform to override the configured value
and use it to make the tests always pass.

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

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

8 years ago[Frontend] Disable value name discarding for all sanitizers.
Benjamin Kramer [Mon, 14 Mar 2016 13:23:58 +0000 (13:23 +0000)]
[Frontend] Disable value name discarding for all sanitizers.

ASan also relies on names on allocas and will emit unhelpful output if
they're not present. Just force-enable value names for now. Should
unbreak release builds of asan.

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

8 years agoRecommitted r261634 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Mon, 14 Mar 2016 12:03:55 +0000 (12:03 +0000)]
Recommitted r261634 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26715 at r263379.

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

8 years ago[Driver] Enable --rtlib option for MSVC target
Andrey Turetskiy [Mon, 14 Mar 2016 11:19:43 +0000 (11:19 +0000)]
[Driver] Enable --rtlib option for MSVC target

This enables "--rtlib compiler-rt" option under MSVC environment.

Patch by Roman Shirokiy.

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

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

8 years agoTemporarily make discard value names depend on whether or not we're
Eric Christopher [Mon, 14 Mar 2016 08:10:47 +0000 (08:10 +0000)]
Temporarily make discard value names depend on whether or not we're
trying to track origins in the memory sanitizer since the backend
instrumentation pass currently takes names from the Instruction.

Fixes all of the origin tracking tests in compiler-rt after the
-discard-value-name option was added.

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

8 years agoGive the test a temporary output so it can be cleaned up.
Eric Christopher [Mon, 14 Mar 2016 06:21:07 +0000 (06:21 +0000)]
Give the test a temporary output so it can be cleaned up.

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

8 years agoTry to get cl-pch-showincludes passing on AArch64 bots.
Nico Weber [Sun, 13 Mar 2016 22:26:26 +0000 (22:26 +0000)]
Try to get cl-pch-showincludes passing on AArch64 bots.

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

8 years agoRemove compile time PreserveName in favor of a runtime cc1 -discard-value-names option
Mehdi Amini [Sun, 13 Mar 2016 21:05:23 +0000 (21:05 +0000)]
Remove compile time PreserveName in favor of a runtime cc1 -discard-value-names option

Summary:
This flag is enabled by default in the driver when NDEBUG is set. It
is forwarded on the LLVMContext to discard all value names (but
GlobalValue) for performance purpose.

This an improved version of D18024

Reviewers: echristo, chandlerc

Subscribers: cfe-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoAdded test that covers changes in r263379.
Amjad Aboud [Sun, 13 Mar 2016 11:12:57 +0000 (11:12 +0000)]
Added test that covers changes in r263379.

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

8 years agoUpdate for new argument to scalbn
Matt Arsenault [Sun, 13 Mar 2016 05:12:47 +0000 (05:12 +0000)]
Update for new argument to scalbn

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

8 years agoAlso test that the pch file is not printed in /showIncludes
Nico Weber [Sun, 13 Mar 2016 03:04:46 +0000 (03:04 +0000)]
Also test that the pch file is not printed in /showIncludes

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

8 years agoMake test a bit stricter to check not just the file basename is printed.
Nico Weber [Sun, 13 Mar 2016 02:48:51 +0000 (02:48 +0000)]
Make test a bit stricter to check not just the file basename is printed.

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

8 years agoclang-cl: Add /Yc argument to /showIncludes output.
Nico Weber [Sun, 13 Mar 2016 02:44:13 +0000 (02:44 +0000)]
clang-cl: Add /Yc argument to /showIncludes output.

To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit,
so that it happens after CompilerInstance::InitializeSourceManager() has run.

General /FI arguments are still missing from /showIncludes output, this still
needs to be fixed.

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

8 years agoclang-cl: Add a test for the interaction of /Yc and /showIncludes.
Nico Weber [Sat, 12 Mar 2016 19:55:59 +0000 (19:55 +0000)]
clang-cl: Add a test for the interaction of /Yc and /showIncludes.

We almost get this right, but not completely (see FIXME).  It looks like /FI
headers generally aren't included in /showIncludes yet, but they should be.
But it seems good to have test coverage for the bits that already work.

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

8 years agoTemporarily revert these patches:
Eric Christopher [Sat, 12 Mar 2016 01:47:11 +0000 (01:47 +0000)]
Temporarily revert these patches:

commit 60d9845f6a037122d9be9a6d92d4de617ef45b04
Author: Mehdi Amini <mehdi.amini@apple.com>
Date:   Fri Mar 11 18:48:02 2016 +0000

    Fix clang crash: when CodeGenAction is initialized without a
    context, use the member and not the parameter

    From: Mehdi Amini <mehdi.amini@apple.com>

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

commit af7ce3bf04a75ad5124b457b805df26006bd215b
Author: Mehdi Amini <mehdi.amini@apple.com>
Date:   Fri Mar 11 17:32:58 2016 +0000

    Fix build: use -> with pointers and not .

    Silly typo.

    From: Mehdi Amini <mehdi.amini@apple.com>

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

commit d0eea119192814954e7368c77d0dc5a9eeec1fbb
Author: Mehdi Amini <mehdi.amini@apple.com>
Date:   Fri Mar 11 17:15:44 2016 +0000

    Remove compile time PreserveName switch based on NDEBUG

    Summary:
    Following r263086, we are now relying on a flag on the Context to
    discard Value names in release builds.

    Reviewers: chandlerc

    Subscribers: cfe-commits

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

    From: Mehdi Amini <mehdi.amini@apple.com>

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

until we can fix the Release builds.

This reverts commits 263257, 263267, 263273

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

8 years agoMake functions in altivec.h be __inline__. As they are all also marked
Daniel Jasper [Fri, 11 Mar 2016 22:13:28 +0000 (22:13 +0000)]
Make functions in altivec.h be __inline__. As they are all also marked
__always_inline__, this has likely been meant from the start.

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

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

8 years agoAdd fix-it for format-security warnings.
Bob Wilson [Fri, 11 Mar 2016 21:55:37 +0000 (21:55 +0000)]
Add fix-it for format-security warnings.

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

8 years agoFix ObjCMethodDecl::findPropertyDecl for class properties.
Jordan Rose [Fri, 11 Mar 2016 21:14:40 +0000 (21:14 +0000)]
Fix ObjCMethodDecl::findPropertyDecl for class properties.

This affects code completion and a few other things; hopefully the code completion
test is sufficient to catch regressions.

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

8 years agoAdd missing triple to instantiate-sizeof.cpp test
Reid Kleckner [Fri, 11 Mar 2016 19:17:53 +0000 (19:17 +0000)]
Add missing triple to instantiate-sizeof.cpp test

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

8 years agoAllow sizeof(UnrelatedClass::field) in C++11 class template methods
Reid Kleckner [Fri, 11 Mar 2016 18:59:12 +0000 (18:59 +0000)]
Allow sizeof(UnrelatedClass::field) in C++11 class template methods

This feature works outside of templates by forming a DeclRefExpr to a
FieldDecl instead of a MemberExpr, which requires a base object in
addition to the FieldDecl.

Previously, while building up the template AST before instantiation, we
formed a CXXDependentScopeMemberExpr, which always instantiates to a
MemberExpr. Now, in unevaluated contexts we form a
DependentScopeDeclRefExpr, which is a more flexible node that can
instantiate to either a MemberExpr or a DeclRefExpr depending on lookup
results.

Fixes PR26893.

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

8 years agoUpdate test case for llvm summary format changes in D17592.
Teresa Johnson [Fri, 11 Mar 2016 18:52:42 +0000 (18:52 +0000)]
Update test case for llvm summary format changes in D17592.

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

8 years agoFix clang crash: when CodeGenAction is initialized without a context, use the member...
Mehdi Amini [Fri, 11 Mar 2016 18:48:02 +0000 (18:48 +0000)]
Fix clang crash: when CodeGenAction is initialized without a context, use the member and not the parameter

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[SEH] Remove nounwind/noinline from outlined finally funclets
Reid Kleckner [Fri, 11 Mar 2016 17:36:16 +0000 (17:36 +0000)]
[SEH] Remove nounwind/noinline from outlined finally funclets

With the new EH representation this is no longer necessary.

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

8 years agoFix build: use -> with pointers and not .
Mehdi Amini [Fri, 11 Mar 2016 17:32:58 +0000 (17:32 +0000)]
Fix build: use -> with pointers and not .

Silly typo.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoRemove compile time PreserveName switch based on NDEBUG
Mehdi Amini [Fri, 11 Mar 2016 17:15:44 +0000 (17:15 +0000)]
Remove compile time PreserveName switch based on NDEBUG

Summary:
Following r263086, we are now relying on a flag on the Context to
discard Value names in release builds.

Reviewers: chandlerc

Subscribers: cfe-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoAdd tests for ARM Cortex-R8
Alexandros Lamprineas [Fri, 11 Mar 2016 15:03:40 +0000 (15:03 +0000)]
Add tests for ARM Cortex-R8

Add command-line tests for ARM Cortex-R8 checking that the driver calls
clang -cc1 with the correct little-endian/big-endian, and ARM/Thumb triple.

Patch by Pablo Barrio <pablo.barrio@arm.com>

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

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

8 years agoUpdate to include the new header file providing createGVNPass.
Chandler Carruth [Fri, 11 Mar 2016 09:02:43 +0000 (09:02 +0000)]
Update to include the new header file providing createGVNPass.

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

8 years ago[OpenMP] NFC fix compilation warning about unused variable
Dmitry Polukhin [Fri, 11 Mar 2016 07:58:34 +0000 (07:58 +0000)]
[OpenMP] NFC fix compilation warning about unused variable

lib/Sema/SemaOpenMP.cpp:9243:13: warning: variable ‘IsRightMostExpression’ set but not used

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

8 years agoRemoving the friend declaration was not a good idea.
John McCall [Fri, 11 Mar 2016 05:03:01 +0000 (05:03 +0000)]
Removing the friend declaration was not a good idea.

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

8 years agoSpeculatively attempt to fix the MSVC build by making some
John McCall [Fri, 11 Mar 2016 04:55:21 +0000 (04:55 +0000)]
Speculatively attempt to fix the MSVC build by making some
methods non-private.

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

8 years agoAdd a coerce-and-expand ABIArgInfo as a generalization of some
John McCall [Fri, 11 Mar 2016 04:30:43 +0000 (04:30 +0000)]
Add a coerce-and-expand ABIArgInfo as a generalization of some
of the things we do with Expand / Direct.

NFC for now, but this will be used by swiftcall expansion.

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

8 years agoPreserve ExtParameterInfos into CGFunctionInfo.
John McCall [Fri, 11 Mar 2016 04:30:31 +0000 (04:30 +0000)]
Preserve ExtParameterInfos into CGFunctionInfo.

As part of this, make the function-arrangement interfaces
a little simpler and more semantic.

NFC.

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

8 years agoAdd doxygen comments to avxintrin.h's intrinsics.
Ekaterina Romanova [Fri, 11 Mar 2016 00:05:54 +0000 (00:05 +0000)]
Add doxygen comments to avxintrin.h's intrinsics.
Only around 25% of the intrinsics in this file are documented here. The patches for the other half will be sent out later.

The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

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

8 years agoPrint strict in Availability attribute when it is on.
Manman Ren [Thu, 10 Mar 2016 23:54:12 +0000 (23:54 +0000)]
Print strict in Availability attribute when it is on.

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

8 years agoAdd has_feature objc_class_property.
Manman Ren [Thu, 10 Mar 2016 23:51:03 +0000 (23:51 +0000)]
Add has_feature objc_class_property.

rdar://23891898

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

8 years agolibclang python bindings: Fix for bug 26394
Jonathan Coe [Thu, 10 Mar 2016 23:29:45 +0000 (23:29 +0000)]
libclang python bindings: Fix for bug 26394

Summary:
https://llvm.org/bugs/show_bug.cgi?id=26394 reports that clang's python bindings tests are failing.

I can confirm that the bug exists and that the proposed fix is good.

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

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

8 years agoReenable asm-errors.c
Nico Weber [Thu, 10 Mar 2016 22:40:02 +0000 (22:40 +0000)]
Reenable asm-errors.c

r134811 made the test pass and reenabled it, but r134831
accidentally disabled it again due to a bad merge.

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

8 years agoAdd test for r263138.
Richard Smith [Thu, 10 Mar 2016 19:22:21 +0000 (19:22 +0000)]
Add test for r263138.

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

8 years agoAdd TreatUnavailableAsInvalid for the verification-only mode in InitListChecker.
Manman Ren [Thu, 10 Mar 2016 18:53:19 +0000 (18:53 +0000)]
Add TreatUnavailableAsInvalid for the verification-only mode in InitListChecker.

Given the following test case:
typedef struct {
  const char *name;
  id field;
} Test9;
extern void doSomething(Test9 arg);
void test9() {
  Test9 foo2 = {0, 0};
  doSomething(foo2);
}
With a release compiler, we don't emit any message and silently ignore the
variable "foo2". With an assert compiler, we get an assertion failure.

The root cause —————————————
Back in r140457 we gave InitListChecker a verification-only mode, and will use
CanUseDecl instead of DiagnoseUseOfDecl for verification-only mode.

These two functions handle unavailable issues differently:
In Sema::CanUseDecl, we say the decl is invalid when the Decl is unavailable and
the current context is available.

In Sema::DiagnoseUseOfDecl, we say the decl is usable by ignoring the return
code of DiagnoseAvailabilityOfDecl

So with an assert build, we will hit an assertion in diagnoseListInit
assert(DiagnoseInitList.HadError() &&
       "Inconsistent init list check result.");

The fix -------------------
If we follow what is implemented in CanUseDecl and treat Decls with
unavailable issues as invalid, the variable decl of “foo2” will be marked as
invalid. Since unavailable checking is processed in delayed diagnostics
(r197627), we will silently ignore the diagnostics when we find out that
the variable decl is invalid.

We add a flag "TreatUnavailableAsInvalid" for the verification-only mode.
For overload resolution, we want to say decls with unavailable issues are
invalid; but for everything else, we should say they are valid and
emit diagnostics. Depending on the value of the flag, CanUseDecl
can return different values for unavailable issues.

rdar://23557300
Differential Revision: http://reviews.llvm.org/D15314

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

8 years agoMake remaining ImplicitFallthrough warning DefaultIgnore.
Nico Weber [Thu, 10 Mar 2016 18:42:37 +0000 (18:42 +0000)]
Make remaining ImplicitFallthrough warning DefaultIgnore.

Follow-up to r262881, which caused this to fire more often.

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

8 years agoUpdated SSE3 builtin tests to more closely match the llvm fast-isel equivalent tests
Simon Pilgrim [Thu, 10 Mar 2016 14:46:49 +0000 (14:46 +0000)]
Updated SSE3 builtin tests to more closely match the llvm fast-isel equivalent tests

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

8 years agoAdded note to SSE4a builtins about keeping in sync with llvm tests
Simon Pilgrim [Thu, 10 Mar 2016 14:44:32 +0000 (14:44 +0000)]
Added note to SSE4a builtins about keeping in sync with llvm tests

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

8 years agoUpdated SSSE3 builtin tests to more closely match the llvm fast-isel equivalent tests
Simon Pilgrim [Thu, 10 Mar 2016 14:42:17 +0000 (14:42 +0000)]
Updated SSSE3 builtin tests to more closely match the llvm fast-isel equivalent tests

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

8 years agoMinor Wdocumentation fix. NFCI.
Simon Pilgrim [Thu, 10 Mar 2016 14:16:36 +0000 (14:16 +0000)]
Minor Wdocumentation fix. NFCI.

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

8 years agoCorrecting an attribute documentation generation error by giving the abi_tag attribut...
Aaron Ballman [Thu, 10 Mar 2016 13:08:22 +0000 (13:08 +0000)]
Correcting an attribute documentation generation error by giving the abi_tag attribute a documentation category.

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

8 years agoAdd doxygen comments to xmmintrin.h's intrinsics.
Ekaterina Romanova [Thu, 10 Mar 2016 09:37:04 +0000 (09:37 +0000)]
Add doxygen comments to xmmintrin.h's intrinsics.
Only half of the intrinsics in this file is documented here. The patch for the other half will be sent out later.

The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

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

8 years agoARM: fix arm_neon_intrinsics.c and re-enable.
Tim Northover [Thu, 10 Mar 2016 04:39:45 +0000 (04:39 +0000)]
ARM: fix arm_neon_intrinsics.c and re-enable.

It turns out I'd never actually tested my recent change because it was
gated on long-tests. Failure ensued.

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

8 years agoDisable failing test and fix RUN line.
Richard Trieu [Thu, 10 Mar 2016 04:04:12 +0000 (04:04 +0000)]
Disable failing test and fix RUN line.

See https://llvm.org/bugs/show_bug.cgi?id=26894 for details.  This change
fixes the incorrect flags to Clang and the piping issue.  It also disables
the FileCheck portion of the test, which is currently failing.

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

8 years agoFix false positives for for-loop-analysis warning
Steven Wu [Thu, 10 Mar 2016 02:02:48 +0000 (02:02 +0000)]
Fix false positives for for-loop-analysis warning

Summary:
For PseudoObjectExpr, the DeclMatcher need to search only all the semantics
but also need to search pass OpaqueValueExpr for all potential uses for the
Decl.

Reviewers: thakis, rtrieu, rjmccall, doug.gregor

Subscribers: xazax.hun, rjmccall, doug.gregor, cfe-commits

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

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

8 years agoEmitCXXStructorCall -> EmitCXXDestructorCall. NFC.
Alexey Samsonov [Thu, 10 Mar 2016 00:20:37 +0000 (00:20 +0000)]
EmitCXXStructorCall -> EmitCXXDestructorCall. NFC.

This function is only used in Microsoft ABI and only to emit
destructors. Rename/simplify it accordingly.

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

8 years agoRemove unused function arguments. NFC.
Alexey Samsonov [Thu, 10 Mar 2016 00:20:33 +0000 (00:20 +0000)]
Remove unused function arguments. NFC.

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

8 years ago[Modules] Add stdatomic to the list of builtin headers
Ben Langmuir [Wed, 9 Mar 2016 23:31:34 +0000 (23:31 +0000)]
[Modules] Add stdatomic to the list of builtin headers

Since it's provided by the compiler. This allows a system module map
file to declare a module for it.

No test change for cstd.m, since stdatomic.h doesn't function without a
relatively complete stdint.h and stddef.h, which tests using this module
don't provide.

rdar://problem/24931246

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

8 years ago[modules] Simplify code logic. NFC.
Davide Italiano [Wed, 9 Mar 2016 21:09:51 +0000 (21:09 +0000)]
[modules] Simplify code logic. NFC.

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

8 years agoARM & AArch64: fix IR-converted tests.
Tim Northover [Wed, 9 Mar 2016 20:06:10 +0000 (20:06 +0000)]
ARM & AArch64: fix IR-converted tests.

My script was converting %a0 to [[A]]0 if it had seen %a defined before %a0.
Oops.

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

8 years agoNFC fix documentation build by rL263015
Dmitry Polukhin [Wed, 9 Mar 2016 19:39:16 +0000 (19:39 +0000)]
NFC fix documentation build by rL263015

This time I hope it will fix the build for real.

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

8 years ago[PPC] FE support for generating VSX [negated] absolute value instructions
Kit Barton [Wed, 9 Mar 2016 19:28:31 +0000 (19:28 +0000)]
[PPC] FE support for generating VSX [negated] absolute value instructions

Includes new built-in, conversion of built-in to target-independent intrinsic
and update in the header file. Tests are also updated. There is a second part in
the backend for which I will post a separate code-review. BACKEND PART SHOULD BE
COMMITTED FIRST.

Phabricator: http://reviews.llvm.org/D17816

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

8 years agoARM & AArch64: convert asm tests to LLVM IR and restrict optimizations.
Tim Northover [Wed, 9 Mar 2016 18:54:42 +0000 (18:54 +0000)]
ARM & AArch64: convert asm tests to LLVM IR and restrict optimizations.

This is mostly a one-time autoconversion of tests that checked assembly after
"-Owhatever" compiles to only run "opt -mem2reg" and check the assembly. This
should make them much more stable to changes in LLVM so they won't break on
unrelated changes.

"opt -mem2reg" is a compromise designed to increase the readability of tests
that check dataflow, while minimizing dependency on LLVM. Hopefully mem2reg is
stable enough that no surpises will come along.

Should address http://llvm.org/PR26815.

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

8 years agoUse an explicit instantiation to work around delayed template parsing for MSVC-built...
Aaron Ballman [Wed, 9 Mar 2016 18:07:17 +0000 (18:07 +0000)]
Use an explicit instantiation to work around delayed template parsing for MSVC-built bots.

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

8 years agoAArch64: remove a couple more tests already covered elsewhere.
Tim Northover [Wed, 9 Mar 2016 18:00:06 +0000 (18:00 +0000)]
AArch64: remove a couple more tests already covered elsewhere.

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

8 years agoSpeculative fix for this test case (the test doesn't run on my typical build environm...
Aaron Ballman [Wed, 9 Mar 2016 17:34:16 +0000 (17:34 +0000)]
Speculative fix for this test case (the test doesn't run on my typical build environment).

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

8 years agoReleaseNotes: update 'you may prefer' link to 3.8
Hans Wennborg [Wed, 9 Mar 2016 17:26:46 +0000 (17:26 +0000)]
ReleaseNotes: update 'you may prefer' link to 3.8

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

8 years agoAdding new AST matchers for: addrLabelExpr, atomicExpr, binaryConditionalOperator...
Aaron Ballman [Wed, 9 Mar 2016 17:11:51 +0000 (17:11 +0000)]
Adding new AST matchers for: addrLabelExpr, atomicExpr, binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr.

Patch by Aleksei Sidorin.

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

8 years agoImplement support for [[maybe_unused]] in C++1z that is based off existing support...
Aaron Ballman [Wed, 9 Mar 2016 16:48:08 +0000 (16:48 +0000)]
Implement support for [[maybe_unused]] in C++1z that is based off existing support for unused, and treat it as an extension pre-C++1z. This also means extending the existing unused attribute so that it can be placed on an enum and enumerator, in addition to the other subjects.

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

8 years agoNFC fix documentation build by rL263015
Dmitry Polukhin [Wed, 9 Mar 2016 16:19:04 +0000 (16:19 +0000)]
NFC fix documentation build by rL263015

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

8 years ago[OpenMP] Add support for multidimensional array sections in map clause SEMA.
Samuel Antao [Wed, 9 Mar 2016 15:46:05 +0000 (15:46 +0000)]
[OpenMP] Add support for multidimensional array sections in map clause SEMA.

Summary: In some cases it can be proved statically that multidimensional array section refer to contiguous storage and can therefore be allowed in a map clause. This patch adds support for those cases in SEMA.

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

Subscribers: cfe-commits, fraggamuffin, caomhin

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

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

8 years ago[GCC] PR23529 Sema part of attrbute abi_tag support
Dmitry Polukhin [Wed, 9 Mar 2016 15:30:53 +0000 (15:30 +0000)]
[GCC] PR23529 Sema part of attrbute abi_tag support

Original patch by Stefan Bühler http://reviews.llvm.org/D12834

Difference between original and this one:
- fixed all comments in original code review
- added more tests, all new diagnostics now covered by tests
- moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes
  where they actually may work as designed
- clang-format + other stylistic changes

Mangle part will be sent for review as a separate patch.

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

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

8 years agoFixing wrong header title name.
Michael Zuckerman [Wed, 9 Mar 2016 11:26:45 +0000 (11:26 +0000)]
Fixing wrong header title name.

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

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

8 years agoPacify gcc's parenthesis warning, which doesn't realize that parens don't matter...
Manuel Klimek [Wed, 9 Mar 2016 10:06:45 +0000 (10:06 +0000)]
Pacify gcc's parenthesis warning, which doesn't realize that parens don't matter here.

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

8 years ago[OPENMP 4.5] Codegen for data members in 'linear' clause
Alexey Bataev [Wed, 9 Mar 2016 09:49:09 +0000 (09:49 +0000)]
[OPENMP 4.5] Codegen for data members in 'linear' clause

OpenMP 4.5 allows privatization of non-static data members in OpenMP
constructs. Patch adds proper codegen support for data members in
'linear' clause

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

8 years ago[OPENMP 4.5] Codegen for data members in 'linear' clause.
Alexey Bataev [Wed, 9 Mar 2016 09:49:00 +0000 (09:49 +0000)]
[OPENMP 4.5] Codegen for data members in 'linear' clause.

OpenMP 4.5 allows to use data members in private clauses. Patch adds
codegen support for 'linear' clause.

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

8 years agoAccept absolute paths in the -fuse-ld option.
Peter Zotov [Wed, 9 Mar 2016 05:18:16 +0000 (05:18 +0000)]
Accept absolute paths in the -fuse-ld option.

This patch extends the -fuse-ld option to accept a full path to an executable
and use it verbatim to invoke the linker. There are generally two reasons
to desire this.

The first reason relates to the sad truth is that Clang is retargetable,
Binutils are not.

While any Clang from a binary distribution is sufficient to compile code
for a wide range of architectures and prefixed BFD linkers (e.g.
installed as /usr/bin/arm-none-linux-gnueabi-ld) as well as cross-compiled
libc's (for non-bare-metal targets) are widely available, including on all
Debian derivatives, it is impossible to use them together because
the -fuse-ld= option allows to specify neither a linker prefix nor
a full path to one.

The second reason is linker development, both when porting existing linkers
to new architectures and when working on a new linker such as LLD.

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

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

8 years ago[index] Add a message for the assertion, NFC.
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:53:12 +0000 (02:53 +0000)]
[index] Add a message for the assertion, NFC.

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

8 years ago[index] libclang: Make sure to treat forward ObjC protocols as ObjCProtocolRef declar...
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:12:46 +0000 (02:12 +0000)]
[index] libclang: Make sure to treat forward ObjC protocols as ObjCProtocolRef declarations, and fix related crash.

rdar://25035376

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

8 years ago[index] Fix assertion hit when indexing re-declarations of built-in functions.
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:12:40 +0000 (02:12 +0000)]
[index] Fix assertion hit when indexing re-declarations of built-in functions.

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

8 years agoReadd testcase accidentally removed in r262888.
Richard Smith [Wed, 9 Mar 2016 00:12:38 +0000 (00:12 +0000)]
Readd testcase accidentally removed in r262888.

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

8 years ago[Modules] Modernize, use range-based loops.
Davide Italiano [Tue, 8 Mar 2016 23:58:08 +0000 (23:58 +0000)]
[Modules] Modernize, use range-based loops.

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

8 years agoFix crash in access check for aggregate initialization of base classes. It's
Richard Smith [Tue, 8 Mar 2016 23:17:35 +0000 (23:17 +0000)]
Fix crash in access check for aggregate initialization of base classes. It's
not obvious how to access-check these, so pick a conservative rule until we get
feedback from CWG.

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

8 years agoFix -Werror build.
Richard Smith [Tue, 8 Mar 2016 23:16:16 +0000 (23:16 +0000)]
Fix -Werror build.

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

8 years agoAArch64: remove tests of intrinsics completely duplicated elsewhere.
Tim Northover [Tue, 8 Mar 2016 23:10:58 +0000 (23:10 +0000)]
AArch64: remove tests of intrinsics completely duplicated elsewhere.

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

8 years agoP0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes...
Richard Smith [Tue, 8 Mar 2016 22:17:41 +0000 (22:17 +0000)]
P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members.

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

8 years agoSilence duplicate diagnostics because parsing of a standards-based attribute triggers...
Aaron Ballman [Tue, 8 Mar 2016 21:31:32 +0000 (21:31 +0000)]
Silence duplicate diagnostics because parsing of a standards-based attribute triggers parsing diagnostics that may also be picked up during semantic analysis.

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

8 years agoTurning on the /bigobj flag for two more files that will not link with MSVC 2015...
Aaron Ballman [Tue, 8 Mar 2016 16:34:37 +0000 (16:34 +0000)]
Turning on the /bigobj flag for two more files that will not link with MSVC 2015 Win64 Debug due to the section limit.

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

8 years agoAdd Visual Studio native visualizers for several Clang types
Mike Spertus [Tue, 8 Mar 2016 16:14:23 +0000 (16:14 +0000)]
Add Visual Studio native visualizers for several Clang types

This is one of a series of changes to improve the MSVC visualization of Clang types.
This one focuses on Record and SubstTemplateTypeParmType meaning that, for example,
a TemplateArgumentLoc no longer displays incomprehensibly in the locals window as

  {Argument={DeclArg={Kind=1 QT=0x033acb00 D=0xcccccccc {DeclType=???}}...

but instead much more usefully as

  Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))}

Additional types and improvements will be made in subsequent commits

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

8 years agoBump libclang API version after r262318
Kevin Funk [Tue, 8 Mar 2016 10:34:23 +0000 (10:34 +0000)]
Bump libclang API version after r262318

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

8 years agoSema: Methods in unavailable classes are unavailable
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 10:28:52 +0000 (10:28 +0000)]
Sema: Methods in unavailable classes are unavailable

Similar to the template cases in r262050, when a C++ method in an
unavailable struct/class calls unavailable API, don't diagnose an error.
I.e., this case was failing:

    void foo() __attribute__((unavailable));
    struct __attribute__((unavailable)) A {
      void bar() { foo(); }
    };

Since A is unavailable, A::bar is allowed to call foo.  However, we were
emitting a diagnostic here.  This commit checks up the context chain
from A::bar, in a manner inspired by SemaDeclAttr.cpp:isDeclUnavailable.

I expected to find other related issues but failed to trigger them:

- I wondered if DeclBase::getAvailability should check for
  `TemplateDecl` instead of `FunctionTemplateDecl`, but I couldn't find
  a way to trigger this.  I left behind a few extra tests to make sure
  we don't regress.

- I wondered if Sema::isFunctionConsideredUnavailable should be
  symmetric, checking up the context chain of the callee (this commit
  only checks up the context chain of the caller).  However, I couldn't
  think of a testcase that didn't require first referencing the
  unavailable type; this, we already diagnose.

rdar://problem/25030656

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

8 years agoSema: Treat 'strict' availability flag like unavailable
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 06:12:54 +0000 (06:12 +0000)]
Sema: Treat 'strict' availability flag like unavailable

This is a follow-up to r261512, which made the 'strict' availability
attribute flag behave like 'unavailable'.  However, that fix was
insufficient.  The following case would (erroneously) error when the
deployment target was older than 10.9:

    struct __attribute__((availability(macosx,strict,introduced=10.9))) A;
    __attribute__((availability(macosx,strict,introduced=10.9))) void f(A*);

The use of A* in the argument list for f is valid here, since f and A
have the same availability.

The fix is to return AR_Unavailable from DeclBase::getAvailability
instead of AR_NotYetIntroduced.  This also reverts the special handling
added in r261163, instead relying on the well-tested logic for
AR_Unavailable.

rdar://problem/23791325

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

8 years agoAdd doxygen comments to bmiintrin.h's intrinsics.
Ekaterina Romanova [Tue, 8 Mar 2016 01:36:59 +0000 (01:36 +0000)]
Add doxygen comments to bmiintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

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