]> granicus.if.org Git - clang/log
clang
10 years agoFix -Wsign-compare warning.
Jordan Rose [Tue, 4 Mar 2014 17:45:43 +0000 (17:45 +0000)]
Fix -Wsign-compare warning.

No functionality change.

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

10 years ago[C++11] Make StoredDeclsList move-only.
Benjamin Kramer [Tue, 4 Mar 2014 16:42:46 +0000 (16:42 +0000)]
[C++11] Make StoredDeclsList move-only.

It is only moved when a StoredDeclsMap grows.

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

10 years ago[Modules] Update to reflect the move of CFG.h to the IR library in LLVM
Chandler Carruth [Tue, 4 Mar 2014 11:46:22 +0000 (11:46 +0000)]
[Modules] Update to reflect the move of CFG.h to the IR library in LLVM
r202827.

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

10 years ago[Modules] Update to reflect ValueHandle moving to the IR library in LLVM
Chandler Carruth [Tue, 4 Mar 2014 11:18:19 +0000 (11:18 +0000)]
[Modules] Update to reflect ValueHandle moving to the IR library in LLVM
r202821.

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

10 years ago[Modules] Update to reflect the move of CallSite into the IR library in
Chandler Carruth [Tue, 4 Mar 2014 11:02:08 +0000 (11:02 +0000)]
[Modules] Update to reflect the move of CallSite into the IR library in
LLVM r202816.

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

