]> granicus.if.org Git - clang/log
clang
11 years agoPR16054: Slight strengthening for -Wsometimes-uninitialized: if we use a
Richard Smith [Thu, 12 Sep 2013 18:49:10 +0000 (18:49 +0000)]
PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use a
variable uninitialized every time we reach its (reachable) declaration, or
every time we call the surrounding function, promote the warning from
-Wmaybe-uninitialized to -Wsometimes-uninitialized.

This is still slightly weaker than desired: we should, in general, warn
if a use is uninitialized the first time it is evaluated.

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

11 years agoMove the execution code from Compilation::ExecuteCommand to Command::Execute
Hans Wennborg [Thu, 12 Sep 2013 18:35:08 +0000 (18:35 +0000)]
Move the execution code from Compilation::ExecuteCommand to Command::Execute

I think it makes sense that a Command knows how to execute itself.

There's no functionality change but i rewrote the code to avoid the manual
memory management of Argv.

My motivation for this is that I plan to subclass Command to build fall-back
functionality into clang-cl.

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

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

11 years agoMove Compilation::PrintJob and PrintDiagnosticJob into Job::Print.
Hans Wennborg [Thu, 12 Sep 2013 18:23:34 +0000 (18:23 +0000)]
Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.

This moves the code to Job.cpp, which seems like a more natural fit,
and replaces the "is this a JobList? is this a Command?" logic with
a virtual function call.

It also removes the code duplication between PrintJob and
PrintDiagnosticJob and simplifies the code a little.

There's no functionality change here, except that the Executable is
now always printed within quotes, whereas it would previously not be
quoted in crash reports, which I think was a bug.

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

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

11 years ago[CMake] Put controversial always-recheck-revision-number behind an option.
Jordan Rose [Thu, 12 Sep 2013 16:17:41 +0000 (16:17 +0000)]
[CMake] Put controversial always-recheck-revision-number behind an option.

CMake does not have the ability to perform actions before calculating
dependencies, so it can't know whether it needs to rebuild clangBasic
to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by
default) will cause clangBasic to always be dirty by deleting the
generated SVNVersion.inc after use; otherwise, SVNVersion.inc will
always be updated, but only included in the final binary when clangBasic
is rebuilt.

It'd be great to find a better way to do this, but hopefully this is
still an improvement over the complete lack of version information before.

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

11 years agoFix the MCTargetAsmParser API change.
Joey Gouly [Thu, 12 Sep 2013 10:59:24 +0000 (10:59 +0000)]
Fix the MCTargetAsmParser API change.

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

11 years ago[libclang] In clang_getLocation, check that the provided line/column is valid.
Argyrios Kyrtzidis [Thu, 12 Sep 2013 01:10:36 +0000 (01:10 +0000)]
[libclang] In clang_getLocation, check that the provided line/column is valid.

rdar://14971432

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

11 years agoFix the end-location of a CXXTemporaryObjectExpr when it is created with a initialize...
Argyrios Kyrtzidis [Wed, 11 Sep 2013 23:23:27 +0000 (23:23 +0000)]
Fix the end-location of a CXXTemporaryObjectExpr when it is created with a initializer_list.

rdar://14887351

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

11 years ago[CMake] Fix repository version checking dependencies harder.
Jordan Rose [Wed, 11 Sep 2013 23:12:55 +0000 (23:12 +0000)]
[CMake] Fix repository version checking dependencies harder.

Just always regenerate SVNVersion.inc. Don't worry about it not changing.

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

11 years agoclang/test/FixIt/fixit-unicode-with-utf8-output.c: Remove XFAIL.
NAKAMURA Takumi [Wed, 11 Sep 2013 23:09:22 +0000 (23:09 +0000)]
clang/test/FixIt/fixit-unicode-with-utf8-output.c: Remove XFAIL.

It'd be another issue that the terminal and stdout(including redirects) with utf8. This test XPASSed on Win32, at least on Lit.

FYI, we don't use a triplet like "-win64" anywhere.

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

11 years ago[CMake] Always include the Clang repo version, just like the autoconf build.
Jordan Rose [Wed, 11 Sep 2013 22:46:46 +0000 (22:46 +0000)]
[CMake] Always include the Clang repo version, just like the autoconf build.

Now that LLVM's helper script GetSVN.cmake actually works consistently,
there's no reason not to use it. This does mean that the clangBasic target
is potentially always dirty, because CMake-generated projects do not
necessarily recalculate dependencies after running each target.

