]> granicus.if.org Git - clang/log
clang
10 years agoDon't reject dependent range-based for loops in constexpr functions. The loop
Richard Smith [Fri, 15 Nov 2013 02:29:26 +0000 (02:29 +0000)]
Don't reject dependent range-based for loops in constexpr functions. The loop
variable isn't really uninitialized, it's just not initialized yet.

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

10 years agoFix test failures after addrspacecast added.
Matt Arsenault [Fri, 15 Nov 2013 02:19:52 +0000 (02:19 +0000)]
Fix test failures after addrspacecast added.

Bitcasts between address spaces are no longer allowed.

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

10 years ago[analyzer] Silence warnings coming from allocators used by std::basic_string.
Jordan Rose [Fri, 15 Nov 2013 02:11:19 +0000 (02:11 +0000)]
[analyzer] Silence warnings coming from allocators used by std::basic_string.

This is similar to r194004: because we can't reason about the data structure
invariants of std::basic_string, the analyzer decides it's possible for an
allocator to be used to deallocate the string's inline storage. Just ignore
this by walking up the stack, skipping past methods in classes with
"allocator" in the name, and seeing if we reach std::basic_string that way.

PR17866

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

10 years ago[analyzer] Include bug column numbers in HTML output (in a comment).
Jordan Rose [Fri, 15 Nov 2013 02:11:11 +0000 (02:11 +0000)]
[analyzer] Include bug column numbers in HTML output (in a comment).

This has no effect on user-visible output, but can be used by post-processing
tools that work with the generated HTML, rather than using CmpRuns.py's
interface to work with plists.

Patch by György Orbán!

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

10 years agoModern gcc is happy to constant evaluate __builtin_strlen in various cases
Richard Smith [Fri, 15 Nov 2013 02:10:04 +0000 (02:10 +0000)]
Modern gcc is happy to constant evaluate __builtin_strlen in various cases
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.

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

10 years agoR600: Add processor type for Hawaii
Tom Stellard [Thu, 14 Nov 2013 23:45:53 +0000 (23:45 +0000)]
R600: Add processor type for Hawaii

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

10 years agoPR 17916: Don't fail if xcrun is not present.
Joerg Sonnenberger [Thu, 14 Nov 2013 23:18:08 +0000 (23:18 +0000)]
PR 17916: Don't fail if xcrun is not present.

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

10 years agoFix typo
David Peixotto [Thu, 14 Nov 2013 22:58:17 +0000 (22:58 +0000)]
Fix typo

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

10 years agoPass -Wa,-I and -Xassembler -I args to integrated assembler
David Peixotto [Thu, 14 Nov 2013 22:52:58 +0000 (22:52 +0000)]
Pass -Wa,-I and -Xassembler -I args to integrated assembler

This patch adds -I to the arguments that are passed to the
integrated assembler from -Wa, and -Xassembler args.

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

10 years agoInstall clang-format's editor integrations in $PREFIX/share/clang/
Hans Wennborg [Thu, 14 Nov 2013 22:48:06 +0000 (22:48 +0000)]
Install clang-format's editor integrations in $PREFIX/share/clang/

They were previously not part of the install target.

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

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

10 years agoDR408: If a static data member of incomplete array type is declared in a class
Richard Smith [Thu, 14 Nov 2013 22:40:45 +0000 (22:40 +0000)]
DR408: If a static data member of incomplete array type is declared in a class
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.

Patch by Karthik Bhat!

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

10 years agoMakes A Microsoft Layout CodeGen Test Explicit
Warren Hunt [Thu, 14 Nov 2013 22:34:59 +0000 (22:34 +0000)]
Makes A Microsoft Layout CodeGen Test Explicit

This patch tests introduces a proper codegen test in place of the
"codegen no longer crashes" test introduced in r193664. The test is also
moved from layout to CodeGenCXX.

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

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

