]> granicus.if.org Git - clang/log
clang
10 years agoImplement DR329. We already did the right thing here in C++98 mode, but r104014
Richard Smith [Mon, 3 Feb 2014 02:37:59 +0000 (02:37 +0000)]
Implement DR329. We already did the right thing here in C++98 mode, but r104014
(which implemented the DR) was disabled in C++11.

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

10 years agoTests for DR321-330.
Richard Smith [Mon, 3 Feb 2014 02:13:49 +0000 (02:13 +0000)]
Tests for DR321-330.

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

10 years agoTests for DR301-320.
Richard Smith [Mon, 3 Feb 2014 01:23:27 +0000 (01:23 +0000)]
Tests for DR301-320.

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

10 years agoMS ABI: Fix some layout tests
David Majnemer [Mon, 3 Feb 2014 00:29:57 +0000 (00:29 +0000)]
MS ABI: Fix some layout tests

Some lines intended to be used for testing x86_64 ABI compatibility were
not firing because lines were annotated with the wrong FileCheck prefix:
X64 vs x64

N.B. Changes beyond just changing x64 to X64 were made, presumably
because other parts of the layout engine have changed.  I've verified
the changes to make sure that MSVC creates a compatible layout.

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

10 years agoHandle O32/N64 ABIs for NetBSD/MIPS64. From Matt Thomas.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:59:16 +0000 (22:59 +0000)]
Handle O32/N64 ABIs for NetBSD/MIPS64. From Matt Thomas.

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

10 years agoReplace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
Joerg Sonnenberger [Sun, 2 Feb 2014 22:54:18 +0000 (22:54 +0000)]
Replace hasMipsN32ABIArg with hasMipsABIArg in preparation of o32/n64
support.

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

10 years agoUse a switch for the emulation handling.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:50:34 +0000 (22:50 +0000)]
Use a switch for the emulation handling.

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

10 years agoHandle compat support for EABI/old APCS compatibility on NetBSD/ARM.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:47:37 +0000 (22:47 +0000)]
Handle compat support for EABI/old APCS compatibility on NetBSD/ARM.

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

10 years agoReplace hasMipsN32ABIArg by hasMipsABIArg to make it easier to add
Joerg Sonnenberger [Sun, 2 Feb 2014 22:40:33 +0000 (22:40 +0000)]
Replace hasMipsN32ABIArg by hasMipsABIArg to make it easier to add
support for o32 and n64.

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

10 years agoPass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:37:14 +0000 (22:37 +0000)]
Pass down -mcpu for external assembler in thumb mode, too. From Matt Thomas.

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

10 years agoMinor formatting improvement.
Joerg Sonnenberger [Sun, 2 Feb 2014 22:36:13 +0000 (22:36 +0000)]
Minor formatting improvement.

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

10 years agoTest pre-defined macros of aarch64-netbsd.
Joerg Sonnenberger [Sun, 2 Feb 2014 21:55:32 +0000 (21:55 +0000)]
Test pre-defined macros of aarch64-netbsd.

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

10 years agoNetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
Joerg Sonnenberger [Sun, 2 Feb 2014 21:55:10 +0000 (21:55 +0000)]
NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
__BIG_ENDIAN__ as on other architectures.

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

10 years agoclang-format: Let chromium style inherit google style's javascript tweaks.
Nico Weber [Sun, 2 Feb 2014 20:50:45 +0000 (20:50 +0000)]
clang-format: Let chromium style inherit google style's javascript tweaks.

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

10 years ago[CMake] Move cmake_minimum_required(2.8.8) at the top.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:59:36 +0000 (16:59 +0000)]
[CMake] Move cmake_minimum_required(2.8.8) at the top.

Suggested by Stephen Kelly.

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

10 years agoclang/CMakeLists.txt: Untabify.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:07 +0000 (16:46 +0000)]
clang/CMakeLists.txt: Untabify.

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

10 years agoclang/lib/ASTMatchers/Dynamic/CMakeLists.txt: redundant
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:03 +0000 (16:46 +0000)]
clang/lib/ASTMatchers/Dynamic/CMakeLists.txt: redundant

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

10 years agoSema: Reject templates in all extern "C" contexts.
Benjamin Kramer [Sun, 2 Feb 2014 16:35:43 +0000 (16:35 +0000)]
Sema: Reject templates in all extern "C" contexts.