This should end the issues of the AST format changing and breaking old
module files; CMake-Clang should now detect that the version changed just
like Autoconf-Clang has.

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

11 years agoObjectiveC migration. NS_RETURNS_NOT_RETAINED is the default for
Fariborz Jahanian [Wed, 11 Sep 2013 22:46:09 +0000 (22:46 +0000)]
ObjectiveC migration. NS_RETURNS_NOT_RETAINED is the default for
unknown methods which return Cocoa objects. No need to annotate
such methods.

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

11 years agoclang-format: Fix bug in pointer detection
Daniel Jasper [Wed, 11 Sep 2013 20:37:10 +0000 (20:37 +0000)]
clang-format: Fix bug in pointer detection

Before:
  for (int i = 0; i* 2 < z; i *= 2) {}
After:
  for (int i = 0; i * 2 < z; i *= 2) {}

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

11 years agoTablegen now generates a StringSwitch for attributes containing enumeration arguments...
Aaron Ballman [Wed, 11 Sep 2013 19:47:58 +0000 (19:47 +0000)]
Tablegen now generates a StringSwitch for attributes containing enumeration arguments to map strings to the proper enumeration value.  This makes error checking more consistent and reduces the amount of hand-written code required.

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

11 years agoObjectiveC migrator. Modify inferred property name
Fariborz Jahanian [Wed, 11 Sep 2013 18:27:16 +0000 (18:27 +0000)]
ObjectiveC migrator. Modify inferred property name
such that it does not lower case the staring property
name if getter name (after "get" prefix) starts with
two upper case letters.

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

11 years agoTest for correct usage of columnWidth in clang fixit hints.
Alexander Kornienko [Wed, 11 Sep 2013 18:10:30 +0000 (18:10 +0000)]
Test for correct usage of columnWidth in clang fixit hints.