10 years ago[cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
Chandler Carruth [Tue, 4 Mar 2014 10:05:20 +0000 (10:05 +0000)]
[cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
a missing include from CLog.h.

CLog.h referenced most of the core libclang types but never directly
included Index.h that provides them. Previously it got lucky and other
headers were always included first but with the sorting it ended up
first in one case and stopped compiling. Adding the Index.h include
fixes it right up.

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

10 years agoWe now require Visual C++ 2012 (MSVC_VERSION = 1700) or later to build LLVM.
Yaron Keren [Tue, 4 Mar 2014 09:12:17 +0000 (09:12 +0000)]
We now require Visual C++ 2012 (MSVC_VERSION = 1700) or later to build LLVM.

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

10 years agoGive %itanium_abi_triple to the test to appease targeting msvc.
NAKAMURA Takumi [Tue, 4 Mar 2014 09:04:20 +0000 (09:04 +0000)]
Give %itanium_abi_triple to the test to appease targeting msvc.

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

10 years ago[CMake] Add the newly introduced compiler header.
Argyrios Kyrtzidis [Tue, 4 Mar 2014 06:28:23 +0000 (06:28 +0000)]
[CMake] Add the newly introduced compiler header.

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

10 years agoMS ABI: Reorganize some tests
David Majnemer [Tue, 4 Mar 2014 05:47:41 +0000 (05:47 +0000)]
MS ABI: Reorganize some tests

Move some c++11 specific tests to mangle-ms-cxx11

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

10 years agoMS ABI: Mangle variable templates properly
David Majnemer [Tue, 4 Mar 2014 05:38:05 +0000 (05:38 +0000)]
MS ABI: Mangle variable templates properly

We wouldn't recognize variable templates as being templates leading us
to leave the template arguments off of the mangled name.  This would
allow two unrelated templates to map to the same mangled name.

N.B.  While MSVC doesn't support variable templates as of this date,
this mangling is the most likely thing they will choose to use.  Their
demangler can successfully demangle our manglings with the template
arguments shown.

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

10 years agoFix for r202778 - Implement __readeflags and __writeeflags intrinsics (renamed res...
Alexey Bataev [Tue, 4 Mar 2014 03:42:58 +0000 (03:42 +0000)]
Fix for r202778 - Implement __readeflags and __writeeflags intrinsics (renamed res to __res)

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

10 years agoDebugInfo: Make test (introduced in r202769) resilient to platforms that default...
David Blaikie [Tue, 4 Mar 2014 03:08:16 +0000 (03:08 +0000)]
DebugInfo: Make test (introduced in r202769) resilient to platforms that default to -fstandalone-debug

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

10 years agoDebugInfo: Improvements/corrections to conservative emission of types in explicit...
David Blaikie [Tue, 4 Mar 2014 03:08:14 +0000 (03:08 +0000)]
DebugInfo: Improvements/corrections to conservative emission of types in explicit template instantiation declarations

* detect out of line definitions correctly
* detect member function explicit specializations correctly

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

10 years agoImplement __readeflags and __writeeflags intrinsics
Alexey Bataev [Tue, 4 Mar 2014 03:03:03 +0000 (03:03 +0000)]
Implement __readeflags and __writeeflags intrinsics

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

10 years agoAdd triple to test. On Mac OS it was failing to generate debug info which matched...
Pete Cooper [Tue, 4 Mar 2014 02:56:59 +0000 (02:56 +0000)]
Add triple to test.  On Mac OS it was failing to generate debug info which matched the check lines

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

10 years agoFix typo that resulted in names at TU scope getting lost sometimes after a
Richard Smith [Tue, 4 Mar 2014 00:21:14 +0000 (00:21 +0000)]
Fix typo that resulted in names at TU scope getting lost sometimes after a
module import.

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

10 years agoDebugInfo: Emit only the declaration of a class template that has an explicit instant...
David Blaikie [Mon, 3 Mar 2014 23:48:23 +0000 (23:48 +0000)]
DebugInfo: Emit only the declaration of a class template that has an explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition)

We should only have this optimization fire when the explicit
instantiation definition would cause at  least one member function to be
emitted, thus ensuring that even a compiler not performing this
optimization would still emit the full type information elsewhere.

But we should also pessimize output still by always emitting the
definition when the explicit instantiation definition appears so that at
some point in the future we can depend on that information even when no
code had to be emitted in that TU. (this shouldn't happen very often,
since people mostly use explicit spec decl/defs to reduce code size -
but perhaps one day they could use it to explicitly reduce debug info
size too)

This was worth about 2% for Clang and LLVM - so not a huge win, but a
win. It looks really great for simple STL programs (include <string> and
just declare a string - 14k -> 1.4k of .dwo)

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

10 years agoInclude <tuple> to speculatively try to fix VS2013 build after r202755
Hans Wennborg [Mon, 3 Mar 2014 22:25:31 +0000 (22:25 +0000)]
Include <tuple> to speculatively try to fix VS2013 build after r202755

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

10 years agoObjective-C. Fixes a regression when figuring out linkage
Fariborz Jahanian [Mon, 3 Mar 2014 21:53:57 +0000 (21:53 +0000)]
Objective-C. Fixes a regression when figuring out linkage
for metadata symbols for forward referenced protocols which
are never defined.  // rdar://16203115

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

10 years agoImprove diagnostics for malformed constructor declarations (where lookup for
Richard Smith [Mon, 3 Mar 2014 21:12:53 +0000 (21:12 +0000)]
Improve diagnostics for malformed constructor declarations (where lookup for
the type of the first parameter fails, and it is the only, unnamed, parameter).

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

10 years ago[C++11] Add missing include.
Benjamin Kramer [Mon, 3 Mar 2014 20:39:28 +0000 (20:39 +0000)]
[C++11] Add missing include.

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

10 years ago[C++11] Simplify compare operators with std::tie.
Benjamin Kramer [Mon, 3 Mar 2014 20:26:46 +0000 (20:26 +0000)]
[C++11] Simplify compare operators with std::tie.

No functionality change.

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

10 years agoSchedule discriminator pass.
Diego Novillo [Mon, 3 Mar 2014 20:06:18 +0000 (20:06 +0000)]
Schedule discriminator pass.

This needs to modify a line table test to account for the new lexical
block created to hold the new discriminator value.

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

10 years agoRe-fix previous commit.
Jordan Rose [Mon, 3 Mar 2014 19:46:28 +0000 (19:46 +0000)]
Re-fix previous commit.

Always run the test again, even for a trivial change...

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

10 years agoRemove absolute path from r202733.
Jordan Rose [Mon, 3 Mar 2014 19:45:34 +0000 (19:45 +0000)]
Remove absolute path from r202733.

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

10 years ago[libclang] Have clang_getCursorSpelling() return the string for a CXCursor_ObjCString...
Argyrios Kyrtzidis [Mon, 3 Mar 2014 19:40:52 +0000 (19:40 +0000)]
[libclang] Have clang_getCursorSpelling() return the string for a CXCursor_ObjCStringLiteral or CXCursor_StringLiteral cursor.

rdar://16206459

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

10 years ago[C++11] Remove a now unnecessary use of std::function for a remove_if
Chandler Carruth [Mon, 3 Mar 2014 19:36:27 +0000 (19:36 +0000)]
[C++11] Remove a now unnecessary use of std::function for a remove_if
predicate. The wrapper used by SetVector was erroneously requiring an
adaptable predicate. It has been fixed and we really don't want to
require an indirect call for every predicate evaluation.

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

10 years agoUpdate call DIBuilder::createLexicalBlock.
Diego Novillo [Mon, 3 Mar 2014 18:53:32 +0000 (18:53 +0000)]
Update call DIBuilder::createLexicalBlock.

Create lexical blocks with discriminator value 0 by default.

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

10 years agoI guess we're still using LLVM_DELETED_FUNCTION instead of = delete. This should...
Aaron Ballman [Mon, 3 Mar 2014 18:41:48 +0000 (18:41 +0000)]
I guess we're still using LLVM_DELETED_FUNCTION instead of = delete. This should fix a complaining built bot.

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

10 years agoSerialized diagnostic severity levels should be stable.
Jordan Rose [Mon, 3 Mar 2014 18:29:52 +0000 (18:29 +0000)]
Serialized diagnostic severity levels should be stable.

Serialized diagnostics were accidentally using the AST diagnostic level values
rather than a dedicated stable enum, so the addition of "remark" broke the
reading of existing serialized diagnostics files. I've added a .dia file
generated from Xcode 5's Clang to make sure we don't break this in the future.

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

10 years agoFix MSVCCompatibility doc ReST and wording.
Reid Kleckner [Mon, 3 Mar 2014 18:22:25 +0000 (18:22 +0000)]
Fix MSVCCompatibility doc ReST and wording.

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

10 years agoRemoving some unused functionality.
Aaron Ballman [Mon, 3 Mar 2014 16:21:37 +0000 (16:21 +0000)]
Removing some unused functionality.

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

10 years agoUpdate tests for addition of patch level to LLVM version
Tom Stellard [Mon, 3 Mar 2014 15:22:14 +0000 (15:22 +0000)]
Update tests for addition of patch level to LLVM version

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

10 years agocorrect consitency of XCore caps
Robert Lytton [Mon, 3 Mar 2014 13:45:29 +0000 (13:45 +0000)]
correct consitency of  XCore caps

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

10 years agoDecl printing: add tests for typedefs
Dmitri Gribenko [Mon, 3 Mar 2014 13:21:00 +0000 (13:21 +0000)]
Decl printing: add tests for typedefs

Patch by Konrad Kleine.

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

10 years agoAArch64: convert NEON tests to use CHECK-LABEL.
Tim Northover [Mon, 3 Mar 2014 11:34:36 +0000 (11:34 +0000)]
AArch64: convert NEON tests to use CHECK-LABEL.

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

10 years agoMSVC 2012 doesn't support std::initializer_list at all, so don't rely on
Peter Collingbourne [Mon, 3 Mar 2014 08:13:06 +0000 (08:13 +0000)]
MSVC 2012 doesn't support std::initializer_list at all, so don't rely on
that std::vector constructor.

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

10 years agoIntroduce '-fmodules-user-build-path' which accepts the "canonical" path to a user...
Argyrios Kyrtzidis [Mon, 3 Mar 2014 08:12:05 +0000 (08:12 +0000)]
Introduce '-fmodules-user-build-path' which accepts the "canonical" path to a user workspace build.

This is used to avoid conflicts with user modules with the same name from different workspaces.

rdar://16042513

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

10 years agoMSVC cannot understand temporaries formed from initializer lists.
Peter Collingbourne [Mon, 3 Mar 2014 07:49:35 +0000 (07:49 +0000)]
MSVC cannot understand temporaries formed from initializer lists.

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

10 years ago[libclang] Introduce APIs that assist in constructing a simple module.map file for...
Argyrios Kyrtzidis [Mon, 3 Mar 2014 07:41:45 +0000 (07:41 +0000)]
[libclang] Introduce APIs that assist in constructing a simple module.map file for a user framework.

rdar://16092858

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

10 years ago[C++11] Add #include's for OwningPtr.
Ahmed Charles [Mon, 3 Mar 2014 07:11:21 +0000 (07:11 +0000)]
[C++11] Add #include's for OwningPtr.

Allows removing #include's in LLVM while switching to std::unique_ptr.

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

10 years ago[libclang] Change clang_VirtualFileOverlay_writeToBuffer to return a malloc'ed buffer.
Argyrios Kyrtzidis [Mon, 3 Mar 2014 06:38:52 +0000 (06:38 +0000)]
[libclang] Change clang_VirtualFileOverlay_writeToBuffer to return a malloc'ed buffer.

Returning CXString is not appropriate if we want to switch to a non-string format buffer.

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

10 years agoDisable all dependency output options when using the Tooling library.
Peter Collingbourne [Sun, 2 Mar 2014 23:37:26 +0000 (23:37 +0000)]
Disable all dependency output options when using the Tooling library.

It isn't appropriate for a tool to be stomping over the dependency files,
especially if the actual build uses a compiler other than Clang or the tool
cannot find all the headers for some reason (which would cause the existing
dependency file to be deleted).

If a tool actually needs to care about dependency files we can think about
adding a mechanism for getting to this information.

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

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

10 years agoRevert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"
David Majnemer [Sun, 2 Mar 2014 23:01:10 +0000 (23:01 +0000)]
Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"

This commit reverts r201037, it's functionality is not needed given the
definition of std::max_align_t in libcxx circa r201843.

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

10 years agoNormalize line endings
David Majnemer [Sun, 2 Mar 2014 18:46:05 +0000 (18:46 +0000)]
Normalize line endings

Some files had CRLF line terminators, some only had a mixture of
CRLF and LF.  Switch to LF.

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

10 years agoAdd a PPC inline asm constraint type for single CR bits
Hal Finkel [Sun, 2 Mar 2014 18:24:18 +0000 (18:24 +0000)]
Add a PPC inline asm constraint type for single CR bits

This adds support for the PPC "wc" inline asm constraint (used for allocating
individual CR bits). Support for this constraint type was recently added to the
LLVM PowerPC backend. Although gcc does not currently support allocating
individual CR bits, this identifier choice has been coordinated with the gcc
PowerPC team, and will be marked as reserved for this purpose in the gcc
constraints.md file.

Prior to this change, none of the multi-character PPC constraints were handled
correctly (the '^' escape character was not being added as required by the
parsing code in LLVM). This should now be fixed. I'll add tests for these other
constraints as support is added for them in the backend.

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

10 years agoAttributeReference: Use UNIX line endings
David Majnemer [Sun, 2 Mar 2014 18:17:08 +0000 (18:17 +0000)]
AttributeReference: Use UNIX line endings

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

10 years agoAdding some cross references to the sanitizer attribute documentation. Removes a...
Aaron Ballman [Sun, 2 Mar 2014 17:48:20 +0000 (17:48 +0000)]
Adding some cross references to the sanitizer attribute documentation. Removes a Sphinx warning pointed out by Sean Silva.

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

10 years agoSimplifying attribute generation with range-based for loops. No functional changes...
Aaron Ballman [Sun, 2 Mar 2014 17:38:37 +0000 (17:38 +0000)]
Simplifying attribute generation with range-based for loops. No functional changes intended.

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

10 years ago[C++11] ASTMatchers: Use standard static_assert and type traits.
Benjamin Kramer [Sun, 2 Mar 2014 17:08:43 +0000 (17:08 +0000)]
[C++11] ASTMatchers: Use standard static_assert and type traits.

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

10 years ago[C++11] Use std::atomic instead of LLVM's.
Benjamin Kramer [Sun, 2 Mar 2014 17:08:31 +0000 (17:08 +0000)]
[C++11] Use std::atomic instead of LLVM's.

No intended functionality change.

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

10 years ago[C++11] Work around an incompatibility between llvm::tie and std::tie.
Benjamin Kramer [Sun, 2 Mar 2014 13:18:22 +0000 (13:18 +0000)]
[C++11] Work around an incompatibility between llvm::tie and std::tie.

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

10 years ago[C++11] Switch from LLVM_STATIC_ASSERT to static_assert now that we
Chandler Carruth [Sun, 2 Mar 2014 13:02:01 +0000 (13:02 +0000)]
[C++11] Switch from LLVM_STATIC_ASSERT to static_assert now that we
require host toolchains which support this.

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

10 years ago[C++11] Replace llvm::tie with std::tie.
Benjamin Kramer [Sun, 2 Mar 2014 13:01:17 +0000 (13:01 +0000)]
[C++11] Replace llvm::tie with std::tie.

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

10 years ago[C++11] Switch the clang-format LLVM style to use C++11 style braced
Chandler Carruth [Sun, 2 Mar 2014 12:37:31 +0000 (12:37 +0000)]
[C++11] Switch the clang-format LLVM style to use C++11 style braced
init list formatting. This suggestion has now gone into the LLVM coding
standards, and is particularly relevant now that we're using C++11.

Updated a really ridiculous number of tests to reflect this change.

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

10 years ago[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Benjamin Kramer [Sun, 2 Mar 2014 12:20:24 +0000 (12:20 +0000)]
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.

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

10 years ago[C++11] Remove an LLVM_OVERRIDE use that I missed in my previous commit.
Craig Topper [Sun, 2 Mar 2014 10:02:43 +0000 (10:02 +0000)]
[C++11] Remove an LLVM_OVERRIDE use that I missed in my previous commit.

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

10 years agoSwitch all uses of LLVM_OVERRIDE to just use 'override' directly.
Craig Topper [Sun, 2 Mar 2014 09:32:10 +0000 (09:32 +0000)]
Switch all uses of LLVM_OVERRIDE to just use 'override' directly.

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

10 years agoAdd [extern_c] attribute for modules, allowing a C module to be imported within an...
Richard Smith [Sun, 2 Mar 2014 05:58:18 +0000 (05:58 +0000)]
Add [extern_c] attribute for modules, allowing a C module to be imported within an extern "C" block in C++ code.

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

10 years ago[C++11] Switch from the llvm_move macro to directly calling std::move.
Chandler Carruth [Sun, 2 Mar 2014 04:02:40 +0000 (04:02 +0000)]
[C++11] Switch from the llvm_move macro to directly calling std::move.

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

10 years ago[C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro
Alp Toker [Sun, 2 Mar 2014 03:20:16 +0000 (03:20 +0000)]
[C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro

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

10 years ago[C++11] Drop legacy conditionals for TokenKind's underlying type
Alp Toker [Sun, 2 Mar 2014 02:26:52 +0000 (02:26 +0000)]
[C++11] Drop legacy conditionals for TokenKind's underlying type

This relies on forward declaration of enums.

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

10 years agoMove private classes into anonymous namespaces.
Benjamin Kramer [Sat, 1 Mar 2014 17:21:22 +0000 (17:21 +0000)]
Move private classes into anonymous namespaces.

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

10 years ago[C++11] Replace verbose functors with succinct lambdas
Benjamin Kramer [Sat, 1 Mar 2014 14:48:57 +0000 (14:48 +0000)]
[C++11] Replace verbose functors with succinct lambdas

No functionality change.

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

10 years agoASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]
NAKAMURA Takumi [Sat, 1 Mar 2014 12:49:14 +0000 (12:49 +0000)]
ASTReader.h: Prune \param ImportLoc according to r202560. [-Wdocumentation]

FIXME: Give appropriate \param to llvm::ArrayRef<SubmoduleID> Overrides.

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

10 years ago[C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macro
Chandler Carruth [Sat, 1 Mar 2014 09:40:34 +0000 (09:40 +0000)]
[C++11] Remove use of LLVM_HAS_RVALUE_REFERENCES from Clang. This macro
is now always 1, as we're requiring C++11 now!

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

10 years agoFixed an assertion failure related to bitfield lowering.
Warren Hunt [Sat, 1 Mar 2014 00:38:40 +0000 (00:38 +0000)]
Fixed an assertion failure related to bitfield lowering.

When lowering a bitfield, CGRecordLowering would assign the wrong
storage type to a bitfield in some cases and trigger an assertion.  In
these cases the layout was still correct, just the bitfield info was
wrong.

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

10 years agoIf a module A exports a macro M, and a module B imports that macro and #undef's
Richard Smith [Sat, 1 Mar 2014 00:08:04 +0000 (00:08 +0000)]
If a module A exports a macro M, and a module B imports that macro and #undef's
it, importers of B should not see the macro. This is complicated by the fact
that A's macro could also be visible through a different path. The rules (as
hashed out on cfe-commits) are included as a documentation update in this
change.

With this, the number of regressions in libc++'s testsuite when modules are
enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are
due to remaining bugs in this change (in particular, the handling of submodules
is imperfect).

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

10 years agoAdd Clang docs about MSVC compatibility
Reid Kleckner [Fri, 28 Feb 2014 23:46:04 +0000 (23:46 +0000)]
Add Clang docs about MSVC compatibility

This documents some of the status of supported functionality in MSVC
quirks mode.  Some of this should be in
http://clang.llvm.org/compatibility.html instead when things have
stabilized.

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

10 years agoFix leak in MicrosoftVTableContext
Reid Kleckner [Fri, 28 Feb 2014 23:26:22 +0000 (23:26 +0000)]
Fix leak in MicrosoftVTableContext

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

10 years ago[analyzer] Fix for PR18394.
Anton Yartsev [Fri, 28 Feb 2014 22:29:48 +0000 (22:29 +0000)]
[analyzer] Fix for PR18394.

Additional conditions that prevent useful nodes before call from being reclaimed.

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

10 years agoReapply fixed "Honour 'use-external-names' in FileManager"
Ben Langmuir [Fri, 28 Feb 2014 21:16:07 +0000 (21:16 +0000)]
Reapply fixed "Honour 'use-external-names' in FileManager"

Was r202442

There were two issues with the original patch that have now been fixed.
1. We were memset'ing over a FileEntry in a test case. After adding a
   std::string to FileEntry, this still happened to not break for me.
2. I didn't pass the FileManager into the new compiler instance in
   compileModule. This was hidden in some cases by the fact I didn't
   clear the module cache in the test.

Also, I changed the copy constructor for FileEntry, which was memcpy'ing
in a (now) unsafe way.

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

10 years agoTests for lexing of digit separators versus UCNs.
Richard Smith [Fri, 28 Feb 2014 20:13:19 +0000 (20:13 +0000)]
Tests for lexing of digit separators versus UCNs.

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

10 years agoFix a minor bug in lexing pp-numbers with digit separators: if a pp-number contains...
Richard Smith [Fri, 28 Feb 2014 20:06:02 +0000 (20:06 +0000)]
Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number contains "'e+", the pp-number ends between the 'e' and the '+'.

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

10 years agoWhen completing Objective-C instance method invocations, perform a contextual convers...
Anders Carlsson [Fri, 28 Feb 2014 19:07:22 +0000 (19:07 +0000)]
When completing Objective-C instance method invocations, perform a contextual conversion to an Objective-C pointer type of the target expression if needed. This fixes code completion of method invocations where the target is a smart pointer that has an explicit conversion operator to an Objective-C type.

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

10 years agoDon't suggest non-static methods as corrections when they obviously
Kaelyn Uhrain [Fri, 28 Feb 2014 18:12:42 +0000 (18:12 +0000)]
Don't suggest non-static methods as corrections when they obviously
won't work (i.e. when not doing a member lookup and not in a method from
the same class or a descendant class).

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

10 years agoRemoving some unused functionality.
Aaron Ballman [Fri, 28 Feb 2014 18:04:53 +0000 (18:04 +0000)]
Removing some unused functionality.

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

10 years agoAdding a test case to ensure that type attributes applied to the decl-specifier are...
Aaron Ballman [Fri, 28 Feb 2014 14:27:59 +0000 (14:27 +0000)]
Adding a test case to ensure that type attributes applied to the decl-specifier are applied across all declarations in a group.

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

10 years agoNow that llvm's build system sets -install_name, we don't need to.
Rafael Espindola [Fri, 28 Feb 2014 13:50:15 +0000 (13:50 +0000)]
Now that llvm's build system sets -install_name, we don't need to.

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

10 years agoCFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.
Benjamin Kramer [Fri, 28 Feb 2014 11:12:22 +0000 (11:12 +0000)]
CFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.

PR18999.

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

10 years agoAdd 'remark' diagnostic type in 'clang'
Tobias Grosser [Fri, 28 Feb 2014 09:11:08 +0000 (09:11 +0000)]
Add 'remark' diagnostic type in 'clang'

A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

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

10 years ago[ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that creat...
Argyrios Kyrtzidis [Fri, 28 Feb 2014 07:11:01 +0000 (07:11 +0000)]
[ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that created them,
this is inherently unsafe.

Instead get the diagnostic info into a SourceManager-independent form.

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

10 years agoAdd a testcase for r202437.
Bob Wilson [Fri, 28 Feb 2014 05:57:14 +0000 (05:57 +0000)]
Add a testcase for r202437.

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

10 years agoFix crash with enable_if on constructors.
Nick Lewycky [Fri, 28 Feb 2014 05:26:13 +0000 (05:26 +0000)]
Fix crash with enable_if on constructors.

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

10 years agoAdd support for OpenBSD SPARC assembler.
Rafael Espindola [Fri, 28 Feb 2014 01:55:21 +0000 (01:55 +0000)]
Add support for OpenBSD SPARC assembler.

Patch by Brad Smith.

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

10 years agoAdd a -Wclass-varargs to warn on objects of any class type being passed through an...
Richard Smith [Fri, 28 Feb 2014 01:36:39 +0000 (01:36 +0000)]
Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:

  const char *format = "%s";
  std::experimental::string_view view = "foo";
  printf(format, view);

In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.

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

10 years agoAttempt to fix non-MSVC build
Reid Kleckner [Fri, 28 Feb 2014 01:12:55 +0000 (01:12 +0000)]
Attempt to fix non-MSVC build

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

10 years ago-fdump-record-layouts: Sort nvbases by offset before printing them
Reid Kleckner [Fri, 28 Feb 2014 01:03:09 +0000 (01:03 +0000)]
-fdump-record-layouts: Sort nvbases by offset before printing them

It makes our -fdump-record-layouts a little more sane.

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

10 years agoAdd -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature
Hal Finkel [Fri, 28 Feb 2014 00:27:57 +0000 (00:27 +0000)]
Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature

The backend currently enables CR-bit tracking by default at -O2 and higher.
These flags allow the user to override that default.

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

10 years ago"&&&" != "&&"
Richard Trieu [Thu, 27 Feb 2014 23:59:14 +0000 (23:59 +0000)]
"&&&" != "&&"

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

10 years agoRevert "Honour 'use-external-names' in FileManager"
Ben Langmuir [Thu, 27 Feb 2014 23:48:03 +0000 (23:48 +0000)]
Revert "Honour 'use-external-names' in FileManager"

Revert r202442, which broke the buildbots.

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

10 years agoHonour 'use-external-names' in FileManager
Ben Langmuir [Thu, 27 Feb 2014 23:27:54 +0000 (23:27 +0000)]
Honour 'use-external-names' in FileManager

Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.

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

10 years agoMS ABI: Attempt to fix DenseMap entry reference invalidation
Reid Kleckner [Thu, 27 Feb 2014 22:51:43 +0000 (22:51 +0000)]
MS ABI: Attempt to fix DenseMap entry reference invalidation

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

10 years agoReapply r202420 hopefully fixed for other STLs
Ben Langmuir [Thu, 27 Feb 2014 22:21:32 +0000 (22:21 +0000)]
Reapply r202420 hopefully fixed for other STLs

Keep the copy constructor around, and add a FIXME that we should really
remove it as soon as we have C++11 std::map's emplace function.

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

10 years agoRemove an assertion that no longer holds. <rdar://problem/16135814>
Bob Wilson [Thu, 27 Feb 2014 21:59:17 +0000 (21:59 +0000)]
Remove an assertion that no longer holds. <rdar://problem/16135814>

In r201528, I changed the PGO instrumentation counter for a "do" loop to not
include the fall-through count. That fall-through count is included later, b
it means that this assertion may fail for "do" loops.

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

10 years ago[-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.
Ted Kremenek [Thu, 27 Feb 2014 21:56:47 +0000 (21:56 +0000)]
[-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.

This is a heuristic.  Many switch statements, although they look covered
over an enum, may actually handle at runtime more values than in the enum.

This is overly conservative, as there are some cases that clearly
can be ruled as being clearly unreachable, e.g. 'switch (42) { case 1: ... }'.
We can refine this later.

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

10 years ago[CFG] record the original (now unreachable) block of 'case:' and 'default:' cases.
Ted Kremenek [Thu, 27 Feb 2014 21:56:44 +0000 (21:56 +0000)]
[CFG] record the original (now unreachable) block of 'case:' and 'default:' cases.

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

10 years ago[analyzer] check for now possibly null predecessor edge.
Ted Kremenek [Thu, 27 Feb 2014 21:56:41 +0000 (21:56 +0000)]
[analyzer] check for now possibly null predecessor edge.

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

10 years agoFix -Wunused-function in Release build.
Rui Ueyama [Thu, 27 Feb 2014 20:50:04 +0000 (20:50 +0000)]
Fix -Wunused-function in Release build.

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