10 years agoAdd -Wdeprecated-writable-string in C++ to -Wc++11-compat, since it's ill-formed...
Richard Smith [Thu, 14 Nov 2013 22:22:31 +0000 (22:22 +0000)]
Add -Wdeprecated-writable-string in C++ to -Wc++11-compat, since it's ill-formed in C++11.

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

10 years ago[AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
Chad Rosier [Thu, 14 Nov 2013 22:02:24 +0000 (22:02 +0000)]
[AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
and accumulate instructions.

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

10 years agoObjectiveC migrator: This patch sets access property
Fariborz Jahanian [Thu, 14 Nov 2013 18:28:58 +0000 (18:28 +0000)]
ObjectiveC migrator: This patch sets access property
attributes on 'readonly' properties. // rdar://15460787

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

10 years ago[OpenCL] Make sure we put string literals in the constant address space.
Joey Gouly [Thu, 14 Nov 2013 18:26:10 +0000 (18:26 +0000)]
[OpenCL] Make sure we put string literals in the constant address space.

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

10 years ago[analyzer] Treat MSVC's _wassert as noreturn.
Jordan Rose [Thu, 14 Nov 2013 17:55:00 +0000 (17:55 +0000)]
[analyzer] Treat MSVC's _wassert as noreturn.

This makes sure the analyzer actually honors assert() in an MSVC project.

Patch by Anders Montonen!

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

10 years ago[objcmt] Introduce "objcmt-white-list-dir-path=" option.
Argyrios Kyrtzidis [Thu, 14 Nov 2013 16:33:29 +0000 (16:33 +0000)]
[objcmt] Introduce "objcmt-white-list-dir-path=" option.

This options accepts a path to a directory, collects the filenames of the files
it contains, and the migrator will only modify files with the same filename.

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

10 years ago[objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are companion flags.
Argyrios Kyrtzidis [Thu, 14 Nov 2013 16:33:20 +0000 (16:33 +0000)]
[objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are companion flags.
Ignore them when determining if some transformation was enabled.

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

10 years agoMove classes into anonymous namespaces.
Benjamin Kramer [Thu, 14 Nov 2013 15:46:10 +0000 (15:46 +0000)]
Move classes into anonymous namespaces.

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

10 years ago[Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
Simon Atanasyan [Thu, 14 Nov 2013 11:15:10 +0000 (11:15 +0000)]
[Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
functional changes - just reflection of the current state.

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

10 years agoRemove a test failure.
Kevin Qin [Thu, 14 Nov 2013 07:00:00 +0000 (07:00 +0000)]
Remove a test failure.

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

10 years agoAdd test case for AArch64 NEON poly64 intrinsic.
Kevin Qin [Thu, 14 Nov 2013 06:49:00 +0000 (06:49 +0000)]
Add test case for AArch64 NEON poly64 intrinsic.

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

10 years agoAdd test cases for AArch64 NEON instruction set misc.
Kevin Qin [Thu, 14 Nov 2013 06:44:42 +0000 (06:44 +0000)]
Add test cases for AArch64 NEON instruction set misc.

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

10 years agoRevert r194663 and r194647.
Ted Kremenek [Thu, 14 Nov 2013 04:44:56 +0000 (04:44 +0000)]
Revert r194663 and r194647.

Per feedback from Jordan Rose I realized this wasn't the right way to go.

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

10 years agoRefine -Wunused-variable to only suppress warning for __bridge_transfer, not all...
Ted Kremenek [Thu, 14 Nov 2013 04:27:00 +0000 (04:27 +0000)]
Refine -Wunused-variable to only suppress warning for __bridge_transfer, not all bridge casts.

Also refine test case to capture the intention of this suppression.  Essentially
some developers use __bridge_transfer as if it were a safe CFRelease.

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

10 years ago[AArch64 neon] support poly64 and relevant intrinsic functions.
Kevin Qin [Thu, 14 Nov 2013 03:29:16 +0000 (03:29 +0000)]
[AArch64 neon] support poly64 and relevant intrinsic functions.

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

10 years agoImplement aarch64 neon instruction class misc.
Kevin Qin [Thu, 14 Nov 2013 02:45:18 +0000 (02:45 +0000)]
Implement aarch64 neon instruction class misc.

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

10 years agoAdded warning on structures/unions that are empty or contain only
Serge Pavlov [Thu, 14 Nov 2013 02:13:03 +0000 (02:13 +0000)]
Added warning on structures/unions that are empty or contain only
bit fields of zero size. Warnings are generated in C++ mode and if
only such type is defined inside extern "C" block.
The patch fixed PR5065.

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

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

10 years agoImplement AArch64 NEON instruction set AdvSIMD (table).
Jiangning Liu [Thu, 14 Nov 2013 01:57:55 +0000 (01:57 +0000)]
Implement AArch64 NEON instruction set AdvSIMD (table).

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

10 years agoSuppress -Wunused-variable when initializer uses bridge casts for memory management.
Ted Kremenek [Thu, 14 Nov 2013 01:42:17 +0000 (01:42 +0000)]
Suppress -Wunused-variable when initializer uses bridge casts for memory management.

Fixes <rdar://problem/15432770>.

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

10 years agoUse a more realistic NS class names in
Fariborz Jahanian [Thu, 14 Nov 2013 01:00:26 +0000 (01:00 +0000)]
Use a more realistic NS class names in
objc_bridge attributes in my previous test.
Per Jordan's comment.

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

10 years agoObjectiveC ARC. objc_bridge attribute should be applied to
Fariborz Jahanian [Thu, 14 Nov 2013 00:43:05 +0000 (00:43 +0000)]
ObjectiveC ARC. objc_bridge attribute should be applied to
toll-free bridging cf types only. // rdar//15454846 wip.

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

10 years agoWork around a bug in old gcc on the FreeBSD bot, which complains about
Dmitri Gribenko [Thu, 14 Nov 2013 00:36:24 +0000 (00:36 +0000)]
Work around a bug in old gcc on the FreeBSD bot, which complains about
ambiguity between index() function and clang::index namespace.

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

10 years agoObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
Fariborz Jahanian [Wed, 13 Nov 2013 23:59:17 +0000 (23:59 +0000)]
ObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
that teaches the compiler about a subset of toll-free
bridging semantics. This is wip. // rdar://15454846

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

10 years ago[objcmt] If no objcmt options were specified, default to enable literals+subscripting.
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:22 +0000 (23:38 +0000)]
[objcmt] If no objcmt options were specified, default to enable literals+subscripting.

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

10 years ago[objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:20 +0000 (23:38 +0000)]
[objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

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

10 years ago[objcmt] If the frontend option is frontend::MigrateSource then we don't need to...
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:17 +0000 (23:38 +0000)]
[objcmt] If the frontend option is frontend::MigrateSource then we don't need to create
the arcmt wrappers.

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

10 years agoDon't use alias from derived dtor to base dtor at -O0.
Rafael Espindola [Wed, 13 Nov 2013 23:20:45 +0000 (23:20 +0000)]
Don't use alias from derived dtor to base dtor at -O0.

This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.

This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.

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

10 years ago-fms-extensions: Recognize _alloca as an alias for the alloca builtin
Reid Kleckner [Wed, 13 Nov 2013 22:58:53 +0000 (22:58 +0000)]
-fms-extensions: Recognize _alloca as an alias for the alloca builtin

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

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

10 years agoOnly provide MS builtins when -fms-extensions is on
Reid Kleckner [Wed, 13 Nov 2013 22:47:22 +0000 (22:47 +0000)]
Only provide MS builtins when -fms-extensions is on

We already have builtins that are only available in GNU mode, so this
mirrors that.

Reviewers: rsmith

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

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

10 years agolibclang does not depend directly on clangFormat; but clangIndex does
Dmitri Gribenko [Wed, 13 Nov 2013 22:26:04 +0000 (22:26 +0000)]
libclang does not depend directly on clangFormat; but clangIndex does

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

10 years agoDocumentation parsing: move comment-to-XML conversion routines to libIndex
Dmitri Gribenko [Wed, 13 Nov 2013 22:16:51 +0000 (22:16 +0000)]
Documentation parsing: move comment-to-XML conversion routines to libIndex

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

10 years agoNo functional change. Renaming a variable in RecordLayoutBuilder and
Warren Hunt [Wed, 13 Nov 2013 22:16:13 +0000 (22:16 +0000)]
No functional change.  Renaming a variable in RecordLayoutBuilder and
improving comments to make documentation more accurate.

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

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

10 years agoAdd test case for r194593
Weiming Zhao [Wed, 13 Nov 2013 21:40:17 +0000 (21:40 +0000)]
Add test case for r194593

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

10 years agoMake inline functions in a header file static.
Dmitri Gribenko [Wed, 13 Nov 2013 20:19:22 +0000 (20:19 +0000)]
Make inline functions in a header file static.

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

10 years ago[AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
Chad Rosier [Wed, 13 Nov 2013 20:05:44 +0000 (20:05 +0000)]
[AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.

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

10 years agoDrop windows specific handling of equivalent destructors.
Rafael Espindola [Wed, 13 Nov 2013 18:46:32 +0000 (18:46 +0000)]
Drop windows specific handling of equivalent destructors.

Now that the relevant tests use -mconstructor-aliases and the missing
features have been implemented, we can just drop this.

No functionality change.

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

10 years agoAdds ARM backend options: -mrestrict-it and -mno-restrict-it
Weiming Zhao [Wed, 13 Nov 2013 18:31:23 +0000 (18:31 +0000)]
Adds ARM backend options: -mrestrict-it and -mno-restrict-it

To support the generation of IT block in Thumbv7 way or
Thumbv8 way

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

10 years ago[objcmt] Use FileIDs directly instead of their hash value.
Argyrios Kyrtzidis [Wed, 13 Nov 2013 18:20:31 +0000 (18:20 +0000)]
[objcmt] Use FileIDs directly instead of their hash value.

No functionality change.

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

10 years agoNo need to use CGM.getCXXABI() from CXXABI
Timur Iskhodzhanov [Wed, 13 Nov 2013 16:03:43 +0000 (16:03 +0000)]
No need to use CGM.getCXXABI() from CXXABI

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

10 years agoCorrectly mark first token in the presence of UTF-8 BOM.
Alexander Kornienko [Wed, 13 Nov 2013 14:04:17 +0000 (14:04 +0000)]
Correctly mark first token in the presence of UTF-8 BOM.

Summary: Fixes http://llvm.org/PR17753

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2159

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

10 years agoAdd an optional mapping from source paths to source contents.
Manuel Klimek [Wed, 13 Nov 2013 13:23:27 +0000 (13:23 +0000)]
Add an optional mapping from source paths to source contents.

This allows compilation database implementations for distributed build
systems to hand all data to the client to make parsing independent of
the file system.

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

10 years agoAdd -fprofile-sample-use to Clang's driver.
Diego Novillo [Wed, 13 Nov 2013 12:22:39 +0000 (12:22 +0000)]
Add -fprofile-sample-use to Clang's driver.

This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.

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

10 years agoWarn on duplicate function specifier
Serge Pavlov [Wed, 13 Nov 2013 06:57:53 +0000 (06:57 +0000)]
Warn on duplicate function specifier

This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.

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

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

10 years agoFix closing namespace comment to reflect reality
Dmitri Gribenko [Wed, 13 Nov 2013 02:01:24 +0000 (02:01 +0000)]
Fix closing namespace comment to reflect reality

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

10 years agoPR10837: Warn if a null pointer constant is formed by a zero integer constant
Richard Smith [Wed, 13 Nov 2013 01:24:28 +0000 (01:24 +0000)]
PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. Patch by Ivan A. Kosarev!

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

10 years agounittests/Tooling/ToolingTest.cpp: Suppress new tests on win32, due to handling of...
NAKAMURA Takumi [Wed, 13 Nov 2013 00:18:50 +0000 (00:18 +0000)]
unittests/Tooling/ToolingTest.cpp: Suppress new tests on win32, due to handling of virtual file, such "/a.cc".

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

10 years agoObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
Fariborz Jahanian [Wed, 13 Nov 2013 00:08:36 +0000 (00:08 +0000)]
ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
on inferred property attribute under
 -objcmt-ns-nonatomic-iosonly  option.
// rdar://15442742

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

10 years agoclang-cl: parse the /Yc flag (PR17895)
Hans Wennborg [Tue, 12 Nov 2013 22:35:26 +0000 (22:35 +0000)]
clang-cl: parse the /Yc flag (PR17895)

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

10 years agoDocumentation parsing: add support for \throws \throw \exception commands
Dmitri Gribenko [Tue, 12 Nov 2013 22:16:08 +0000 (22:16 +0000)]
Documentation parsing: add support for \throws \throw \exception commands

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

10 years agoAvoid producing mismatched comdats.
Rafael Espindola [Tue, 12 Nov 2013 22:06:46 +0000 (22:06 +0000)]
Avoid producing mismatched comdats.

The problem was that given

template<typename T>
struct foo {
  ~foo() {}
};
template class foo<int>;

We would produce a alias, creating a comdat with D0 and D1, since the symbols
have to be weak. Another TU is not required to have a explicit template
instantiation definition or an explict template instantiation declaration and
for

template<typename T>
struct foo {
  ~foo() {}
};
foo<int> a;

we would produce a comdat with only one symbol in it.

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

10 years agoadd intrinsics: __builtin_arm_{dmb,dsb} for ARM
Weiming Zhao [Tue, 12 Nov 2013 21:42:50 +0000 (21:42 +0000)]
add intrinsics: __builtin_arm_{dmb,dsb} for ARM

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

10 years agoObjectiveC. availability of Array/Dictionary subscripting
Fariborz Jahanian [Tue, 12 Nov 2013 20:50:26 +0000 (20:50 +0000)]
ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://15363492

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

10 years agoObjectiveC migrator. Another alternative to
Fariborz Jahanian [Tue, 12 Nov 2013 19:25:50 +0000 (19:25 +0000)]
ObjectiveC migrator. Another alternative to
 "atomic" or "nonatomic" for properties is
NS_NONATOMIC_IOSONLY. Use it if available.
// rdar://15442742

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

10 years agoclang-cl: parse the /GT option
Hans Wennborg [Tue, 12 Nov 2013 19:21:50 +0000 (19:21 +0000)]
clang-cl: parse the /GT option

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

10 years agoRemove trailing spaces
Sylvestre Ledru [Tue, 12 Nov 2013 18:07:35 +0000 (18:07 +0000)]
Remove trailing spaces

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

10 years agoAdd test for injecting diagnostic consumers into a ClangTool.
Manuel Klimek [Tue, 12 Nov 2013 17:53:18 +0000 (17:53 +0000)]
Add test for injecting diagnostic consumers into a ClangTool.

As suggested by pcc on 194226.

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

10 years agoRemove extra whitespace instead of breaking the line in comments when possible.
Alexander Kornienko [Tue, 12 Nov 2013 17:50:13 +0000 (17:50 +0000)]
Remove extra whitespace instead of breaking the line in comments when possible.

Summary: Solves the problem described in http://llvm.org/PR17756

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2131

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

10 years agoDo not insert backslashes, when breaking line comments after preprocessor directives.
Alexander Kornienko [Tue, 12 Nov 2013 17:30:49 +0000 (17:30 +0000)]
Do not insert backslashes, when breaking line comments after preprocessor directives.

Summary: This solves http://llvm.org/PR17536

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2142

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

10 years agoObjectiveC driver change. re-apply patch reverted in
Fariborz Jahanian [Tue, 12 Nov 2013 17:08:46 +0000 (17:08 +0000)]
ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://15363492

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

10 years agoUpgrade the VS solution to 2012.
Manuel Klimek [Tue, 12 Nov 2013 17:01:53 +0000 (17:01 +0000)]
Upgrade the VS solution to 2012.

Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012.

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

10 years agoFix key bindings for VS 2010.
Manuel Klimek [Tue, 12 Nov 2013 15:25:18 +0000 (15:25 +0000)]
Fix key bindings for VS 2010.

Set the default key-binding only in the text editor; the
global binding of ctrl-r,ctrl-f was already taken in VS 2010.

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

10 years agoRecreated the ClangFormat VSPackage with VS 2010.
Manuel Klimek [Tue, 12 Nov 2013 15:02:53 +0000 (15:02 +0000)]
Recreated the ClangFormat VSPackage with VS 2010.

The generated package is now compatible with VS 2010 - 2013.

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

10 years agoRevert unintentional commit from r194477.
Manuel Klimek [Tue, 12 Nov 2013 13:56:36 +0000 (13:56 +0000)]
Revert unintentional commit from r194477.

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

10 years agogit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194477 91177308-0d34-0410...
Manuel Klimek [Tue, 12 Nov 2013 13:54:22 +0000 (13:54 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194477 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Enable inlinse assembly for MSA.
Daniel Sanders [Tue, 12 Nov 2013 12:56:01 +0000 (12:56 +0000)]
[mips][msa] Enable inlinse assembly for MSA.

Like GCC, this re-uses the 'f' constraint and a new 'w' print-modifier:
  asm ("ldi.w %w0, 1", "=f"(result));

Unlike GCC, the 'w' print-modifer is not _required_ to produce the intended
output. This is a consequence of differences in the internal handling of
the registers in each compiler. To be source-compatible between the
compilers, users must use the 'w' print-modifier.

MSA registers (including control registers) are supported in clobber lists.

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

10 years ago[mips] Added fpu register tests to tests/CodeGen/mips-clobber-reg.c
Daniel Sanders [Tue, 12 Nov 2013 11:38:20 +0000 (11:38 +0000)]
[mips] Added fpu register tests to tests/CodeGen/mips-clobber-reg.c

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

10 years ago[mips] Small fixes to test/CodeGen/mips-clobber-reg.c
Daniel Sanders [Tue, 12 Nov 2013 11:15:48 +0000 (11:15 +0000)]
[mips] Small fixes to test/CodeGen/mips-clobber-reg.c

Fixed the following:
- Whitespace at end of most lines
- $11 test actually testing $10

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

10 years agoXCore target requires preferred alignment.
Robert Lytton [Tue, 12 Nov 2013 10:09:34 +0000 (10:09 +0000)]
XCore target requires preferred alignment.

The xcore llvm backend does not handle 8 byte alignment viz:
  "%BadAlignment = alloca i64, align 8"
So getPreferredTypeAlign() must never overalign.

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

10 years agoXCore target Type defines.
Robert Lytton [Tue, 12 Nov 2013 10:09:30 +0000 (10:09 +0000)]
XCore target Type defines.

Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

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

10 years agoXCore target has -fno-use-cxa-atexit as default.
Robert Lytton [Tue, 12 Nov 2013 10:09:22 +0000 (10:09 +0000)]
XCore target has -fno-use-cxa-atexit as default.

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

10 years agoTests for core issue 201-215.
Richard Smith [Tue, 12 Nov 2013 09:16:15 +0000 (09:16 +0000)]
Tests for core issue 201-215.

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

10 years agoKeep the old function order in CodeGenModule::applyReplacements.
Rafael Espindola [Tue, 12 Nov 2013 04:53:19 +0000 (04:53 +0000)]
Keep the old function order in CodeGenModule::applyReplacements.

The original decls are created when used. The replacements are created at the
end of the TU in reverse order.

This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.

This is a fixed version of r194357 which handles replacing a destructor with
another which is an alias to a third one.

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

10 years agoThis reverts commit r194435 and r194434.
Rafael Espindola [Tue, 12 Nov 2013 04:33:56 +0000 (04:33 +0000)]
This reverts commit r194435 and r194434.

Trying to get the bots green.

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

10 years agoCOSMETIC: Fix 80 column overflow in some comments introduced in r194188
Faisal Vali [Tue, 12 Nov 2013 03:56:08 +0000 (03:56 +0000)]
COSMETIC: Fix 80 column overflow in some comments introduced in r194188

no functionality change.

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

10 years agoA quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing)...
Faisal Vali [Tue, 12 Nov 2013 03:48:27 +0000 (03:48 +0000)]
A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++.

See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev.

This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda.

A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME.

Patch was LGTM'd by Richard (just barely :)

http://llvm-reviews.chandlerc.com/D2144

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

10 years agoRemove C++11ism.
Richard Smith [Tue, 12 Nov 2013 02:58:11 +0000 (02:58 +0000)]
Remove C++11ism.

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

10 years agoExtra test for r194444.
Richard Smith [Tue, 12 Nov 2013 02:42:08 +0000 (02:42 +0000)]
Extra test for r194444.

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

10 years agoRather than duplicating extension diagnostics to allow them to cause a
Richard Smith [Tue, 12 Nov 2013 02:41:45 +0000 (02:41 +0000)]
Rather than duplicating extension diagnostics to allow them to cause a
substitution failure, allow a flag to be set on the Diagnostic object,
to mark it as 'causes substitution failure'.

Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior
rather than a bunch of flags.

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

10 years ago-fms-compatibility: Use C++98 null pointer constant rules
Reid Kleckner [Tue, 12 Nov 2013 02:22:34 +0000 (02:22 +0000)]
-fms-compatibility: Use C++98 null pointer constant rules

Patch by Will Wilson!

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

10 years agoCOSMETIC: Right justify an asterix in the previous refactoring.
Faisal Vali [Tue, 12 Nov 2013 01:46:33 +0000 (01:46 +0000)]
COSMETIC: Right justify an asterix in the previous refactoring.

Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;)

No functionality change.

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

10 years agoREFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.
Faisal Vali [Tue, 12 Nov 2013 01:40:44 +0000 (01:40 +0000)]
REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.

No Functionality change.

This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope.

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

10 years agoObjectiveC. Try to unbreak buildbot.
Fariborz Jahanian [Tue, 12 Nov 2013 00:08:23 +0000 (00:08 +0000)]
ObjectiveC. Try to unbreak buildbot.

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

10 years agoObjectiveC. By default allow array/dictionary subscripting in
Fariborz Jahanian [Mon, 11 Nov 2013 23:44:52 +0000 (23:44 +0000)]
ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://15363492

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

10 years agoAdd a testcase where we replace a destructor with an alias.
Rafael Espindola [Mon, 11 Nov 2013 22:55:13 +0000 (22:55 +0000)]
Add a testcase where we replace a destructor with an alias.

This is a reduced testcase from a cast to Function failing during bootstrap.

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

10 years ago[mips] Partially revert r193640. Stack alignment should not be determined by
Akira Hatanaka [Mon, 11 Nov 2013 22:10:46 +0000 (22:10 +0000)]
[mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.

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

10 years agoRevert "Using an invalid -O falls back on -O3 instead of an error"
Sylvestre Ledru [Mon, 11 Nov 2013 20:51:44 +0000 (20:51 +0000)]
Revert "Using an invalid -O falls back on -O3 instead of an error"

This reverts commit r194403.

Was breaking too many tests...

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

10 years agoRevert "Remove -### from the -O20 test, it was failing the test (?)"
Sylvestre Ledru [Mon, 11 Nov 2013 20:46:40 +0000 (20:46 +0000)]
Revert "Remove -### from the -O20 test, it was failing the test (?)"

This reverts commit r194414.

Was breaking too many tests...

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

10 years agoRemove -### from the -O20 test, it was failing the test (?)
Sylvestre Ledru [Mon, 11 Nov 2013 19:54:40 +0000 (19:54 +0000)]
Remove -### from the -O20 test, it was failing the test (?)

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