Summary:
This test only works on systems capable of outputting UTF-8 encoded
text on the standard output (tested on linux and OS X, should XFAIL on windows,
if I haven't messed up the XFAIL line).

Reviewers: jordan_rose

Reviewed By: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1607

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

11 years agoClarify the status of PowerPC support.
Roman Divacky [Wed, 11 Sep 2013 17:12:49 +0000 (17:12 +0000)]
Clarify the status of PowerPC support.

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

11 years agoObjectiveC migrator. methods which look like a getter and
Fariborz Jahanian [Wed, 11 Sep 2013 17:05:15 +0000 (17:05 +0000)]
ObjectiveC migrator. methods which look like a getter and
start with "get" are inferreed as a readonly properties.

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

11 years agoAdded regression tests.
Serge Pavlov [Wed, 11 Sep 2013 17:04:24 +0000 (17:04 +0000)]
Added regression tests.

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

11 years ago[analyzer] Handle zeroing constructors for fields of structs with empty bases.
Jordan Rose [Wed, 11 Sep 2013 16:46:50 +0000 (16:46 +0000)]
[analyzer] Handle zeroing constructors for fields of structs with empty bases.

RegionStore tries to protect against accidentally initializing the same
region twice, but it doesn't take subregions into account very well. If
the outer region being initialized is a struct with an empty base class,
the offset of the first field in the struct will be 0. When we initialize
the base class, we may invalidate the contents of the struct by providing
a default value of Unknown (or some new symbol). We then go to initialize
the member with a zeroing constructor, only to find that the region at
that offset in the struct already has a value. The best we can do here is
to invalidate that value and continue; neither the old default value nor
the new 0 is correct for the entire struct after the member constructor call.

The correct solution for this is to track region extents in the store.

<rdar://problem/14914316>

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

11 years agoclang-cl: Warn about overriding /MD with /MT etc.
Hans Wennborg [Wed, 11 Sep 2013 16:38:41 +0000 (16:38 +0000)]
clang-cl: Warn about overriding /MD with /MT etc.

This also bakes the /M options into a separate option group to make
them easier to refer to from the code.

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

11 years agoTeach RAV to visit parameter variable declarations of implicit functions. Fixes PR16182.
Michael Han [Wed, 11 Sep 2013 15:53:29 +0000 (15:53 +0000)]
Teach RAV to visit parameter variable declarations of implicit functions. Fixes PR16182.

Normally RAV visits parameter variable declarations of a function by traversing the TypeLoc of
the parameter declarations. However, for implicit functions, their parameters don't have any
TypeLoc, because they are implicit.

So for implicit functions, we visit their parameter variable declarations by traversing them through
the function declaration, and visit them accordingly.

Reviewed by Richard Smith and Manuel Klimek.

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

11 years agofix xcore-opts.c test
Robert Lytton [Wed, 11 Sep 2013 15:14:38 +0000 (15:14 +0000)]
fix xcore-opts.c test

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

11 years agoAdding some additional test cases for the cleanup attribute.
Aaron Ballman [Wed, 11 Sep 2013 13:43:47 +0000 (13:43 +0000)]
Adding some additional test cases for the cleanup attribute.

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

11 years agoFix 2 cases of uninitialized reads of an invalid PresumedLoc.
Evgeniy Stepanov [Wed, 11 Sep 2013 12:33:58 +0000 (12:33 +0000)]
Fix 2 cases of uninitialized reads of an invalid PresumedLoc.

The code in CGExpr was added back in 2012 (r165536) but not exercised in tests
until recently.

Detected on the MemorySanitizer bootstrap bot.

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

11 years agoSupport for CR LF newlines.
Alexander Kornienko [Wed, 11 Sep 2013 12:25:57 +0000 (12:25 +0000)]
Support for CR LF newlines.

Summary:
reformat() tries to determine the newline style used in the input
(either LF or CR LF), and uses it for the output. Maybe not every single case is
supported, but at least the bug described in http://llvm.org/PR17182 should be
resolved.

Reviewers: djasper

Reviewed By: djasper

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

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

11 years agoFix the ASan dll_thunk path
Timur Iskhodzhanov [Wed, 11 Sep 2013 11:45:31 +0000 (11:45 +0000)]
Fix the ASan dll_thunk path

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

11 years agoSimplify code with the in place path::native. No functionality change.
Benjamin Kramer [Wed, 11 Sep 2013 11:23:15 +0000 (11:23 +0000)]
Simplify code with the in place path::native. No functionality change.

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

11 years agoSplit -Wunused-variable warning.
Daniel Jasper [Wed, 11 Sep 2013 10:37:35 +0000 (10:37 +0000)]
Split -Wunused-variable warning.

With r190382, -Wunused-variable warns about unused const variables when
appropriate. For codebases that use -Werror, this poses a problem as
existing unused const variables need to be cleaned up first. To make the
transistion easier, this patch splits -Wunused-variable by pulling out
an additional -Wunused-const-variable (by default activated along with
-Wunused-variable).

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

11 years ago[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics
Daniel Sanders [Wed, 11 Sep 2013 09:59:17 +0000 (09:59 +0000)]
[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics

The elements of the operands should be half the width of the elements of
the result.

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

11 years agoSemaTemplateDeduction.cpp: Prune two stray \param(s), TPOC and NumCallArguments in...
NAKAMURA Takumi [Wed, 11 Sep 2013 09:41:51 +0000 (09:41 +0000)]
SemaTemplateDeduction.cpp: Prune two stray \param(s), TPOC and NumCallArguments in Sema::getMostSpecialized(). They were removed since r190444. [-Wdocumentation]

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

11 years agoRemove unused diagnostics.
Benjamin Kramer [Wed, 11 Sep 2013 09:35:04 +0000 (09:35 +0000)]
Remove unused diagnostics.

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

11 years agoSupport for modular module-map-files
Daniel Jasper [Wed, 11 Sep 2013 07:20:44 +0000 (07:20 +0000)]
Support for modular module-map-files

This patch is the first step to make module-map-files modular (instead
of requiring a single "module.map"-file per include directory). This
step adds a new "extern module" declaration that enables
module-map-files to reference one another along with a very basic
implementation.

The next steps are:

* Combine this with the use-declaration (from
  http://llvm-reviews.chandlerc.com/D1546) in order to only load module
  map files required for a specific compilation.
* Add an additional flag to start with a specific module-map-file (instead
  of requiring there to be at least one "module.map").

Review: http://llvm-reviews.chandlerc.com/D1637

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

11 years agoFix a bug where -msse followed by -mno-sse would leave MMX enabled.
Craig Topper [Wed, 11 Sep 2013 06:48:53 +0000 (06:48 +0000)]
Fix a bug where -msse followed by -mno-sse would leave MMX enabled.

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

11 years ago[-cxx-abi microsoft] Canonicalize array parameters better
David Majnemer [Wed, 11 Sep 2013 04:44:30 +0000 (04:44 +0000)]
[-cxx-abi microsoft] Canonicalize array parameters better

Summary:
More accurately characterize the nature of array parameters. Doing this
removes false back-reference opportunities.  Remove some hacks now that
we characterize these better.

Reviewers: rnk, timurrrr, whunt, cdavis5x

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1626

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

11 years agoDo not quote YAML plain string myself. Let YAMLIO do that.
Rui Ueyama [Wed, 11 Sep 2013 04:00:35 +0000 (04:00 +0000)]
Do not quote YAML plain string myself. Let YAMLIO do that.

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

11 years agovolatile types are not trivially copyable.
Eli Friedman [Wed, 11 Sep 2013 03:49:34 +0000 (03:49 +0000)]
volatile types are not trivially copyable.

PR17123.

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

11 years agoFix test.
Eli Friedman [Wed, 11 Sep 2013 03:49:30 +0000 (03:49 +0000)]
Fix test.

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

11 years agoFix is_trivially_constructible preconditions.
Eli Friedman [Wed, 11 Sep 2013 02:53:02 +0000 (02:53 +0000)]
Fix is_trivially_constructible preconditions.

Fixes a crash in cases where the first argument was an incomplete type
or an uninstantiated template type.

<rdar://problem/14938471>

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

11 years agoDisable the bool and enum sanitizers when emitting the implicitly-defined copy
Nick Lewycky [Wed, 11 Sep 2013 02:03:20 +0000 (02:03 +0000)]
Disable the bool and enum sanitizers when emitting the implicitly-defined copy
constructor, copy assignment operator and move assignment operator.

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

11 years agoThe cleanup attribute no longer uses an unresolved, simple identifier as its argument...
Aaron Ballman [Wed, 11 Sep 2013 01:37:41 +0000 (01:37 +0000)]
The cleanup attribute no longer uses an unresolved, simple identifier as its argument.  Instead, it takes an expression that is fully resolved.

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

11 years agoPR17075: When performing partial ordering of a member function against a
Richard Smith [Wed, 11 Sep 2013 00:52:39 +0000 (00:52 +0000)]
PR17075: When performing partial ordering of a member function against a
non-member function, the number of arguments in the two candidate calls
will be different (the non-member call will have one extra argument).
We used to get confused by this, and fail to compare the last argument
when testing whether the member is better, resulting in us always
thinking it is, even if the non-member is more specialized in the last
argument.

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

11 years agoAdd -fansi-escape-codes option
Nico Rieck [Wed, 11 Sep 2013 00:38:02 +0000 (00:38 +0000)]
Add -fansi-escape-codes option

Some build systems use pipes for stdin/stderr. On nix-ish platforms colored
output can be forced by -fcolor-diagnostics. On Windows this option has
no effect in these cases because LLVM uses the console API (which only
operates on the console buffer) even if a console wrapper capable of
interpreting ANSI escape codes is used.

The -fansi-escape-codes option allows switching from the console API to
ANSI escape codes. It has no effect on other platforms.

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

11 years agoGet rid of unused isPodLike definition.
Eli Friedman [Wed, 11 Sep 2013 00:37:10 +0000 (00:37 +0000)]
Get rid of unused isPodLike definition.

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

11 years agoRemove unused class.
Eli Friedman [Wed, 11 Sep 2013 00:37:06 +0000 (00:37 +0000)]
Remove unused class.

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

11 years agoFix ICE in consumed analysis when CFG is null.
DeLesley Hutchins [Tue, 10 Sep 2013 23:10:10 +0000 (23:10 +0000)]
Fix ICE in consumed analysis when CFG is null.

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

11 years agoRemove unused variable.
Eli Friedman [Tue, 10 Sep 2013 23:00:03 +0000 (23:00 +0000)]
Remove unused variable.

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

11 years agogetMostSpecialized for function template sets is never used in the context of a
Richard Smith [Tue, 10 Sep 2013 22:59:25 +0000 (22:59 +0000)]
getMostSpecialized for function template sets is never used in the context of a
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.

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

11 years agoAdd unused markings to suppress warnings.
Eli Friedman [Tue, 10 Sep 2013 22:57:15 +0000 (22:57 +0000)]
Add unused markings to suppress warnings.

trunk clang is a bit more aggressive about emitting unused-declaration
warnings, so adjust some AST code to match.  Specifically, use
LLVM_ATTRIBUTE_UNUSED for declarations which are never supposed to be
referenced, and turn references to declarations which are supposed to be
referenced into odr-uses.

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

11 years agoIgnore noreturn when checking function template specializations
Reid Kleckner [Tue, 10 Sep 2013 22:21:37 +0000 (22:21 +0000)]
Ignore noreturn when checking function template specializations

As requested when applying the same logic to calling conventions.

Reviewers: rsmith

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

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

11 years agoPR5683: Issue a warning when subtracting pointers to types of zero size, and
Richard Smith [Tue, 10 Sep 2013 21:34:14 +0000 (21:34 +0000)]
PR5683: Issue a warning when subtracting pointers to types of zero size, and
treat such subtractions as being non-constant. Patch by Serge Pavlov! With a
few tweaks by me.

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

11 years agoFix regression from r190382.
Eli Friedman [Tue, 10 Sep 2013 21:10:25 +0000 (21:10 +0000)]
Fix regression from r190382.

Make sure we perform the correct "referenced-but-not-used" check for
static member constants.

Fixes bug reported on cfe-commits by Alexey Samsonov.

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

11 years agoFix cl-link.c test failure on Mac platforms
Hans Wennborg [Tue, 10 Sep 2013 20:53:34 +0000 (20:53 +0000)]
Fix cl-link.c test failure on Mac platforms

The test filename (%s) is easily confused with an option when
it starts with /Users...

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

11 years ago[ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does
Reid Kleckner [Tue, 10 Sep 2013 20:43:12 +0000 (20:43 +0000)]
[ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does

Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ.

Reviewers: timurrrr

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1477

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

11 years agoRemove Windows line-endings in two clang-cl test files.
Hans Wennborg [Tue, 10 Sep 2013 20:35:58 +0000 (20:35 +0000)]
Remove Windows line-endings in two clang-cl test files.

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

11 years agoclang-cl: Support building DLLs (PR17083)
Hans Wennborg [Tue, 10 Sep 2013 20:18:04 +0000 (20:18 +0000)]
clang-cl: Support building DLLs (PR17083)

This adds driver support for building DLLs (the /LD and /LDd flags).
It basically does two things: runtime selection and passing -dll and
-implib to the linker.

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

11 years ago[ms-cxxabi] Implement guard variables for static initialization
Reid Kleckner [Tue, 10 Sep 2013 20:14:30 +0000 (20:14 +0000)]
[ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates.  As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield.  Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created.  MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

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

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

11 years agoObjectiveC migrator: rename inferred isXXX property,
Fariborz Jahanian [Tue, 10 Sep 2013 18:39:32 +0000 (18:39 +0000)]
ObjectiveC migrator: rename inferred isXXX property,
with a suitable 'getter' attribute.

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

11 years agoAllow _clang-format as alternative to .clang-format config filename
Hans Wennborg [Tue, 10 Sep 2013 15:41:12 +0000 (15:41 +0000)]
Allow _clang-format as alternative to .clang-format config filename

Dotfiles are impractical on Windows. This makes clang-format search
for the style configuration file as '_clang-format' in addition to
the usual '.clang-format'. This is similar to how VIM searches for
'_vimrc' on Windows.

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

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

11 years agoDon't divide L and #x in macro definitions. Fixes http://llvm.org/PR17144
Alexander Kornienko [Tue, 10 Sep 2013 13:41:43 +0000 (13:41 +0000)]
Don't divide L and #x in macro definitions. Fixes http://llvm.org/PR17144

Reviewers: djasper

Reviewed By: djasper

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

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

11 years agoCorrectly calculate OriginalColumn after multi-line tokens.
Alexander Kornienko [Tue, 10 Sep 2013 12:29:48 +0000 (12:29 +0000)]
Correctly calculate OriginalColumn after multi-line tokens.

Summary: This also unifies the handling of escaped newlines for all tokens.

Reviewers: djasper

Reviewed By: djasper

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

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

11 years agoclang-format: Understand function type typedefs with typeof.
Daniel Jasper [Tue, 10 Sep 2013 10:26:38 +0000 (10:26 +0000)]
clang-format: Understand function type typedefs with typeof.

Before:
  typedef typeof(int(int, int)) * MyFunc;
After:
  typedef typeof(int(int, int)) *MyFunc;

This fixes llvm.org/PR17178.

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

11 years ago[mips][msa] Removed unsupported dot product instructions (dotp_[su].b).
Daniel Sanders [Tue, 10 Sep 2013 10:10:39 +0000 (10:10 +0000)]
[mips][msa] Removed unsupported dot product instructions (dotp_[su].b).

The dotp_[su].b instructions never existed in any revision of the MSA spec.

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

11 years agoCalculate and store ColumnWidth instead of CodePointCount in FormatTokens.
Alexander Kornienko [Tue, 10 Sep 2013 09:38:25 +0000 (09:38 +0000)]
Calculate and store ColumnWidth instead of CodePointCount in FormatTokens.

Summary:
This fixes various issues with mixed tabs and spaces handling, e.g.
when realigning block comments.

Reviewers: klimek, djasper

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1608

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

11 years agoDelete unused static class members
Alexey Samsonov [Tue, 10 Sep 2013 09:26:48 +0000 (09:26 +0000)]
Delete unused static class members

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

11 years agoRejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.
Stepan Dyatkovskiy [Tue, 10 Sep 2013 08:37:22 +0000 (08:37 +0000)]
Rejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.

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

11 years agoFix for PR16752. Second commit.
Stepan Dyatkovskiy [Tue, 10 Sep 2013 08:18:44 +0000 (08:18 +0000)]
Fix for PR16752. Second commit.

PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.

Fixes:
1st Commit (Done): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.

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

11 years agoFix minor coding style issue in r190296 pointed out by Richard Smith.
David Tweed [Tue, 10 Sep 2013 08:00:34 +0000 (08:00 +0000)]
Fix minor coding style issue in r190296 pointed out by Richard Smith.

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

11 years agoSeparate popcnt and sse4.2 feature control somewhat to match gcc behavior.
Craig Topper [Tue, 10 Sep 2013 06:55:47 +0000 (06:55 +0000)]
Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.

Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.

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

11 years agoGenerate code for the move assignment operator using memcpy, the same as we do
Nick Lewycky [Tue, 10 Sep 2013 05:14:39 +0000 (05:14 +0000)]
Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.

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

11 years agoMake -Wunused warning rules more consistent.
Eli Friedman [Tue, 10 Sep 2013 03:05:56 +0000 (03:05 +0000)]
Make -Wunused warning rules more consistent.

This patch does a few different things.

This patch improves unused var diags for const vars: we no longer
unconditionally suppress diagnostics for const vars, instead only suppressing
the diagnostic when the declaration appears to be useful.

This patch also makes us more consistently use whether a variable/function
is declared in the main file to suppress diagnostics where appropriate.

Fixes <rdar://problem/14907887>.

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

11 years agoclang-cl: use -fdiagnostics-format=msvc by default
Hans Wennborg [Tue, 10 Sep 2013 01:07:07 +0000 (01:07 +0000)]
clang-cl: use -fdiagnostics-format=msvc by default

This allows for navigating to errors within the MSVC IDE by clicking
on the diagnostics.

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

11 years agoIgnore calling conventions when checking function template specializations
Reid Kleckner [Tue, 10 Sep 2013 01:04:45 +0000 (01:04 +0000)]
Ignore calling conventions when checking function template specializations

Summary:
Calling conventions are inherited during decl merging.  Before this
change, deduction would fail due to a type mismatch between the template
and the specialization.  This change adjusts the CCs to match before
deduction, and lets the decl merging logic diagnose mismatch or inherit
the CC from the template.

This allows specializations of static member function templates in the
Microsoft C++ ABI.

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1570

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

11 years agoObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Mon, 9 Sep 2013 23:56:14 +0000 (23:56 +0000)]
ObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
annotation on methods which return typedef of pointer to
an incomplete struct type.

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

11 years agoAttempting to unbreak the makefile-base builds.
Aaron Ballman [Mon, 9 Sep 2013 23:50:01 +0000 (23:50 +0000)]
Attempting to unbreak the makefile-base builds.

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

11 years agoAdding a FIXME based on feedback from Richard Smith.
Aaron Ballman [Mon, 9 Sep 2013 23:40:31 +0000 (23:40 +0000)]
Adding a FIXME based on feedback from Richard Smith.

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

11 years agoAttribute tablegen now understands that attribute arguments can be optional. This...
Aaron Ballman [Mon, 9 Sep 2013 23:33:17 +0000 (23:33 +0000)]
Attribute tablegen now understands that attribute arguments can be optional.  This allows for automated checking of the number of arguments expected vs number of arguments given for attributes.  Greatly reduces the amount of manual checking required.

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

11 years agoFix a crash introduced in r189828.
Matt Beaumont-Gay [Mon, 9 Sep 2013 21:07:58 +0000 (21:07 +0000)]
Fix a crash introduced in r189828.

The predicates in CXXRecordDecl which test various properties of special
members can't be called on incomplete decls.

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

11 years agoModern ObjectiveC translator. Fix translation of
Fariborz Jahanian [Mon, 9 Sep 2013 19:59:59 +0000 (19:59 +0000)]
Modern ObjectiveC translator. Fix translation of
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation
of such expressions.  // rdar://14932320

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

11 years ago[docs] Prominently note modules are experimental.
Sean Silva [Mon, 9 Sep 2013 19:57:49 +0000 (19:57 +0000)]
[docs] Prominently note modules are experimental.

It was really hard to tell that modules are experimental. This makes it
really clear by

* Noting the experimental status in the title.
* Moving the "warning" above the table of contents.

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

11 years ago[docs] End users should see just "Clang"
Sean Silva [Mon, 9 Sep 2013 19:50:47 +0000 (19:50 +0000)]
[docs] End users should see just "Clang"

Half the internet has wildly incorrect ideas about what LLVM is (in
particular, many get the impression that LLVM is some magical
cross-platform runtime), so saying "LLVM" near "cross-compilation" in a
user-facing doc might provoke confusion.

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

11 years ago[docs] Fix Sphinx toctree warning.
Sean Silva [Mon, 9 Sep 2013 19:50:46 +0000 (19:50 +0000)]
[docs] Fix Sphinx toctree warning.

Last I heard LSan is getting close to prime-time, but for now keep
LeakSanitizer.rst hidden (especially since it contains so little
content).

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

11 years ago[docs] Fix some finicky Sphinx warnings.
Sean Silva [Mon, 9 Sep 2013 19:50:40 +0000 (19:50 +0000)]
[docs] Fix some finicky Sphinx warnings.

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

11 years ago[docs] Typographical and rewording fixes.
Sean Silva [Mon, 9 Sep 2013 19:30:44 +0000 (19:30 +0000)]
[docs] Typographical and rewording fixes.

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

11 years agoclang-cl: parse (but don't support) the /o flag
Hans Wennborg [Mon, 9 Sep 2013 19:04:49 +0000 (19:04 +0000)]
clang-cl: parse (but don't support) the /o flag

Apparently folks run into this (PR17097). The flag is not supported by
MSVC either, but we should parse it so we don't get confused when it occurs.

This changes the clang-cl output for "clang-cl /c /o foo.obj" from:

  clang-cl.exe: error: no such file or directory: '/o'
  clang-cl.exe: error: no such file or directory: 'foo.obj'

to:

  clang-cl.exe: warning: argument unused during compilation: '/o bajs.obj'

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

11 years agoMove checker downloads to llvm.org.
Ted Kremenek [Mon, 9 Sep 2013 17:19:27 +0000 (17:19 +0000)]
Move checker downloads to llvm.org.

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

11 years agoC++ modules: if a class is defined in multiple modules (for instance, because
Richard Smith [Mon, 9 Sep 2013 16:55:27 +0000 (16:55 +0000)]
C++ modules: if a class is defined in multiple modules (for instance, because
it is an implicit instantiation of a class template specialization), pick the
first-loaded definition to be the canonical definition, and merge all other
definitions into it.

This is still rather incomplete -- we need to extend every form of declaration
that can appear within a CXXRecordDecl to be redeclarable if it came from an
AST file (this includes fields, enumerators, ...).

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

11 years agoCGDebugInfo: Hoist string allocation in a helper function. No functionality change.
Benjamin Kramer [Mon, 9 Sep 2013 16:39:06 +0000 (16:39 +0000)]
CGDebugInfo: Hoist string allocation in a helper function. No functionality change.

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

11 years agoSema: Don't crash on visibility attributes with an identifier argument.
Benjamin Kramer [Mon, 9 Sep 2013 15:08:57 +0000 (15:08 +0000)]
Sema: Don't crash on visibility attributes with an identifier argument.

PR17105.

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

11 years agoFix constructor-related typos.
Benjamin Kramer [Mon, 9 Sep 2013 14:48:42 +0000 (14:48 +0000)]
Fix constructor-related typos.

Noticed by Roman Divacky.

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

11 years agoSilencing an MSVC warning about an empty control statement (it dislikes ; but is...
Aaron Ballman [Mon, 9 Sep 2013 13:29:38 +0000 (13:29 +0000)]
Silencing an MSVC warning about an empty control statement (it dislikes ; but is fine with {}).

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

11 years agoRemoving the endian attribute and updating associated test cases. This functionality...
Aaron Ballman [Mon, 9 Sep 2013 12:57:20 +0000 (12:57 +0000)]
Removing the endian attribute and updating associated test cases.  This functionality was never completely implemented, and this is an improvement over silently eating the attribute.

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

11 years agoCommit 190296 missed out the tests; add them now. Note that it actually tests
David Tweed [Mon, 9 Sep 2013 09:55:07 +0000 (09:55 +0000)]
Commit 190296 missed out the tests; add them now. Note that it actually tests
"long long" which is currently technically only "reserved for future" use in OpenCL, but
since clang in OpenCL mode supports it we may as well test the modifications to
the settings made for that type.

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

11 years agoThe OpenCL standard specifies the sizes and alignments of various types than other...
David Tweed [Mon, 9 Sep 2013 09:17:24 +0000 (09:17 +0000)]
The OpenCL standard specifies the sizes and alignments of various types than other C-family
languages, as well as specifying errno is not set by the math functions. Make the
clang front-end set those appropriately when the OpenCL language option is set.

Patch by Erik Schnetter!

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

11 years agoAdditional fix for PR16752 and for commit 190044:
Stepan Dyatkovskiy [Mon, 9 Sep 2013 07:46:54 +0000 (07:46 +0000)]
Additional fix for PR16752 and for commit 190044:
-- For TargetInfo::getRealTypeByWidth also added support for IEEEQuad float type.

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

11 years agoC++ modules: fix a bug where loading a declaration with some name would prevent
Richard Smith [Mon, 9 Sep 2013 07:34:56 +0000 (07:34 +0000)]
C++ modules: fix a bug where loading a declaration with some name would prevent
name lookup from lazily deserializing the other declarations with the same
name, by tracking a bit to indicate whether a name in a DeclContext might have
additional external results. This also allows lazier reconciling of the lookup
table if a module import adds decls to a pre-existing DC.

However, this exposes a pre-existing bug, which causes a regression in
test/Modules/decldef.mm: if we have a reference to a declaration, and a
later-imported module adds a redeclaration, nothing causes us to load that
redeclaration when we use or emit the reference (which can manifest as a
reference to an undefined inline function, a use of an incomplete type, and so
on). decldef.mm has been extended with an additional testcase which fails with
or without this change.

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

11 years agoUpdate to the new API interface which requires the MCRegisterInfo object. <rdar:...
Bill Wendling [Mon, 9 Sep 2013 02:37:56 +0000 (02:37 +0000)]
Update to the new API interface which requires the MCRegisterInfo object. <rdar://problem/13623355>

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

11 years agoImplement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following...
Jiangning Liu [Mon, 9 Sep 2013 02:21:08 +0000 (02:21 +0000)]
Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,

SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL

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

11 years agoAdding cross-compilation instructions to Clang
Renato Golin [Sun, 8 Sep 2013 20:44:39 +0000 (20:44 +0000)]
Adding cross-compilation instructions to Clang

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

11 years agoclang-format: Keep empty lines and format 1-line nested blocks.
Daniel Jasper [Sun, 8 Sep 2013 14:07:57 +0000 (14:07 +0000)]
clang-format: Keep empty lines and format 1-line nested blocks.

Let clang-format consistently keep up to one empty line (configured via
FormatStyle::MaxEmptyLinesToKeep) in nested blocks, e.g. lambdas. Also,
actually format single statements in nested blocks.

Before:
  DEBUG({ int     i; });
  DEBUG({
    int i;
    // an empty line here would just be removed.
    int j;
  });

After:
  DEBUG({ int i; });
  DEBUG({
    int i;

    int j;
  });

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

11 years agoDebug Info: pass in DIScope instead of DIDescriptor in createFieldType.
Manman Ren [Sun, 8 Sep 2013 03:45:05 +0000 (03:45 +0000)]
Debug Info: pass in DIScope instead of DIDescriptor in createFieldType.

Improve readability. No functionality change.

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