]> granicus.if.org Git - clang/log
clang
8 years ago[Sema] Suppress diags in overload resolution.
George Burgess IV [Wed, 13 Jan 2016 23:36:34 +0000 (23:36 +0000)]
[Sema] Suppress diags in overload resolution.

We were emitting diagnostics from our shiny new C-only overload
resolution mode. This patch attempts to silence all such diagnostics.

This fixes PR26085.
Differential Revision: http://reviews.llvm.org/D16159

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

8 years agoUpdate cxx_dr_status for latest issues list.
Richard Smith [Wed, 13 Jan 2016 22:58:22 +0000 (22:58 +0000)]
Update cxx_dr_status for latest issues list.

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

8 years agoUpdate make_cxx_dr_status after the 3.8 branch.
Richard Smith [Wed, 13 Jan 2016 22:51:59 +0000 (22:51 +0000)]
Update make_cxx_dr_status after the 3.8 branch.

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

8 years agoUpdate cxx_dr_status.html after the 3.8 branch
Hans Wennborg [Wed, 13 Jan 2016 19:14:03 +0000 (19:14 +0000)]
Update cxx_dr_status.html after the 3.8 branch

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

8 years agoUpdate version to 3.9
Hans Wennborg [Wed, 13 Jan 2016 17:32:59 +0000 (17:32 +0000)]
Update version to 3.9

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

8 years agoclang-format: [ObjC+JS] Allow bin-packing of array literals.
Daniel Jasper [Wed, 13 Jan 2016 16:41:34 +0000 (16:41 +0000)]
clang-format: [ObjC+JS] Allow bin-packing of array literals.

After reading the style guides again, they don't actually say how to
pack or not pack array literals. Based on some user reports, array
initializers can unnecessarily get quite long if they contain many
small elements. Array literals with trailing commas are still formatted
one per line so that users have a way to opt out of the packing.

Before:
  var array = [
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa,
    aaaaaa
  ];

After:
  var array = [
    aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa, aaaaaa,
    aaaaaa, aaaaaa
  ];

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

8 years agoRevert r257602 because it breaks integrated-as.s on mips hosts.
Scott Egerton [Wed, 13 Jan 2016 16:19:33 +0000 (16:19 +0000)]
Revert r257602 because it breaks integrated-as.s on mips hosts.

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

8 years agoRevert "[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion."
Artem Dergachev [Wed, 13 Jan 2016 15:52:25 +0000 (15:52 +0000)]
Revert "[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion."

This reverts commit r257605.

The test fails on architectures that use unsigned int as size_t.
SymbolManager.h fails with compile errors on some platforms.

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