Otherwise we'd accept them if the LinkageDecl was not the direct
parent DeclContext. PR17968.

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

10 years agoReport a correct end location for nameless parameters.
Benjamin Kramer [Sun, 2 Feb 2014 15:28:46 +0000 (15:28 +0000)]
Report a correct end location for nameless parameters.

Ranges before:
void test(void (*)(int), int, float);
          ~~~~~~~~~~~~~  ~~~~ ~~~~~~

Ranges after:
void test(void (*)(int), int, float);
          ~~~~~~~~~~~~~  ~~~  ~~~~~

This does not change the actual location of the ParmVarDecl, it still
points to the location where the name would be. PR17970.

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

10 years agoRevert r200555, r200545.
Evgeniy Stepanov [Sun, 2 Feb 2014 10:39:45 +0000 (10:39 +0000)]
Revert r200555, r200545.

These changes make it impossible to use ARM EHABI for stack unwinding without
enabling exceptions and break AddressSanitizer on ARM.

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

10 years ago[Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert...
Argyrios Kyrtzidis [Sun, 2 Feb 2014 05:26:43 +0000 (05:26 +0000)]
[Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert its behavior for C++.

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

10 years agoFix an assertion failure when building for the iOS simulator. rdar://15959009
Bob Wilson [Sat, 1 Feb 2014 21:06:21 +0000 (21:06 +0000)]
Fix an assertion failure when building for the iOS simulator. rdar://15959009

When building for i386 or x86_64 with IPHONEOS_DEPLOYMENT_TARGET set in the
environment, the toolchain correctly recognizes that the target platform is
the iOS simulator. The code in Darwin::addMinVersionArgs was not updated for
svn 197148, where isTargetIPhoneOS() was widely replaced by isTargetIOSBased().
This is kind of a strange case, though, because we probably ought to be
passing -ios_simulator_version_min to the linker, but according to the FIXME
in the code, we intentionally avoid that unless the -mios-simulator-version-min
option was used. I don't know whether it is safe to change that yet, so
for now, I am just fixing the assertion failure.

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

10 years agoRemove local type use in template.
Reid Kleckner [Sat, 1 Feb 2014 00:23:22 +0000 (00:23 +0000)]
Remove local type use in template.

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

10 years ago[ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects
Reid Kleckner [Sat, 1 Feb 2014 00:04:45 +0000 (00:04 +0000)]
[ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects

When a non-trivial parameter is present, clang now gathers up all the
parameters that lack inreg and puts them into a packed struct.  MSVC
always aligns each parameter to 4 bytes and no more, so this is a pretty
simple struct to lay out.

On win64, non-trivial records are passed indirectly.  Prior to this
change, clang was incorrectly using byval on win64.

I'm able to self-host a working clang with this change and additional
LLVM patches.

Reviewers: rsmith

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

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

10 years ago[ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32
Reid Kleckner [Fri, 31 Jan 2014 22:54:50 +0000 (22:54 +0000)]
[ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32

This fixes PR15768, where the sret parameter and the 'this' parameter
are in the wrong order.

Instance methods compiled by MSVC never return records in registers,
they always return indirectly through an sret pointer.  That sret
pointer always comes after the 'this' parameter, for both __cdecl and
__thiscall methods.

Unfortunately, the same is true for other calling conventions, so we'll
have to change the overall approach here relatively soon.

Reviewers: rsmith

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

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

10 years ago[ms-cxxabi] Raise aggregate memptr alignment to 8 for x86_32
Reid Kleckner [Fri, 31 Jan 2014 22:28:50 +0000 (22:28 +0000)]
[ms-cxxabi] Raise aggregate memptr alignment to 8 for x86_32

With this change, we give different results for __alignof than MSVC, but
our record layout is compatible.

Some data member pointers also now have a size that is not a multiple of
their alignment.

Fixes PR18618.

Reviewers: majnemer

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

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

10 years agoFix comment typo in test.
Richard Smith [Fri, 31 Jan 2014 22:28:08 +0000 (22:28 +0000)]
Fix comment typo in test.

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

10 years agoTrack the currently-being-built submodule inside the preprocessor (rather than
Richard Smith [Fri, 31 Jan 2014 20:47:44 +0000 (20:47 +0000)]
Track the currently-being-built submodule inside the preprocessor (rather than
just storing a flag indicating if there was one), and include it in the 'end of
module' annotation. No functionality change.

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

10 years agoMS Intrin.h: implement __cpuidex and simplify __cpuid
Hans Wennborg [Fri, 31 Jan 2014 19:44:55 +0000 (19:44 +0000)]
MS Intrin.h: implement __cpuidex and simplify __cpuid

The two identical implementations of __cpuid for X86 / X86_64 were
leftovers from my first iteration on the patch that implemented it.

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

10 years ago[CMake] arcmt-test: Reorganize link libraries with *actually referenced* libs from...
NAKAMURA Takumi [Fri, 31 Jan 2014 18:09:49 +0000 (18:09 +0000)]
[CMake] arcmt-test: Reorganize link libraries with *actually referenced* libs from arcmt-test.cpp.

arcmt-test doesn't depend on llvm codegen.

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

10 years agoLast option on -fexception for arm-disable-ehabi
Renato Golin [Fri, 31 Jan 2014 16:19:26 +0000 (16:19 +0000)]
Last option on -fexception for arm-disable-ehabi

Previous commit would have a following flag overriding the behaviour
and not taken care of.

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

10 years agoConnect -fno-exceptions to -arm-disable-ehabi
Renato Golin [Fri, 31 Jan 2014 14:13:20 +0000 (14:13 +0000)]
Connect -fno-exceptions to -arm-disable-ehabi

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

10 years agoclang-format: (JavaScript) Don't crash on empty string literals.
Daniel Jasper [Fri, 31 Jan 2014 12:49:42 +0000 (12:49 +0000)]
clang-format: (JavaScript) Don't crash on empty string literals.

Before, this would lead to a crash:
  f('', true);

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

10 years agoAdd tests for ARM RT library name
Renato Golin [Fri, 31 Jan 2014 12:21:55 +0000 (12:21 +0000)]
Add tests for ARM RT library name

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

10 years agoARM RT libs with generic name
Renato Golin [Fri, 31 Jan 2014 11:47:28 +0000 (11:47 +0000)]
ARM RT libs with generic name

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

10 years ago[CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:15 +0000 (11:19 +0000)]
[CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.

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

10 years ago[CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:09 +0000 (11:19 +0000)]
[CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.

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

10 years ago[CMake] Prune stray entries in add_dependencies(). target_link_libraries() implies it.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:04 +0000 (11:19 +0000)]
[CMake] Prune stray entries in add_dependencies(). target_link_libraries() implies it.

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

10 years ago[sanitizer] update the list of supported platforms in the docs
Kostya Serebryany [Fri, 31 Jan 2014 10:49:34 +0000 (10:49 +0000)]
[sanitizer] update the list of supported platforms in the docs

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

10 years agoARM & AArch64: unify the rest of the completely shared NEON implementations
Tim Northover [Fri, 31 Jan 2014 10:46:52 +0000 (10:46 +0000)]
ARM & AArch64: unify the rest of the completely shared NEON implementations

This should be the last routine patch: AArch64 does still delegate to
EmitARMBuiltinExpr, but the remaining instances have complications of
one sort or another so some more cunning thought will be needed.

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

10 years agoARM & AArch64: another block of miscellaneous NEON sharing.
Tim Northover [Fri, 31 Jan 2014 10:46:49 +0000 (10:46 +0000)]
ARM & AArch64: another block of miscellaneous NEON sharing.

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

10 years agoARM & AArch64: move shared vld/vst intrinsics to common implementation.
Tim Northover [Fri, 31 Jan 2014 10:46:45 +0000 (10:46 +0000)]
ARM & AArch64: move shared vld/vst intrinsics to common implementation.

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

10 years agoARM & AArch64: more instructions into common block
Tim Northover [Fri, 31 Jan 2014 10:46:41 +0000 (10:46 +0000)]
ARM & AArch64: more instructions into common block

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

10 years agoARM & AArch64: merge another NEON block completely.
Tim Northover [Fri, 31 Jan 2014 10:46:36 +0000 (10:46 +0000)]
ARM & AArch64: merge another NEON block completely.

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

10 years ago[Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which...
Argyrios Kyrtzidis [Fri, 31 Jan 2014 07:51:32 +0000 (07:51 +0000)]
[Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used
by some projects in their null macro.

rdar://15925483

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

10 years ago[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processin...
Alexey Bataev [Fri, 31 Jan 2014 05:15:34 +0000 (05:15 +0000)]
[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processing. (http://llvm-reviews.chandlerc.com/D2451)

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

10 years agoMake x86 Android default target CPUs compatible with GCC (http://llvm-reviews.chandle...
Alexey Bataev [Fri, 31 Jan 2014 04:07:13 +0000 (04:07 +0000)]
Make x86 Android default target CPUs compatible with GCC (http://llvm-reviews.chandlerc.com/D2655)

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

10 years agolibclang/Makefile: Reorder libraries.
NAKAMURA Takumi [Fri, 31 Jan 2014 01:39:31 +0000 (01:39 +0000)]
libclang/Makefile: Reorder libraries.

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

10 years agoDriver: Don't use DOS style paths on UNIX
David Majnemer [Fri, 31 Jan 2014 01:35:55 +0000 (01:35 +0000)]
Driver: Don't use DOS style paths on UNIX

We'd add, as a fallback, DOS style paths when using the driver using a
win32 triple.  On a UNIX-like platform, this isn't particularly helpful.

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

10 years agoFix autolinking when modules are imported in pch files
Ben Langmuir [Fri, 31 Jan 2014 01:06:56 +0000 (01:06 +0000)]
Fix autolinking when modules are imported in pch files

Add the ImportDecl to the set of interesting delcarations that are
deserialized eagerly when an AST file is loaded (rather than lazily like
most decls). This is required to get auto linking to work when there is
no explicit import in the main file. Also resolve a FIXME to rename
'ExternalDefinitions', since that is only one of the things that need eager
deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding
AST bitcode is also renamed.

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

10 years agoIntroduce Parser::completeExpression.
Peter Collingbourne [Thu, 30 Jan 2014 22:38:41 +0000 (22:38 +0000)]
Introduce Parser::completeExpression.

This function returns a list of completions for a given expression and
completion position.

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

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

10 years agoPR14995: Allow a dependent type as the second parameter of operator++ and
Richard Smith [Thu, 30 Jan 2014 22:24:05 +0000 (22:24 +0000)]
PR14995: Allow a dependent type as the second parameter of operator++ and
operator--, since it might instantiate as 'int' (or, if it's a pack, it
might instantiate as an empty pack).

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

10 years agoDon't produce a 'returning reference to local' warning if a lambda returns a
Richard Smith [Thu, 30 Jan 2014 22:05:38 +0000 (22:05 +0000)]
Don't produce a 'returning reference to local' warning if a lambda returns a
reference (or pointer) to a variable from the closure object or from the
surrounding function scope.

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

10 years agoRevert "Fix assertion failures on annot_* tokens in clang -E"
Ben Langmuir [Thu, 30 Jan 2014 21:50:18 +0000 (21:50 +0000)]
Revert "Fix assertion failures on annot_* tokens in clang -E"

This is causing a failure in the msan buildbot that I am having trouble
reproducing.  Reverting until I can figure out what went wrong.

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

10 years agoFix assertion failures on annot_* tokens in clang -E
Ben Langmuir [Thu, 30 Jan 2014 18:09:55 +0000 (18:09 +0000)]
Fix assertion failures on annot_* tokens in clang -E

In particular, #pragma clang __debug, and #include implicitly changed
into @import were causing assertion failures.

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

10 years agoARM & AArch64: extend shared NEON implementation to first block.
Tim Northover [Thu, 30 Jan 2014 14:48:01 +0000 (14:48 +0000)]
ARM & AArch64: extend shared NEON implementation to first block.

This extends the refactoring to the whole of the first block of
trivial correspondences (as a fairly arbitrary boundary).

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

10 years agoARM & AArch64: fully share NEON implementation of permutation intrinsics
Tim Northover [Thu, 30 Jan 2014 14:47:57 +0000 (14:47 +0000)]
ARM & AArch64: fully share NEON implementation of permutation intrinsics

As a starting point, this moves the CodeGen for NEON permutation
instructions (vtrn, vzip, vuzp) into a new shared function.

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

10 years agoARM & AArch64: share the BI__builtin_neon enum defs.
Tim Northover [Thu, 30 Jan 2014 14:47:51 +0000 (14:47 +0000)]
ARM & AArch64: share the BI__builtin_neon enum defs.

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

10 years agoclang-format: Support ObjC's NS_ENUMs.
Daniel Jasper [Thu, 30 Jan 2014 14:38:37 +0000 (14:38 +0000)]
clang-format: Support ObjC's NS_ENUMs.

Before:
  typedef NS_ENUM(NSInteger, MyType) {
      /// Information about someDecentlyLongValue.
      someDecentlyLongValue,
      /// Information about anotherDecentlyLongValue.
      anotherDecentlyLongValue,
      /// Information about aThirdDecentlyLongValue.
      aThirdDecentlyLongValue};

After:
  typedef NS_ENUM(NSInteger, MyType) {
    /// Information about someDecentlyLongValue.
    someDecentlyLongValue,
    /// Information about anotherDecentlyLongValue.
    anotherDecentlyLongValue,
    /// Information about aThirdDecentlyLongValue.
    aThirdDecentlyLongValue
  };

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

10 years agoUpdate debugging visualizers section.
Nikola Smiljanic [Thu, 30 Jan 2014 07:15:53 +0000 (07:15 +0000)]
Update debugging visualizers section.

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

10 years agoSPARCv9 supports atomic operations up to 64 bits.
Jakob Stoklund Olesen [Thu, 30 Jan 2014 04:48:04 +0000 (04:48 +0000)]
SPARCv9 supports atomic operations up to 64 bits.

Patch by Roman Divacky!

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

10 years agoDiagnose typedef names for linkage purposes that would change
John McCall [Thu, 30 Jan 2014 01:12:53 +0000 (01:12 +0000)]
Diagnose typedef names for linkage purposes that would change
a previously-computed linkage as an unsupportable error condition.

Per discussion on cfe-commits, this appears to be a
difficult-to-resolve flaw in our implementation approach;
we may pursue this as a language defect, but for now it's
better to diagnose it as unsupported than to produce
inconsistent results (or assertions).  Anything that we can
do to limit how often this diagnostic fires, such as the
changes in r200380, is probably for the best, though.

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

10 years agoActually test that the local static variable from my
John McCall [Thu, 30 Jan 2014 01:12:47 +0000 (01:12 +0000)]
Actually test that the local static variable from my
test in r200380 gets linkonce_odr linkage.

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

10 years agoUse an Itanium triple in DWARF debug info tests
Timur Iskhodzhanov [Thu, 30 Jan 2014 01:01:36 +0000 (01:01 +0000)]
Use an Itanium triple in DWARF debug info tests

This should fix the clang part of the breakage in r200340.

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

10 years agoObjective-C [IRGen]. Generator a tail call to objc_getProperty() in
Fariborz Jahanian [Thu, 30 Jan 2014 00:16:39 +0000 (00:16 +0000)]
Objective-C [IRGen]. Generator a tail call to objc_getProperty() in
synthesized getters for performance improvement.
// rdar://15884113

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

10 years agoConsolidating several table-generated files containing parser-related string switches...
Aaron Ballman [Wed, 29 Jan 2014 22:13:45 +0000 (22:13 +0000)]
Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.

No functional changes intended.

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

10 years agoSema: Diagnose improper application of inheritance keywords
David Majnemer [Wed, 29 Jan 2014 22:07:36 +0000 (22:07 +0000)]
Sema: Diagnose improper application of inheritance keywords

We would previously allow inappropriate inheritance keywords to appear
on class declarations.  We would also allow inheritance keywords on
templates which were not fully specialized; this was divergent from
MSVC.

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

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

10 years agoclang-format: More custom option fixes for protocol buffer files.
Daniel Jasper [Wed, 29 Jan 2014 18:52:43 +0000 (18:52 +0000)]
clang-format: More custom option fixes for protocol buffer files.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                               aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                               bbbbbbbbbbbbbbbb : BBBBBBBBBB
                             }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                              bbbbbbbbbbbbbbbb : BBBBBBBBBB}];

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

10 years agoclang-format: Fix formatting of custom proto options.
Daniel Jasper [Wed, 29 Jan 2014 18:43:40 +0000 (18:43 +0000)]
clang-format: Fix formatting of custom proto options.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                              aaaaaaaaaaaaaaaaa : AAAAAAAA
                            }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaa : AAAAAAAA}];

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

10 years agoCortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an update...
Artyom Skrobov [Wed, 29 Jan 2014 09:43:07 +0000 (09:43 +0000)]
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)

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

10 years agoFix crash on unmatched #endif's.
Manuel Klimek [Wed, 29 Jan 2014 08:49:02 +0000 (08:49 +0000)]
Fix crash on unmatched #endif's.

The following snippet would crash:
  #endif
  #if A

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

10 years agoShort-circuit a couple of queries (and avoid corrupting
John McCall [Wed, 29 Jan 2014 08:33:09 +0000 (08:33 +0000)]
Short-circuit a couple of queries (and avoid corrupting
the linkage cache) when type-checking static local
variables.

There's a very deep problem here where the linkage of
a declaration can suddenly massively change as soon as
it's given a typedef name; these fixes, while optimizations
in their own right, are really just targeted workarounds.

rdar://15928125

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

10 years agoExtensively comment bitfield layout, rearrange some
John McCall [Wed, 29 Jan 2014 07:53:44 +0000 (07:53 +0000)]
Extensively comment bitfield layout, rearrange some
code for legibility, and fix a bug with bitfields in packed
ms_structs.

rdar://15926990

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

10 years agoclang-cl: Better error message when trying to compile stdin (PR18640)
Hans Wennborg [Wed, 29 Jan 2014 01:04:40 +0000 (01:04 +0000)]
clang-cl: Better error message when trying to compile stdin (PR18640)

We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.

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

10 years agoFixing PR18430 by checking that the size of bitfields plus padding does not
Yunzhong Gao [Wed, 29 Jan 2014 00:09:16 +0000 (00:09 +0000)]
Fixing PR18430 by checking that the size of bitfields plus padding does not
grow into the following virtual base.

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

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

10 years agoA new conversion warning for when an Objective-C object literal is implicitly
Richard Trieu [Tue, 28 Jan 2014 23:40:26 +0000 (23:40 +0000)]
A new conversion warning for when an Objective-C object literal is implicitly
cast into a boolean true value.  This warning will catch code like:

if (@0) {}
if (@"foo") {}

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

10 years agoIntrin.h: include setjmp.h to get a jmp_buf definition
Hans Wennborg [Tue, 28 Jan 2014 23:01:59 +0000 (23:01 +0000)]
Intrin.h: include setjmp.h to get a jmp_buf definition

This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.

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

10 years agoIntrin.h: implement __rdtsc and __halt
Hans Wennborg [Tue, 28 Jan 2014 22:55:01 +0000 (22:55 +0000)]
Intrin.h: implement __rdtsc and __halt

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

10 years agoObjective-C. Fixes a bug where "new" family attribute
Fariborz Jahanian [Tue, 28 Jan 2014 22:46:29 +0000 (22:46 +0000)]
Objective-C. Fixes a bug where "new" family attribute
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://15919775

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

10 years agoObjective-C. provide legacy encoding of *id and *Class types
Fariborz Jahanian [Tue, 28 Jan 2014 20:41:15 +0000 (20:41 +0000)]
Objective-C. provide legacy encoding of *id and *Class types
instead of crashing.  // rdar://15824769.

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

10 years agoclang-format: Understand __attribute__s preceding parameter lists.
Daniel Jasper [Tue, 28 Jan 2014 20:13:43 +0000 (20:13 +0000)]
clang-format: Understand __attribute__s preceding parameter lists.

Before:
  ReturnType __attribute__((unused))
      function(int i);

After:
  ReturnType __attribute__((unused))
  function(int i);

This fixes llvm.org/PR18632.

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

10 years agoclang-format: Fix option formatting in protocol buffer files.
Daniel Jasper [Tue, 28 Jan 2014 18:51:11 +0000 (18:51 +0000)]
clang-format: Fix option formatting in protocol buffer files.

Before:
  optional int32 foo[ default = true, deprecated = true ];

After:
  optional int32 foo[default = true, deprecated = true];

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

10 years agoclang-format: Add support for a space after @property
Daniel Jasper [Tue, 28 Jan 2014 15:20:33 +0000 (15:20 +0000)]
clang-format: Add support for a space after @property

Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.

Change by Christian Legnitto. Thank you!

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

10 years ago[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.
Amara Emerson [Tue, 28 Jan 2014 10:56:36 +0000 (10:56 +0000)]
[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.

Arguments and return values must always be marshalled as for the base
AAPCS when the callee is a variadic function.

Patch by Oliver Stannard!

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

10 years ago[CMake] Apply llvm_update_compile_flags() to add_clang_library().
NAKAMURA Takumi [Tue, 28 Jan 2014 09:47:12 +0000 (09:47 +0000)]
[CMake] Apply llvm_update_compile_flags() to add_clang_library().

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

10 years ago[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.
NAKAMURA Takumi [Tue, 28 Jan 2014 09:43:16 +0000 (09:43 +0000)]
[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.

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

10 years agoClarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
Nick Lewycky [Tue, 28 Jan 2014 07:03:46 +0000 (07:03 +0000)]
Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!

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

10 years agoFix this test and don't run it in ASan bootstrap
Alexey Samsonov [Tue, 28 Jan 2014 06:59:32 +0000 (06:59 +0000)]
Fix this test and don't run it in ASan bootstrap

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

10 years agoTurn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)
Alexey Bataev [Tue, 28 Jan 2014 06:30:35 +0000 (06:30 +0000)]
Turn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)

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

10 years agoFix always-false conditional thinko in documentation.
Nick Lewycky [Tue, 28 Jan 2014 06:20:56 +0000 (06:20 +0000)]
Fix always-false conditional thinko in documentation.

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

10 years agoTest case for clobbers on cpuid in ms inline asm
Reid Kleckner [Tue, 28 Jan 2014 02:09:28 +0000 (02:09 +0000)]
Test case for clobbers on cpuid in ms inline asm

Tests r200279 in LLVM.

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

10 years agoRelaxing the alignment requirements for fields in a transparent_union. Emits the...
Aaron Ballman [Tue, 28 Jan 2014 01:47:34 +0000 (01:47 +0000)]
Relaxing the alignment requirements for fields in a transparent_union. Emits the diagnostic only when subsequent alignments are more strict than the alignment required by the first field.

Fixes PR15134

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

10 years agoApply the typo correction replacement location fix from r191450 to the
Kaelyn Uhrain [Tue, 28 Jan 2014 00:46:47 +0000 (00:46 +0000)]
Apply the typo correction replacement location fix from r191450 to the
case when correcting for too many arguments (r191450 had only fixed the
problem for when there were too few arguments). Also fix the underlining
for both cases.

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

10 years agoRemove dead code; MacroDirective's IsHidden flag is always false.
Richard Smith [Mon, 27 Jan 2014 23:54:39 +0000 (23:54 +0000)]
Remove dead code; MacroDirective's IsHidden flag is always false.

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

10 years agoReverting because reverting r200145.
Adrian Prantl [Mon, 27 Jan 2014 22:57:33 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root."

This reverts commit r200146.

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

10 years agoReverting because reverting r200145.
Adrian Prantl [Mon, 27 Jan 2014 22:57:30 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "clang-check: Unittests doesn't requires tools."

This reverts commit r200147.

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

10 years agoRumors of test_debuginfo's death are slightly exaggerated.
Adrian Prantl [Mon, 27 Jan 2014 22:50:20 +0000 (22:50 +0000)]
Rumors of test_debuginfo's death are slightly exaggerated.
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""

This reverts commit r200145.

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

10 years agoAnother test for patch for // rdar://15890251
Fariborz Jahanian [Mon, 27 Jan 2014 22:44:17 +0000 (22:44 +0000)]
Another test for patch for // rdar://15890251

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

10 years agoTemporarily disable test that fails on Mac OS X 10.9.
Bob Wilson [Mon, 27 Jan 2014 22:43:21 +0000 (22:43 +0000)]
Temporarily disable test that fails on Mac OS X 10.9.

PR18322. This test will be reenabled when the SDK gets fixed. In the meantime,
it is pretty disruptive to have this test keep failing.

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

10 years agoObjectiveC. Fixes a bug in recognition of an ivar
Fariborz Jahanian [Mon, 27 Jan 2014 22:27:43 +0000 (22:27 +0000)]
ObjectiveC. Fixes a bug in recognition of an ivar
backing a property resulting in bogus warning.
// rdar://15890251

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