8 years ago[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion.
Artem Dergachev [Wed, 13 Jan 2016 15:13:48 +0000 (15:13 +0000)]
[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion.

Provide separate visitor templates for the three hierarchies, and also
the `FullSValVisitor' class, which is a union of all three visitors.

Additionally, add a particular example visitor, `SValExplainer', in order to
test the visitor templates. This visitor is capable of explaining the SVal,
SymExpr, or MemRegion in a natural language.

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

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

8 years ago[mips] Added support for -Wa,-mips32 and similar.
Scott Egerton [Wed, 13 Jan 2016 14:27:59 +0000 (14:27 +0000)]
[mips] Added support for -Wa,-mips32 and similar.

Reviewers: vkalintiris, dsanders

Subscribers: cfe-commits

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

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

8 years ago[analyzer] Fix SVal/SymExpr/MemRegion class and enum names for consistency.
Artem Dergachev [Wed, 13 Jan 2016 13:49:29 +0000 (13:49 +0000)]
[analyzer] Fix SVal/SymExpr/MemRegion class and enum names for consistency.

The purpose of these changes is to simplify introduction of definition files
for the three hierarchies.

1. For every sub-class C of these classes, its kind in the relevant enumeration
is changed to "CKind" (or C##Kind in preprocessor-ish terms), eg:

  MemRegionKind   -> MemRegionValKind
  RegionValueKind -> SymbolRegionValueKind
  CastSymbolKind  -> SymbolCastKind
  SymIntKind      -> SymIntExprKind

2. MemSpaceRegion used to be inconsistently used as both an abstract base and
a particular region. This region class is now an abstract base and no longer
occupies GenericMemSpaceRegionKind. Instead, a new class, CodeSpaceRegion,
is introduced for handling the unique use case for MemSpaceRegion as
"the generic memory space" (when it represents a memory space that holds all
executable code).

3. BEG_ prefixes in memory region kind ranges are renamed to BEGIN_ for
consisitency with symbol kind ranges.

4. FunctionTextRegion and BlockTextRegion are renamed to FunctionCodeRegion and
BlockCodeRegion, respectively. The term 'code' is less jargony than 'text' and
we already refer to BlockTextRegion as a 'code region' in BlockDataRegion.

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

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

8 years ago[OPENMP] Fix for declarative/standalone directives use.
Alexey Bataev [Wed, 13 Jan 2016 11:18:54 +0000 (11:18 +0000)]
[OPENMP] Fix for declarative/standalone directives use.
Fixes processing of declarative directives and standalone executable directives. Declarative directives should not be allowed as an immediate statements and standalone executable directives are allowed to be used in case-stmt constructs.

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

8 years agoInstall scan-build and scan-view only if Static Analyzer was enabled.
Eugene Zelenko [Wed, 13 Jan 2016 02:03:50 +0000 (02:03 +0000)]
Install scan-build and scan-view only if Static Analyzer was enabled.

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

8 years ago[Bugfix] Fix ICE on constexpr vector splat.
George Burgess IV [Wed, 13 Jan 2016 01:52:39 +0000 (01:52 +0000)]
[Bugfix] Fix ICE on constexpr vector splat.

In {CG,}ExprConstant.cpp, we weren't treating vector splats properly.
This patch makes us treat splats more properly.

Additionally, this patch adds a new cast kind which allows a bool->int
cast to result in -1 or 0, instead of 1 or 0 (for true and false,
respectively), so we can sanely model OpenCL bool->int casts in the AST.

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

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

8 years ago[CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu.
Justin Lebar [Wed, 13 Jan 2016 01:24:35 +0000 (01:24 +0000)]
[CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu.

Summary:
Rename the args to be more human-readable.  Among other things, this
lets us get rid of a bunch of comments (e.g. "ensure we don't run the
linker"), greatly shortening these tests.

Also apply consistent formatting and fix some English nits while we're
at it.

Reviewers: tra

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

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

8 years agoGeneralize r256026 to apply to all MachO targets, not just Darwin targets.
Bob Wilson [Wed, 13 Jan 2016 01:19:02 +0000 (01:19 +0000)]
Generalize r256026 to apply to all MachO targets, not just Darwin targets.

The PIC default is set for the MachO toolchain, not just the Darwin toolchain,
so this treats those the same. The behavior with -static should be the same
for all MachO targets. rdar://24152327

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

8 years ago[CUDA] Report an error if code tries to mix incompatible CUDA attributes.
Justin Lebar [Wed, 13 Jan 2016 01:07:35 +0000 (01:07 +0000)]
[CUDA] Report an error if code tries to mix incompatible CUDA attributes.

Summary: Thanks to jhen for helping me figure this out.

Reviewers: tra, echristo

Subscribers: jhen

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

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

8 years ago[Darwin] Fix deployment target detection
Frederic Riss [Tue, 12 Jan 2016 23:47:59 +0000 (23:47 +0000)]
[Darwin] Fix deployment target detection

There was a thinko in the deployment target detection code that
made the -isysroot parsing have precedence over the environment
variable for tvOS. This patch makes this logic symetric for all
platforms (the env variable must have precedence).

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

8 years agoFollow-up to r257537: add test that majnemer asked about
Hans Wennborg [Tue, 12 Jan 2016 23:31:58 +0000 (23:31 +0000)]
Follow-up to r257537: add test that majnemer asked about

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

8 years agoclang-cl: Support /Dfoo#bar (PR25984)
Hans Wennborg [Tue, 12 Jan 2016 23:17:03 +0000 (23:17 +0000)]
clang-cl: Support /Dfoo#bar (PR25984)

Such flags will now be translated to -Dfoo=bar.

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

8 years agoD9600: Add scan-build python implementation
Laszlo Nagy [Tue, 12 Jan 2016 22:38:41 +0000 (22:38 +0000)]
D9600: Add scan-build python implementation

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

8 years ago[CUDA] Add explicit mapping from sm_XX to compute_YY.
Justin Lebar [Tue, 12 Jan 2016 22:23:04 +0000 (22:23 +0000)]
[CUDA] Add explicit mapping from sm_XX to compute_YY.

Summary: This is used by D16082 when it invokes fatbinary.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

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

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

8 years agoImprove AST dumping:
Richard Smith [Tue, 12 Jan 2016 21:59:26 +0000 (21:59 +0000)]
Improve AST dumping:

 1) When dumping a declaration that declares a name for a type, also dump the named type.
 2) Add a #pragma clang __debug dump X, that dumps the lookup results for X in
    the current context.

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

8 years agoProperly track the end location of an exception specification.
Aaron Ballman [Tue, 12 Jan 2016 21:04:22 +0000 (21:04 +0000)]
Properly track the end location of an exception specification.

Patch by Adrian ZgorzaƂek

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

8 years agoModule debugging: Make the module format part of the module hash instead
Adrian Prantl [Tue, 12 Jan 2016 21:01:56 +0000 (21:01 +0000)]
Module debugging: Make the module format part of the module hash instead
of the file name. This is consistent with how other HeaderSearchOptions
are handled.

Due to the other inputs of the module hash (revision number) this is not
really testable in a meaningful way.

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

8 years agoDon't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078)
Hans Wennborg [Tue, 12 Jan 2016 20:54:36 +0000 (20:54 +0000)]
Don't store CGOpenMPRegionInfo::CodeGen as a reference (PR26078)

The referenced llvm::function_ref<void(CodeGenFunction &)> object can go
away before CodeGen is used, resulting in a crash.

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

8 years ago[modules] Don't diagnose a conflict between two using-declarations that name equivale...
Richard Smith [Tue, 12 Jan 2016 20:34:32 +0000 (20:34 +0000)]
[modules] Don't diagnose a conflict between two using-declarations that name equivalent internal linkage entities.

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

8 years agoAdd a clang test for r257376 (Ensure -mcpu=xscale works for arm targets).
Dimitry Andric [Tue, 12 Jan 2016 19:40:55 +0000 (19:40 +0000)]
Add a clang test for r257376 (Ensure -mcpu=xscale works for arm targets).

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

8 years agofunction names start with a lower case letter ; NFC
Sanjay Patel [Tue, 12 Jan 2016 18:03:41 +0000 (18:03 +0000)]
function names start with a lower case letter ; NFC

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

8 years agoRevert r253898 and r253899, this breaks mingw compilation on openSUSE.
Ismail Donmez [Tue, 12 Jan 2016 10:41:20 +0000 (10:41 +0000)]
Revert r253898 and r253899, this breaks mingw compilation on openSUSE.
Will re-apply after llvm 3.8 is branched.

Original commit message:

Driver: fallback to the location of clang if no sysroot,

hard coding /usr makes little sense for mingw-w64.
If we have portable toolchains having /usr breaks that.
If the clang we use is in /usr/bin or /usr/sbin etc this will
still detect as though it was hard coded to /usr

This makes the most sense going forward for mingw-w64 toolchains
on both linux and mac

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

8 years ago[analyzer] Fix RangeConstraintManager's pinning of single value ranges.
Pierre Gousseau [Tue, 12 Jan 2016 10:40:45 +0000 (10:40 +0000)]
[analyzer] Fix RangeConstraintManager's pinning of single value ranges.

This fix a bug in RangeSet::pin causing single value ranges to be considered non conventionally ordered.

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

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

8 years ago[analyzer] Evaluate integral casts as cast symbols if truncations are detected.
Pierre Gousseau [Tue, 12 Jan 2016 10:07:56 +0000 (10:07 +0000)]
[analyzer] Evaluate integral casts as cast symbols if truncations are detected.

The current workaround for truncations not being modelled is that the evaluation of integer to integer casts are simply bypassed and so the original symbol is used as the new casted symbol (cf SimpleSValBuilder::evalCastFromNonLoc).
This lead to the issue described in PR25078, as the RangeConstraintManager associates ranges with symbols.

The new evalIntegralCast method added by this patch wont bypass the cast if it finds the range of the symbol to be greater than the maximum value of the target type.

The fix to RangeSet::pin mentioned in the initial review will be committed separately.

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

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

8 years agoPR18513: make gcc compatible layout for bit-fields with explicit aligned attribute...
Alexey Bataev [Tue, 12 Jan 2016 09:12:20 +0000 (09:12 +0000)]
PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute, by Dmitry Polukhin
Fix binary compatibility issue with GCC.
Differential Revision: http://reviews.llvm.org/D14980

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

8 years agoFix infinite recursion for invalid declaration, by Dmitry Polukhin
Alexey Bataev [Tue, 12 Jan 2016 09:01:25 +0000 (09:01 +0000)]
Fix infinite recursion for invalid declaration, by Dmitry Polukhin
Fix for a case found by fuzzing PR23057 (comment #25 https://llvm.org/bugs/show_bug.cgi?id=23057#c25).
Differential Revision: http://reviews.llvm.org/D16065

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

8 years agoclang-format: [JS] Support exporting abstract classes.
Daniel Jasper [Tue, 12 Jan 2016 06:24:38 +0000 (06:24 +0000)]
clang-format: [JS] Support exporting abstract classes.

Before:
  export abstract class X {y: number;}
(and all sorts of other havoc in more complicated cases).

After:
  export abstract class X { y: number; }

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

8 years ago[CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.
Justin Lebar [Mon, 11 Jan 2016 23:27:13 +0000 (23:27 +0000)]
[CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

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

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

8 years agoAdd an Action* member to InputInfo.
Justin Lebar [Mon, 11 Jan 2016 23:15:21 +0000 (23:15 +0000)]
Add an Action* member to InputInfo.

Summary:
The CUDA toolchain needs to know which Actions created which InputInfos,
because it needs to attach GPU archs to the various InputInfos.

Reviewers: echristo

Subscribers: jfb, dschuff, jhen, tra, cfe-commits

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

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

8 years agoMake Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.
Justin Lebar [Mon, 11 Jan 2016 23:09:32 +0000 (23:09 +0000)]
Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.

Summary: Explicit is better than implicit.

Reviewers: echristo

Subscribers: llvm-commits

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

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

8 years agoMove ownership of Action objects into Compilation.
Justin Lebar [Mon, 11 Jan 2016 23:07:27 +0000 (23:07 +0000)]
Move ownership of Action objects into Compilation.

Summary:
This makes constructing Action graphs which are DAGs much simpler.  It
also just simplifies in general the ownership semantics of Actions.

Depends on D15910.

Reviewers: echristo

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] Teach clang-format about "export interface".
Daniel Jasper [Mon, 11 Jan 2016 22:57:40 +0000 (22:57 +0000)]
clang-format: [JS] Teach clang-format about "export interface".

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

8 years agoWhen a tag is declared in prototype scope in C, if we've decided that it
Richard Smith [Mon, 11 Jan 2016 22:41:53 +0000 (22:41 +0000)]
When a tag is declared in prototype scope in C, if we've decided that it
redeclares an existing tag but are creating a new declaration anyway (because
it has attributes or changes the visibility of the name), don't warn that it
won't be visible outside the current scope. That's not true.

Also narrow down the set of cases where we create these extra declarations when
building modules; previously, all tag declarations but the first in a module
header would get this treatment if -fmodules-local-submodule-visibility. (This
isn't a functional change, but we try to avoid creating these extra
declarations whenever we can.)

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

8 years agoPR26087: Use nonstandard MSVC extension for VS2015 as well.
James Y Knight [Mon, 11 Jan 2016 22:00:22 +0000 (22:00 +0000)]
PR26087: Use nonstandard MSVC extension for VS2015 as well.

In r256564, I had conditioned the workaround in has_getDecl to only be
used for MSVC before the 2015 release, believing that 2015 could handle
the standard code. But, that was incorrect.

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

8 years agoFix -Wmicrosoft-enum-value warning
Reid Kleckner [Mon, 11 Jan 2016 20:55:16 +0000 (20:55 +0000)]
Fix -Wmicrosoft-enum-value warning

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

8 years ago[Sema] Issue a warning for integer overflow in struct initializer
Akira Hatanaka [Mon, 11 Jan 2016 17:22:01 +0000 (17:22 +0000)]
[Sema] Issue a warning for integer overflow in struct initializer

Clang wasn't issuing a warning when compiling the following code:

struct s {
  unsigned x;
} s = {
  .x = 4 * 1024 * 1024 * 1024
};

rdar://problem/23399683

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

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

8 years ago[clang-format] Fix comment aligning when there are changes within the comment
Benjamin Kramer [Mon, 11 Jan 2016 16:27:16 +0000 (16:27 +0000)]
[clang-format] Fix comment aligning when there are changes within the comment

As soon as a comment had whitespace changes inside of the token, we
couldn't identify the whole comment as a trailing comment anymore and
alignment stopped working. Add a new boolean to Change for this special
case and fix trailing comment identification to use it.

This also changes WhitespaceManager to sum the length of all Changes
inside of a token into the first Change.

Before this fix

  int xy;  // a
  int z;   //b

became

  int xy;  // a
  int z;  // b

with this patch we immediately get to:

  int xy;  // a
  int z;   // b

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

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

8 years agoclang-format: Fix overloading "operator," definitions more thoroughly.
Daniel Jasper [Mon, 11 Jan 2016 12:55:33 +0000 (12:55 +0000)]
clang-format: Fix overloading "operator," definitions more thoroughly.

Before:
  aaaaaaaaaaaaaaaaaaaaaa operator,(aaaaaaaaaaaaaaaaaaaaa &
                                   aaaaaaaaaaaaaaaaaaaaaaaaaa) const;
After:
  aaaaaaaaaaaaaaaaaaaaaa operator,(
      aaaaaaaaaaaaaaaaaaaaa &aaaaaaaaaaaaaaaaaaaaaaaaaa) const;

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

8 years ago[WebAssembly] Fix a typo in a comment.
Dan Gohman [Mon, 11 Jan 2016 11:49:44 +0000 (11:49 +0000)]
[WebAssembly] Fix a typo in a comment.

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

8 years agoFix assert hit when tree-transforming template template parameter packs.
Manuel Klimek [Mon, 11 Jan 2016 11:39:00 +0000 (11:39 +0000)]
Fix assert hit when tree-transforming template template parameter packs.

Covers significantly more code in the template template pack argument
test and fixes the resulting assert problem.

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

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

8 years agoclang-format: Slightly row back on r257257.
Daniel Jasper [Mon, 11 Jan 2016 11:01:05 +0000 (11:01 +0000)]
clang-format: Slightly row back on r257257.

r257257 change the way clang-format enforces line breaks after a
templated type has been line-wrapped. This was to fix an incorrect line
break if BinPackParameters is set to false. However, it also leads to
an unwanted line break in a different case. Thus, for now, only do this
when BinPackParameters is false. This isn't ideal yet, but helps us
until we have a better solution.

With BinPackParameters:
Before:
  void fffffffffff(aaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaa,
                                               aaaaaaaaaaaaaaaaaaaa);

After:
  void fffffffffff(
      aaaaaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaa);

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

8 years agoclang-format: [JS] Improve line-flow when calling functions on array literals.
Daniel Jasper [Mon, 11 Jan 2016 11:00:58 +0000 (11:00 +0000)]
clang-format: [JS] Improve line-flow when calling functions on array literals.

Before:
  return [
    aaaaaaaaaaaaaaaaaaaaaa
  ].aaaaaaa(function() {
     //
   })
   .bbbbbb();

After:
  return [aaaaaaaaaaaaaaaaaaaaaa]
      .aaaaaaa(function() {
//
      })
      .bbbbbb();

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

8 years agoAnalysisConsumer: use canonical decl for both lookup and store of
Yury Gribov [Mon, 11 Jan 2016 09:38:48 +0000 (09:38 +0000)]
AnalysisConsumer: use canonical decl for both lookup and store of
visited decls.

Due to redeclarations, the function may have different declarations used
in CallExpr and in the definition. However, we need to use a unique
declaration for both store and lookup in VisitedCallees. This patch
fixes issues with analysis in topological order. A simple test is
included.

Patch by Alex Sidorin!

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

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

8 years agoAccidentally removed part of the file header. Restoring it back.
Ekaterina Romanova [Sun, 10 Jan 2016 16:18:09 +0000 (16:18 +0000)]
Accidentally removed part of the file header. Restoring it back.

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

8 years agoSimplify test code with initializer lists.
Benjamin Kramer [Sun, 10 Jan 2016 10:45:19 +0000 (10:45 +0000)]
Simplify test code with initializer lists.

No functional change intended.

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

8 years agoMake test work on windows by turning \ in paths back into /.
Benjamin Kramer [Sun, 10 Jan 2016 10:36:59 +0000 (10:36 +0000)]
Make test work on windows by turning \ in paths back into /.

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

8 years agoclang-format: Fix the counting of leading whitespace in tok::unknown tokens
Daniel Jasper [Sat, 9 Jan 2016 21:12:45 +0000 (21:12 +0000)]
clang-format: Fix the counting of leading whitespace in tok::unknown tokens

Previously, all whitespace characters would increase the starting
column, which doesn't make sense. This fixes a problem, e.g. with the
length calculation in JS template strings.

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

8 years ago[vfs] Normalize working directory if requested.
Benjamin Kramer [Sat, 9 Jan 2016 16:33:16 +0000 (16:33 +0000)]
[vfs] Normalize working directory if requested.

FixedCompilationDatabase sets the working dir to "." by default. For
chdir(".") this is a noop but this lead to InMemoryFileSystem to create
bogus paths. Fixes PR25327.

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

8 years agoMake clang::format::reformat work with non 0-terminated strings.
Daniel Jasper [Sat, 9 Jan 2016 15:56:57 +0000 (15:56 +0000)]
Make clang::format::reformat work with non 0-terminated strings.

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

8 years agoclang-format: Improve selective comment formatting.
Daniel Jasper [Sat, 9 Jan 2016 15:56:53 +0000 (15:56 +0000)]
clang-format: Improve selective comment formatting.

Starting here:
  int x; // Format this line only.
  int xx; //
  int xxxxx; //

Before:
  int x;     // Format this line only.
  int xx; //
  int xxxxx; //

After:
  int x;  // Format this line only.
  int xx; //
  int xxxxx; //

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

8 years agoclang-format: Fix incorrect line break in certain configurations.
Daniel Jasper [Sat, 9 Jan 2016 15:56:47 +0000 (15:56 +0000)]
clang-format: Fix incorrect line break in certain configurations.

Before:
  void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                          vector<int>
                              bbbbbbbbbbbbbbb);

After:
  void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                          vector<int> bbbbbbbbbbbbbbb);

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

8 years agoclang-format: Support definitions/declarations of operator,.
Daniel Jasper [Sat, 9 Jan 2016 15:56:40 +0000 (15:56 +0000)]
clang-format: Support definitions/declarations of operator,.

Before:
  bool operator, ();

After:
  bool operator,();

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

8 years agoclang-format: [JS] Support semicolons in TypeScript's TypeMemberLists.
Daniel Jasper [Sat, 9 Jan 2016 15:56:28 +0000 (15:56 +0000)]
clang-format: [JS] Support semicolons in TypeScript's TypeMemberLists.

Before:
  var x: {
    a: string;
    b: number;
  }
  = {};

After:
  var x: {a: string; b: number;} = {};

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

8 years ago[OpenCL] Pipe type support
Xiuli Pan [Sat, 9 Jan 2016 12:53:17 +0000 (12:53 +0000)]
[OpenCL] Pipe type support

Summary:
Support for OpenCL 2.0 pipe type.
This is a bug-fix version for bader's patch reviews.llvm.org/D14441

Reviewers: pekka.jaaskelainen, Anastasia

Subscribers: bader, Anastasia, cfe-commits

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

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

8 years agoTest Commit
Xiuli Pan [Sat, 9 Jan 2016 07:12:32 +0000 (07:12 +0000)]
Test Commit

Fix a typo

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

8 years ago[modules] If we're treating an elaborated-type-specifier as if it introduces a
Richard Smith [Sat, 9 Jan 2016 06:58:48 +0000 (06:58 +0000)]
[modules] If we're treating an elaborated-type-specifier as if it introduces a
tag (because the previous declaration was found in a different module), inject
the tag into the appropriate scope (that is, the enclosing scope if we're in a
function prototype scope in C++).

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

8 years agoModule debugging: Add a testcase for standalone forward declarations.
Adrian Prantl [Sat, 9 Jan 2016 01:11:35 +0000 (01:11 +0000)]
Module debugging: Add a testcase for standalone forward declarations.

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

8 years agoOnly take NULL macros instead of all macros into account for -Wnull-conversion.
Richard Trieu [Sat, 9 Jan 2016 01:10:17 +0000 (01:10 +0000)]
Only take NULL macros instead of all macros into account for -Wnull-conversion.

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

8 years agoExclude function calls for functions which have return type nullptr_t from
Richard Trieu [Fri, 8 Jan 2016 23:35:06 +0000 (23:35 +0000)]
Exclude function calls for functions which have return type nullptr_t from
-Wnull-conversion warning.

These functions are basically equivalent to other pointer returning fuctions
which are already excluded by -Wnull-conversion.

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

8 years ago[modules] Make sure we always include the contents of private headers when
Richard Smith [Fri, 8 Jan 2016 22:36:45 +0000 (22:36 +0000)]
[modules] Make sure we always include the contents of private headers when
building a module. Prior to this change, the private header's content would
only be included if the header were included by another header in the same
module. If not (if the private header is only used by the .cc files of the
module, or is included from outside the module via -Wno-private-header),
a #include of that file would be silently ignored.

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

8 years ago[MS ABI] Complete and base constructor GlobalDecls must have the same name
David Majnemer [Fri, 8 Jan 2016 20:48:26 +0000 (20:48 +0000)]
[MS ABI] Complete and base constructor GlobalDecls must have the same name

Clang got itself into the situation where we mangled the same
constructor twice with two different constructor types.  After one of
the constructors were utilized, the tag used for one of the types
changed from class to struct because a class template became complete.
This resulted in one of the constructor types varying from the other
constructor.

Instead, force "base" constructor types to "complete" if the ABI doesn't
have constructor variants.  This will ensure that GlobalDecls for both
variants will get the same mangled name.

This fixes PR26029.

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

8 years agoFix incorrectly line-broken comment in Driver.h.
Justin Lebar [Fri, 8 Jan 2016 19:28:34 +0000 (19:28 +0000)]
Fix incorrectly line-broken comment in Driver.h.

Also sort includes.

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

8 years agoUpdate code in buildCudaActions and BuildActions to latest idiom.
Justin Lebar [Fri, 8 Jan 2016 19:04:11 +0000 (19:04 +0000)]
Update code in buildCudaActions and BuildActions to latest idiom.

Summary:
Use llvm::any_of, llvm::find, etc.

No functional changes.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[ThinLTO] Leverage new in-place renaming support
Teresa Johnson [Fri, 8 Jan 2016 17:04:29 +0000 (17:04 +0000)]
[ThinLTO] Leverage new in-place renaming support

Due to the new in-place renaming support added in r257174, we no
longer need to invoke ThinLTO global renaming from clang. It will be
invoked on the module in the FunctionImport pass (by an immediately
following llvm commit).

As a result, we don't need to load the FunctionInfoIndex as early,
so that is moved down into EmitAssemblyHelper::EmitAssembly.

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

8 years agoDriver: Use the new ELF lld linker for AMDGPU
Tom Stellard [Fri, 8 Jan 2016 15:14:31 +0000 (15:14 +0000)]
Driver: Use the new ELF lld linker for AMDGPU

Summary: 'gnu-old' has been deprecated in favor or 'gnu'.

Reviewers: arsenm, ruiu, rafael

Subscribers: cfe-commits

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

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

8 years agoclang-format: [JS] Prefer wrapping before the TypeScript return type
Daniel Jasper [Fri, 8 Jan 2016 10:51:24 +0000 (10:51 +0000)]
clang-format: [JS] Prefer wrapping before the TypeScript return type
over wrapping before parameters.

Before:
  function someFunc(
      args: string[]): {longReturnValue: string[]} {}

After:
  function someFunc(args: string[]):
      {longReturnValue: string[]} {}

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

8 years agoclang-format: [JS] Add some Closure Compiler JSDoc tags to the default
Daniel Jasper [Fri, 8 Jan 2016 08:14:58 +0000 (08:14 +0000)]
clang-format: [JS] Add some Closure Compiler JSDoc tags to the default
Google configuration so that they aren't line-wrapped.

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

8 years agoclang-format: [JS] Support more ES6 classes.
Daniel Jasper [Fri, 8 Jan 2016 07:06:07 +0000 (07:06 +0000)]
clang-format: [JS] Support more ES6 classes.

Before:
  foo = class {
      constructor() {}
  }
  ;

After:
  foo = class {
      constructor() {}
  };

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

8 years ago[CUDA] Split out tests for unused-arg warnings from cuda-options.cu.
Justin Lebar [Fri, 8 Jan 2016 03:33:04 +0000 (03:33 +0000)]
[CUDA] Split out tests for unused-arg warnings from cuda-options.cu.

Summary: Trying to make this test a bit more manageable.

Reviewers: tra

Subscribers: cfe-commits

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

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

8 years ago[PPC] Add long long/double support for vec_cts, vec_ctu and vec_ctf
Kyle Butt [Fri, 8 Jan 2016 02:00:48 +0000 (02:00 +0000)]
[PPC] Add long long/double support for vec_cts, vec_ctu and vec_ctf

Add long long/double support for vec_cts, vec_ctu and vec_ctf.

Similar to this change in GCC:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02653.html

Patch by Tim Shen.

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

8 years agoTurn off lldb debug tuning by default for FreeBSD
Dimitry Andric [Thu, 7 Jan 2016 22:09:47 +0000 (22:09 +0000)]
Turn off lldb debug tuning by default for FreeBSD

Summary:
This is the clang part of D15966.  In rL256104, debugger tuning was
added to the clang driver, and again the default for FreeBSD was set to
lldb.  The default needs to be gdb instead.

Reviewers: emaste, probinson

Subscribers: cfe-commits, emaste

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

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

8 years agoProperly track that a character literal is UTF-8, and pretty print the prefix properly.
Aaron Ballman [Thu, 7 Jan 2016 20:59:26 +0000 (20:59 +0000)]
Properly track that a character literal is UTF-8, and pretty print the prefix properly.

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

8 years ago[PGO] Simplify coverage mapping lowering
Xinliang David Li [Thu, 7 Jan 2016 20:05:55 +0000 (20:05 +0000)]
[PGO] Simplify coverage mapping lowering

Coverage mapping data may reference names of functions
that are skipped by FE (e.g, unused inline functions). Since
those functions are skipped, normal instr-prof function lowering
pass won't put those names in the right section, so special
handling is needed to walk through coverage mapping structure
and recollect the references.

With this patch, only names that are skipped are processed. This
simplifies the lowering code and it no longer needs to make
assumptions coverage mapping data layout. It should also be
more efficient.

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

8 years agoRemove extraneous "Note t" in comment.
Justin Lebar [Thu, 7 Jan 2016 19:38:29 +0000 (19:38 +0000)]
Remove extraneous "Note t" in comment.

Added in r167571.

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

8 years agoCorrecting the comment in a header file; NFC.
Aaron Ballman [Thu, 7 Jan 2016 19:00:54 +0000 (19:00 +0000)]
Correcting the comment in a header file; NFC.

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

8 years agoclang-format: Fix corner case in one-per-line formatting.
Daniel Jasper [Thu, 7 Jan 2016 18:11:54 +0000 (18:11 +0000)]
clang-format: Fix corner case in one-per-line formatting.

Before (example is JS, but also applies to C++):
  return [
    aaaa()
        .bbbbbbbb('A'),
    aaaa().bbbbbbbb('B'),
    aaaa().bbbbbbbb('C'),
  ];

After:
  return [
    aaaa().bbbbbbbb('A'),
    aaaa().bbbbbbbb('B'),
    aaaa().bbbbbbbb('C'),
  ];

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

8 years ago[OpenMP] Fix issue in the offloading metadata testing.
Samuel Antao [Thu, 7 Jan 2016 14:58:16 +0000 (14:58 +0000)]
[OpenMP] Fix issue in the offloading metadata testing.

 - Allow device ID to be signed.
 - Add missing semicolon to some of the CHECK directives.

Thanks to Amjad Aboud for detecting the issue.

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

8 years agoclang-format: Support weird lambda macros.
Daniel Jasper [Thu, 7 Jan 2016 14:36:11 +0000 (14:36 +0000)]
clang-format: Support weird lambda macros.

Before:
  MACRO((AA & a) { return 1; });

After:
  MACRO((AA &a) { return 1; });

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

8 years agoAdd missing -no-canonical-prefixes.
Daniel Jasper [Thu, 7 Jan 2016 12:53:59 +0000 (12:53 +0000)]
Add missing -no-canonical-prefixes.

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

8 years ago[libclang] Handle AutoType in clang_getTypeDeclaration
Sergey Kalinichev [Thu, 7 Jan 2016 09:20:40 +0000 (09:20 +0000)]
[libclang] Handle AutoType in clang_getTypeDeclaration

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

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

8 years agoARM: allow __thread on OS versions that have the required runtime support.
Tim Northover [Thu, 7 Jan 2016 09:04:46 +0000 (09:04 +0000)]
ARM: allow __thread on OS versions that have the required runtime support.

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

8 years agoMake sure we claim arguments that are going to be passed to a gcc tool,
Eric Christopher [Thu, 7 Jan 2016 09:03:42 +0000 (09:03 +0000)]
Make sure we claim arguments that are going to be passed to a gcc tool,
even if they're not going to be used to avoid unused option warnings.

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

8 years agoclang-format: [JS] Support more ES6 imports.
Daniel Jasper [Thu, 7 Jan 2016 08:53:35 +0000 (08:53 +0000)]
clang-format: [JS] Support more ES6 imports.

Before:
  import a, {X, Y}
  from 'some/module.js';

After:
  import a, {X, Y} from 'some/module.js';

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

8 years ago[WebAssembly] Add -m:e to the target triple.
Dan Gohman [Thu, 7 Jan 2016 03:20:15 +0000 (03:20 +0000)]
[WebAssembly] Add -m:e to the target triple.

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

8 years ago[Sema] Teach overload resolution about unaddressable functions.
George Burgess IV [Thu, 7 Jan 2016 02:26:57 +0000 (02:26 +0000)]
[Sema] Teach overload resolution about unaddressable functions.

Given an expression like `(&Foo)();`, we perform overload resolution as
if we are calling `Foo` directly. This causes problems if `Foo` is a
function that can't have its address taken. This patch teaches overload
resolution to ignore functions that can't have their address taken in
such cases.

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

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

8 years agoReplace a loop with the call that does the same thing.
Eric Christopher [Thu, 7 Jan 2016 02:00:55 +0000 (02:00 +0000)]
Replace a loop with the call that does the same thing.

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

8 years agoRemove leading space added in r227312.
Eric Christopher [Thu, 7 Jan 2016 01:23:21 +0000 (01:23 +0000)]
Remove leading space added in r227312.

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

8 years agoUse an actual real architecture and massage a couple of comments.
Eric Christopher [Thu, 7 Jan 2016 01:23:19 +0000 (01:23 +0000)]
Use an actual real architecture and massage a couple of comments.

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

8 years agoTest that we're not forwarding on -g options to the non integrated assembler.
Eric Christopher [Thu, 7 Jan 2016 01:23:12 +0000 (01:23 +0000)]
Test that we're not forwarding on -g options to the non integrated assembler.

This is adding a test for an old fixed PR to make sure we don't regress.

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

8 years agoImprove documentation comments for IdentifierNamespace values.
Richard Smith [Thu, 7 Jan 2016 01:17:43 +0000 (01:17 +0000)]
Improve documentation comments for IdentifierNamespace values.

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

8 years ago[WebAssembly] Add a test to ensure that -fvisibility=default works.
Dan Gohman [Thu, 7 Jan 2016 01:15:05 +0000 (01:15 +0000)]
[WebAssembly] Add a test to ensure that -fvisibility=default works.

It should override the default of -fvisibility=hidden.

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

8 years ago[WebAssembly] Enable -fvisibility=hidden by default.
Dan Gohman [Thu, 7 Jan 2016 01:00:21 +0000 (01:00 +0000)]
[WebAssembly] Enable -fvisibility=hidden by default.

This, along with many things in the WebAssembly target, is experimental.
Feedback is welcome.

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