]> granicus.if.org Git - clang/log
clang
8 years agoP0001R1: 'register' storage class specifier is no longer permitted in C++1z.
Richard Smith [Wed, 25 Nov 2015 21:34:21 +0000 (21:34 +0000)]
P0001R1: 'register' storage class specifier is no longer permitted in C++1z.

We will still allow it in system headers, in macros from system headers, when
combined with an 'asm' label, and under the flag -Wno-register.

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

8 years agoStop using SFINAE to detect whether a derived-class override of Traverse* can
Richard Smith [Wed, 25 Nov 2015 19:33:20 +0000 (19:33 +0000)]
Stop using SFINAE to detect whether a derived-class override of Traverse* can
take a queue; some supported versions of GCC believe that this substitution
failure is an error. Instead, use a partial specialization to detect the type
of a pointer to the corresponding member. This is less general, but good enough
for our uses.

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

8 years ago[MSVC] 'property' with an empty array in array subscript expression.
Alexey Bataev [Wed, 25 Nov 2015 12:01:00 +0000 (12:01 +0000)]
[MSVC] 'property' with an empty array in array subscript expression.
MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition.
For example:
```
__declspec(property(get=GetX, put=PutX)) int x[];
```
The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b), and p->x[a][b] = i will be turned into p->PutX(a, b, i);
Differential Revision: http://reviews.llvm.org/D13336

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

8 years ago[X86] Support for C calling convention only for MCU target.
Alexey Bataev [Wed, 25 Nov 2015 09:24:26 +0000 (09:24 +0000)]
[X86] Support for C calling convention only for MCU target.
For MCU only C calling convention is allowed, all other calling conventions are not supported.
Differential Revision: http://reviews.llvm.org/D14864

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

8 years agoFix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on...
Richard Smith [Wed, 25 Nov 2015 02:41:42 +0000 (02:41 +0000)]
Fix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on this).

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

8 years agoTeach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
Richard Smith [Tue, 24 Nov 2015 23:50:47 +0000 (23:50 +0000)]
Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,
to allow them to explicitly opt into data recursion despite having overridden
Traverse*Stmt or Traverse*Expr. Use this to reintroduce data recursion to the
one place that lost it when DataRecursiveASTVisitor was removed.

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

8 years ago[OpenMP] Parsing and sema support for num_teams clause
Kelvin Li [Tue, 24 Nov 2015 20:50:12 +0000 (20:50 +0000)]
[OpenMP] Parsing and sema support for num_teams clause

http://reviews.llvm.org/D14802

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

8 years agoReplace [=] lambda capture with [&] per David BlaikieĆ¾ suggestion.
Yaron Keren [Tue, 24 Nov 2015 20:18:24 +0000 (20:18 +0000)]
Replace [=] lambda capture with [&] per David BlaikieĆ¾ suggestion.

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

8 years ago[analyzer] Pass value expression for inlined defensive checks when binding null to...
Devin Coughlin [Tue, 24 Nov 2015 19:15:11 +0000 (19:15 +0000)]
[analyzer] Pass value expression for inlined defensive checks when binding null to nonnull.

The nullability checker was not suppressing false positives resulting from
inlined defensive checks when null was bound to a nonnull variable because it
was passing the entire bind statement rather than the value expression to
trackNullOrUndefValue().

This commit changes that checker to synactically match on the bind statement to
extract the value expression so it can be passed to trackNullOrUndefValue().

rdar://problem/23575439

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

8 years agoFix rewrite of reserved library name in case of -nodefaultlibs
Nirav Dave [Tue, 24 Nov 2015 16:07:21 +0000 (16:07 +0000)]
Fix rewrite of reserved library name in case of -nodefaultlibs

The Driver only checked if nostdlib was set when deciding to add
reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and
nostartfiles we should be checking one (clearly nodefaultlibs in the
case) as well. This appears to be the only such instance of this in the
codebase.

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

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

8 years ago[OPENMP] Fix crash on codegen for 'task' directive with no shared variables.
Alexey Bataev [Tue, 24 Nov 2015 13:01:44 +0000 (13:01 +0000)]
[OPENMP] Fix crash on codegen for 'task' directive with no shared variables.
If 'task' region does not have shared variables codegen could crash on calculation of size of list of shared variables.

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

8 years agoReduce the stack usage per recursive step when RecursiveASTVisitor cannot perform...
Richard Smith [Tue, 24 Nov 2015 07:13:06 +0000 (07:13 +0000)]
Reduce the stack usage per recursive step when RecursiveASTVisitor cannot perform data recursion.

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

8 years ago[modules] Add -cc1 flag -fmodules-embed-all-files.
Richard Smith [Tue, 24 Nov 2015 04:22:21 +0000 (04:22 +0000)]
[modules] Add -cc1 flag -fmodules-embed-all-files.

This flag causes all files that were read by the compilation to be embedded
into a produced module file. This is useful for distributed build systems that
use an include scanning system to determine which files are "needed" by a
compilation, and only provide those files to remote compilation workers. Since
using a module can require any file that is part of that module (or anything it
transitively includes), files that are not found by an include scanner can be
required in a regular build using explicit modules. With this flag, only files
that are actually referenced by transitively-#included files are required to be
present on the build machine.

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

8 years agoRemove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just...
Richard Smith [Tue, 24 Nov 2015 03:55:01 +0000 (03:55 +0000)]
Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor.

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

8 years agoUse data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.
Richard Smith [Tue, 24 Nov 2015 03:09:01 +0000 (03:09 +0000)]
Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.

When RAV traverses a Stmt or Expr node, if the corresponding Traverse*
functions have not been overridden, it will now use data recursion to walk
those nodes. We arrange this to be an unobservable optimization to RAV
subclasses, and to gracefully degrade as parts of the visitation are overridden
with functions that might observe the visitation.

For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure
that there are real recursive stack frames for those traversals, but we'll
use data recursion for all other traversals.

This removes the need for DataRecursiveASTVisitor, and for the
'shouldUseDataRecursionFor' extension point, both of which are removed by this
change.

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

8 years agoDo not attempt to include CUDA headers during the test.
Artem Belevich [Tue, 24 Nov 2015 02:45:55 +0000 (02:45 +0000)]
Do not attempt to include CUDA headers during the test.

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

8 years ago[coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form...
Richard Smith [Tue, 24 Nov 2015 02:34:39 +0000 (02:34 +0000)]
[coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form the initial_suspend, final_suspend, and get_return_object calls.

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

8 years agoCodeGenFunction.h: Prune a \param in r253926. [-Wdocumentation]
NAKAMURA Takumi [Mon, 23 Nov 2015 23:38:13 +0000 (23:38 +0000)]
CodeGenFunction.h: Prune a \param in r253926. [-Wdocumentation]

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

8 years agoNFC. Fixing my consistently incorrect spelling.
Chris Bieneman [Mon, 23 Nov 2015 23:34:13 +0000 (23:34 +0000)]
NFC. Fixing my consistently incorrect spelling.

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

8 years agoclang-c/Index.h: Move \brief. [-Wdocumentation]
NAKAMURA Takumi [Mon, 23 Nov 2015 22:51:26 +0000 (22:51 +0000)]
clang-c/Index.h: Move \brief. [-Wdocumentation]

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

8 years agoPreserve exceptions information during calls code generation.
Samuel Antao [Mon, 23 Nov 2015 22:04:44 +0000 (22:04 +0000)]
Preserve exceptions information during calls code generation.

This patch changes the generation of CGFunctionInfo to contain
the FunctionProtoType if it is available. This enables the code
generation for call instructions to look into this type for
exception information and therefore generate better quality
IR - it will not create invoke instructions for functions that
are know not to throw.

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

8 years agoFix a warning about commas at the end of enumerator lists.
Chad Rosier [Mon, 23 Nov 2015 21:05:04 +0000 (21:05 +0000)]
Fix a warning about commas at the end of enumerator lists.

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

8 years agoMake clang_Cursor_getMangling not mangle if the declaration isn't mangled
Ehsan Akhgari [Mon, 23 Nov 2015 19:56:46 +0000 (19:56 +0000)]
Make clang_Cursor_getMangling not mangle if the declaration isn't mangled

Right now clang_Cursor_getMangling will attempt to mangle any
declaration, even if the declaration isn't mangled (extern C).  This
results in a partially mangled name which isn't useful for much. This
patch makes clang_Cursor_getMangling return an empty string if the
declaration isn't mangled.

Patch by Michael Wu <mwu@mozilla.com>.

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

8 years agoReplace loop with std::any_of, NFC.
Yaron Keren [Mon, 23 Nov 2015 19:28:42 +0000 (19:28 +0000)]
Replace loop with std::any_of, NFC.
Inspired by similar commits from Craig Topper.

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

8 years agoclang-format: Re-add code path deleted in r253873 and add missing test.
Daniel Jasper [Mon, 23 Nov 2015 19:11:45 +0000 (19:11 +0000)]
clang-format: Re-add code path deleted in r253873 and add missing test.

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

8 years agoFix alignment of r253898
Martell Malone [Mon, 23 Nov 2015 19:05:19 +0000 (19:05 +0000)]
Fix alignment of r253898

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

8 years agoDriver: fallback to the location of clang if no sysroot,
Martell Malone [Mon, 23 Nov 2015 18:59:48 +0000 (18:59 +0000)]
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

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

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

8 years agoMake tbm-builtins.c as X86 specific unit test
Sumanth Gundapaneni [Mon, 23 Nov 2015 17:33:49 +0000 (17:33 +0000)]
Make tbm-builtins.c as X86 specific unit test

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

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

8 years agoDisable frame pointer elimination when using -pg
Xinliang David Li [Mon, 23 Nov 2015 17:30:31 +0000 (17:30 +0000)]
Disable frame pointer elimination when using -pg

(Re-apply patch after bug fixing)

This diff makes sure that the driver does not pass
-fomit-frame-pointer or -momit-leaf-frame-pointer to
the frontend when -pg is used. Currently, clang gives
an error if -fomit-frame-pointer is used in combination
with -pg, but -momit-leaf-frame-pointer was forgotten.
Also, disable frame pointer elimination in the frontend
when -pg is set.

Patch by Stefan Kempf.

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

8 years agoAdd an AST matcher for narrowing when a type is volatile-qualified.
Aaron Ballman [Mon, 23 Nov 2015 17:09:24 +0000 (17:09 +0000)]
Add an AST matcher for narrowing when a type is volatile-qualified.

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

8 years agoRevert part of r253813
Martell Malone [Mon, 23 Nov 2015 16:04:55 +0000 (16:04 +0000)]
Revert part of r253813
The new lld gnu frontend does not support the -target option

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

8 years agoclang-format: Signficantly refactor the cast detection.
Daniel Jasper [Mon, 23 Nov 2015 15:55:55 +0000 (15:55 +0000)]
clang-format: Signficantly refactor the cast detection.

No functional changes intended.

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

8 years agoclang-format: Fix incorrect cast detection.
Daniel Jasper [Mon, 23 Nov 2015 15:55:50 +0000 (15:55 +0000)]
clang-format: Fix incorrect cast detection.

Before:
  bool b = f(g<int>)&&c;

After:
  bool b = f(g<int>) && c;

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

8 years agoclang-format: If the template list of a variable declaration spans
Daniel Jasper [Mon, 23 Nov 2015 15:55:45 +0000 (15:55 +0000)]
clang-format: If the template list of a variable declaration spans
multiple lines, also break before the variable name.

Before:
  std::vector<aaaaaa, // wrap
              aa> aaa;

After:
  std::vector<aaaaaa, // wrap
              aa>
      aaa;

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

8 years ago[OPENMP] 'out' dependency for 'task' directives must be the same as 'inout'.
Alexey Bataev [Mon, 23 Nov 2015 13:33:42 +0000 (13:33 +0000)]
[OPENMP] 'out' dependency for 'task' directives must be the same as 'inout'.
Runtime library requires, that codegen for 'depend' clause for 'out' dependency kind must be the same as codegen for 'depend' clause with 'inout' dependency.

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

8 years ago[OpenCL 2.0] Apply default address space (AS).
Anastasia Stulova [Mon, 23 Nov 2015 11:14:44 +0000 (11:14 +0000)]
[OpenCL 2.0] Apply default address space (AS).

If AS of a variable/parameter declaration is not set by the source,
OpenCL v2.0 s6.5 defines explicit rules for default ASes:

- The AS of global and local static variables defaults to global;
- All pointers point to generic AS.

http://reviews.llvm.org/D13168

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

8 years agoFix clang-format test. I believe that the new behavior is better.
Daniel Jasper [Mon, 23 Nov 2015 08:50:52 +0000 (08:50 +0000)]
Fix clang-format test. I believe that the new behavior is better.

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

8 years agoclang-format: Make moving of the Cursor work properly when sorting #includes.
Daniel Jasper [Mon, 23 Nov 2015 08:36:35 +0000 (08:36 +0000)]
clang-format: Make moving of the Cursor work properly when sorting #includes.

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

8 years agoFix calculation of shifted cursor/code positions. Specifically support
Daniel Jasper [Mon, 23 Nov 2015 08:33:48 +0000 (08:33 +0000)]
Fix calculation of shifted cursor/code positions. Specifically support
the case where a specific range is replaced by new text. Previously,
the calculation would shift any position from within a replaced region
to the first character after the region. This is undersirable, e.g. for
clang-format's include sorting.

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

8 years agoOpenMPClause.h: Fix typos. [-Wdocumentation]
NAKAMURA Takumi [Mon, 23 Nov 2015 06:41:50 +0000 (06:41 +0000)]
OpenMPClause.h: Fix typos. [-Wdocumentation]

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

8 years ago[Driver] Mark isForDiagnostics as const. NFC.
Vedant Kumar [Mon, 23 Nov 2015 06:40:49 +0000 (06:40 +0000)]
[Driver] Mark isForDiagnostics as const. NFC.

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

8 years agoRevert r253846 (build bot failure))
Xinliang David Li [Mon, 23 Nov 2015 05:41:05 +0000 (05:41 +0000)]
Revert r253846 (build bot failure))

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

8 years ago[OpenMP] Parsing and sema support for map clause - add test case
Kelvin Li [Mon, 23 Nov 2015 05:36:37 +0000 (05:36 +0000)]
[OpenMP] Parsing and sema support for map clause - add test case

http://reviews.llvm.org/D14134

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

8 years ago[OpenMP] Parsing and sema support for map clause
Kelvin Li [Mon, 23 Nov 2015 05:32:03 +0000 (05:32 +0000)]
[OpenMP] Parsing and sema support for map clause

http://reviews.llvm.org/D14134

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

8 years agoDisable frame pointer elimination when using -pg
Xinliang David Li [Mon, 23 Nov 2015 05:09:10 +0000 (05:09 +0000)]
Disable frame pointer elimination when using -pg

This diff makes sure that the driver does not pass
-fomit-frame-pointer or -momit-leaf-frame-pointer to
the frontend when -pg is used. Currently, clang gives
an error if -fomit-frame-pointer is used in combination
with -pg, but -momit-leaf-frame-pointer was forgotten.
Also, disable frame pointer elimination in the frontend
when -pg is set.

Patch by Stefan Kempf.

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

8 years ago[MS ABI] Tolerate invokes of __RTDynamicCast
David Majnemer [Mon, 23 Nov 2015 03:01:14 +0000 (03:01 +0000)]
[MS ABI] Tolerate invokes of __RTDynamicCast

The pointer returned by __RTDynamicCast must be bitcasted.  However, it
was not expected that __RTDynamicCast would be invoked, resulting in the
bitcast occuring in a different BasicBlock than the invoke.  This caused
a down-stream PHI to get confused about which BasicBlock the incomming
value was from.

This fixes PR25606.

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

8 years ago[coroutines] Check for overload sets in co_yield / co_return operands being resolved...
Richard Smith [Sun, 22 Nov 2015 07:33:28 +0000 (07:33 +0000)]
[coroutines] Check for overload sets in co_yield / co_return operands being resolved by a call to yield_value / return_value before rejecting them.

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

8 years ago[coroutines] Build implicit return_value / return_void calls for co_return.
Richard Smith [Sun, 22 Nov 2015 07:05:16 +0000 (07:05 +0000)]
[coroutines] Build implicit return_value / return_void calls for co_return.

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

8 years agoTest: Update mingw-useld.c to reflect r253813
Martell Malone [Sun, 22 Nov 2015 05:45:03 +0000 (05:45 +0000)]
Test: Update mingw-useld.c to reflect r253813

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

8 years agoDriver: Specifically tell the linker the target for mingw-w64
Martell Malone [Sun, 22 Nov 2015 05:40:06 +0000 (05:40 +0000)]
Driver: Specifically tell the linker the target for mingw-w64

Cross compiling from linux and OSX results in Error: Exec format.
This is because the linker is expecting ELF formated objects.
By passing the target we can explicitly tell the linker that
it should be linking COFF objects regardless of the host.

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

8 years ago[coroutines] Materialize the awaitable before generating the await_* calls.
Richard Smith [Sun, 22 Nov 2015 03:13:02 +0000 (03:13 +0000)]
[coroutines] Materialize the awaitable before generating the await_* calls.

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

8 years ago[coroutines] Factor out co_await representation into common base class for co_await...
Richard Smith [Sun, 22 Nov 2015 02:57:17 +0000 (02:57 +0000)]
[coroutines] Factor out co_await representation into common base class for co_await and co_yield, and use it to hold await_* calls.

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

8 years agoclang-format: Make sorting includes respect // clang-format off
Daniel Jasper [Sat, 21 Nov 2015 09:17:08 +0000 (09:17 +0000)]
clang-format: Make sorting includes respect // clang-format off

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

8 years agoLet's try to fix this test again with a fixed target triple
Matthias Braun [Sat, 21 Nov 2015 02:28:42 +0000 (02:28 +0000)]
Let's try to fix this test again with a fixed target triple

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

8 years agoFix c-unicode.c testcase again.
Matthias Braun [Sat, 21 Nov 2015 02:13:29 +0000 (02:13 +0000)]
Fix c-unicode.c testcase again.

Specifying a fixed triple is not possible because that target may not
even be compiler. Go for a simpler fix by using a _? regex for the
prefix.

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

8 years agoFix testcase when building on darwin
Matthias Braun [Sat, 21 Nov 2015 00:56:41 +0000 (00:56 +0000)]
Fix testcase when building on darwin

Explicitely specify a target to avoid "_" prefixes on the names.

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

8 years ago[clang] Disable Unicode in asm files
Vinicius Tinti [Fri, 20 Nov 2015 23:42:39 +0000 (23:42 +0000)]
[clang] Disable Unicode in asm files

Clang should not convert tokens to Unicode when preprocessing assembly
files.

Fixes PR25558.

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

8 years ago[coroutines] Better handling of placeholder types.
Richard Smith [Fri, 20 Nov 2015 22:57:24 +0000 (22:57 +0000)]
[coroutines] Better handling of placeholder types.

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

8 years ago[coroutines] Support braced-init-list as operand of co_yield expression.
Richard Smith [Fri, 20 Nov 2015 22:47:10 +0000 (22:47 +0000)]
[coroutines] Support braced-init-list as operand of co_yield expression.

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

8 years ago[coroutines] Synthesize yield_value call for co_yield.
Richard Smith [Fri, 20 Nov 2015 22:40:06 +0000 (22:40 +0000)]
[coroutines] Synthesize yield_value call for co_yield.

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

8 years ago[CMake] Add support for specifying arguments to the bootstrap build.
Chris Bieneman [Fri, 20 Nov 2015 22:09:06 +0000 (22:09 +0000)]
[CMake] Add support for specifying arguments to the bootstrap build.

This adds support for three types of argument specifications for bootstrap builds:

(1) Arguments prefixed with BOOTSTRAP_* will be passed through with the leading BOOTSTRAP_ removed.
(2) CLANG_BOOTSTRAP_PASSTHROUGH can specify a list of variables to be passed through as they are set.
(3) BOOTSTRAP_DEFAULT_PASSTHROUGH is a list of some default passthrough variables that are always passed through. Those variables include the version string and should only specify variables that are always expected to be the same between the stage1 and stage2

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

8 years ago[CMake] Fix handling of passing through semi-colon separated lists.
Chris Bieneman [Fri, 20 Nov 2015 22:09:03 +0000 (22:09 +0000)]
[CMake] Fix handling of passing through semi-colon separated lists.

When passing around CMake arguments as lists of arguments any arguments containing lists need to have their semi-colons escaped otherwise CMake will split the arguments in the middle.

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

8 years agoDriver: Defer computation of linker path until it is needed.
Peter Collingbourne [Fri, 20 Nov 2015 20:49:39 +0000 (20:49 +0000)]
Driver: Defer computation of linker path until it is needed.

This allows us to construct Linux toolchains without a valid linker. This
is needed for example to build a CUDA device toolchain after r253385.

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

8 years agoFix test case function name checks
Bill Seurer [Fri, 20 Nov 2015 20:47:34 +0000 (20:47 +0000)]
Fix test case function name checks

This is similar to the earlier fix I did, r253702, expect that here it
is function names that are being searched for.  If the function name
matches part of the directory name it can cause an apparent test
case failure.

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

8 years agoThread Safety Analysis: Fix DenseMap iterator invalidation UAF
Reid Kleckner [Fri, 20 Nov 2015 19:08:30 +0000 (19:08 +0000)]
Thread Safety Analysis: Fix DenseMap iterator invalidation UAF

Rather than storing BeforeInfo in the DenseMap by value, this stores a
unique_ptr to it, so that we can keep a pointer to it live across
subsequent DenseMap insertions.

This change also removes the unique_ptr wrapper around BeforeVect
because now we're indirecting at a higher level.

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

8 years agoHonor system specific paths of MAN pages
Chris Bieneman [Fri, 20 Nov 2015 18:49:02 +0000 (18:49 +0000)]
Honor system specific paths of MAN pages

Summary: Caught on NetBSD.

Patch by: Kamil Rytarowski (krytarowski)

Reviewers: beanz, jroelofs

Subscribers: cfe-commits, joerg

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

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

8 years agoAdd -disable-llvm-passes for frontend debug info tests.
Dehao Chen [Fri, 20 Nov 2015 18:29:01 +0000 (18:29 +0000)]
Add -disable-llvm-passes for frontend debug info tests.

Summary: The frontend debuginfo tests should not invoke llvm passes which includes add-discriminators that will change the debug info generated by FE.

Reviewers: dblaikie

Subscribers: cfe-commits

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

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

8 years ago[DebugInfo] Look through type sugar on union types when casting
Reid Kleckner [Fri, 20 Nov 2015 17:41:12 +0000 (17:41 +0000)]
[DebugInfo] Look through type sugar on union types when casting

Fixes PR25584.

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

8 years agoRevert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"
Hans Wennborg [Fri, 20 Nov 2015 16:51:56 +0000 (16:51 +0000)]
Revert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"

The patch expanded the flag *at the end*, breaking invocations like:

  clang-cl /W4 -Wno-unused-parameter

Reverting for now.

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

8 years agoHandle ARMv6-J as an alias, instead of fake architecture
Artyom Skrobov [Fri, 20 Nov 2015 16:47:05 +0000 (16:47 +0000)]
Handle ARMv6-J as an alias, instead of fake architecture

Summary: Clang-side update, corresponding to D14755

Reviewers: rengolin, bogden, compnerd

Subscribers: aemerson, rengolin, cfe-commits

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

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

8 years agoclang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
Daniel Jasper [Fri, 20 Nov 2015 16:44:28 +0000 (16:44 +0000)]
clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly.

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

8 years agoclang-format: [JS] Properly add a space after "in" in for loops.
Daniel Jasper [Fri, 20 Nov 2015 16:18:42 +0000 (16:18 +0000)]
clang-format: [JS] Properly add a space after "in" in for loops.

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

8 years agoclang-format: [JS] struct and union aren't keywords / reserved words.
Daniel Jasper [Fri, 20 Nov 2015 15:58:50 +0000 (15:58 +0000)]
clang-format: [JS] struct and union aren't keywords / reserved words.

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

8 years agoclang-format: Don't use incorrect space in macro calls with operators.
Daniel Jasper [Fri, 20 Nov 2015 15:26:50 +0000 (15:26 +0000)]
clang-format: Don't use incorrect space in macro calls with operators.

Before:
  MACRO(> );

After:
  MACRO(>);

Not overly important, but easy and good for symmetry reasons :-).

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

8 years agoclang-format: [Proto] Support extending message.
Daniel Jasper [Fri, 20 Nov 2015 14:32:54 +0000 (14:32 +0000)]
clang-format: [Proto] Support extending message.

Before:
  extend.foo.Bar {
  }

After:
  extend .foo.Bar {
  }

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

8 years agoRegenerate ASTMatchersReference without CRLF.
Benjamin Kramer [Fri, 20 Nov 2015 07:57:46 +0000 (07:57 +0000)]
Regenerate ASTMatchersReference without CRLF.

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

8 years agoFix ASTMatcher reference newlines and make the generator script windows-proof.
Benjamin Kramer [Fri, 20 Nov 2015 07:46:19 +0000 (07:46 +0000)]
Fix ASTMatcher reference newlines and make the generator script windows-proof.

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

8 years ago[MS] Fix for bug 25013 - #pragma vtordisp is unknown inside functions, by Denis Zobnin.
Alexey Bataev [Fri, 20 Nov 2015 07:02:57 +0000 (07:02 +0000)]
[MS] Fix for bug 25013 - #pragma vtordisp is unknown inside functions, by Denis Zobnin.
This patch adds support of #pragma vtordisp inside functions in attempt to improve compatibility. Microsoft compiler appears to save the stack of vtordisp modes on entry of struct methods' bodies and restore it on exit (method-local vtordisp).
Differential Revision: http://reviews.llvm.org/D14467

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

8 years ago[Myriad]: handle Preprocess job action (-E)
Douglas Katzman [Fri, 20 Nov 2015 04:58:12 +0000 (04:58 +0000)]
[Myriad]: handle Preprocess job action (-E)

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

8 years ago[libclang] Make sure to use the raw module format for libclang parsing.
Argyrios Kyrtzidis [Fri, 20 Nov 2015 03:36:21 +0000 (03:36 +0000)]
[libclang] Make sure to use the raw module format for libclang parsing.

Fixes crash when passing '-gmodules' in the compiler options.
rdar://23588717

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

8 years ago[coroutines] Per latest wording paper, co_* are no longer permitted in any
Richard Smith [Fri, 20 Nov 2015 02:54:01 +0000 (02:54 +0000)]
[coroutines] Per latest wording paper, co_* are no longer permitted in any
unevaluated operands.

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

8 years ago[CMake] Add a specific 'install-clang-headers' target.
Argyrios Kyrtzidis [Fri, 20 Nov 2015 02:24:03 +0000 (02:24 +0000)]
[CMake] Add a specific 'install-clang-headers' target.

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

8 years ago[analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as...
Devin Coughlin [Fri, 20 Nov 2015 01:53:44 +0000 (01:53 +0000)]
[analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

The analyzer currently reports dead store false positives when a local variable
is captured by reference in a C++ lambda.

For example:

  int local = 0; auto lambda = [&local]() {
    local++;
  };
  local = 7; // False Positive: Value stored to 'local' is never read
  lambda();

In this case, the assignment setting `local` to 7 is not a dead store because
the called lambda will later read that assigned value.

This commit silences this source of false positives by treating locals captured
by reference in C++ lambdas as escaped, similarly to how the DeadStoresChecker
deals with locals whose address is taken.

rdar://problem/22165179

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

8 years agoSupport CMake's clang_rt.profile library naming scheme
Chris Bieneman [Fri, 20 Nov 2015 00:19:21 +0000 (00:19 +0000)]
Support CMake's clang_rt.profile library naming scheme

Summary: This code is a bit undesirable, but it gets clang to work with the autoconf and cmake-built libclang_rt.profile libraries.

Reviewers: bogner

Subscribers: cfe-commits

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

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

8 years agoAMDGPU: Add support for 's' and 'v' asm constraints
Tom Stellard [Thu, 19 Nov 2015 22:11:58 +0000 (22:11 +0000)]
AMDGPU: Add support for 's' and 'v' asm constraints

Summary: 's' is used to specify sgprs and 'v' is used to specify vgprs.

Reviewers: arsenm, echristo

Subscribers: cfe-commits

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

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

8 years agoUpdate clang tests to accomendate discriminator changes.
Dehao Chen [Thu, 19 Nov 2015 19:53:16 +0000 (19:53 +0000)]
Update clang tests to accomendate discriminator changes.

Summary: The discriminator change in http://reviews.llvm.org/D14738 will fail these clang tests. Update the test to accomendate the discriminator change.

Reviewers: dblaikie, davidxl, dnovillo

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

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

8 years agoChange the expression evaluation context from Unevaluated to ConstantEvaluated while...
Faisal Vali [Thu, 19 Nov 2015 19:20:17 +0000 (19:20 +0000)]
Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults.

Also address a typo from a prior patch that performed a similar fix during Parsing of default non-type template arguments.  I left the RAII ExpressionEvaluationContext variable Name as Unevaluated though we had switched the context to ConstantEvaluated.

There should be no functionality change here - since when expression evaluation context is popped off, for the most part these two contexts currently behave similarly in regards to lambda diagnostics and odr-use tracking.

Like its parsing counterpart, this patch presages the advent of constexpr lambda patches...

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

8 years agoclang-cl: Make /W4 imply -Wall -Wextra (PR25563)
Hans Wennborg [Thu, 19 Nov 2015 17:49:59 +0000 (17:49 +0000)]
clang-cl: Make /W4 imply -Wall -Wextra (PR25563)

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

8 years agoclangFrontend: [PR25565] Quick fix for dependencies on Attributes.inc.
NAKAMURA Takumi [Thu, 19 Nov 2015 10:59:48 +0000 (10:59 +0000)]
clangFrontend: [PR25565] Quick fix for dependencies on Attributes.inc.

FIXME: Attributes.inc may be an independent target.

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

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

8 years agoPR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Alexey Bataev [Thu, 19 Nov 2015 10:13:11 +0000 (10:13 +0000)]
PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Add support for vector mode attributes like "attribute((mode(V4SF)))". Also add warning about deprecated vector modes like GCC does.
Differential Revision: http://reviews.llvm.org/D14744

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

8 years agoRevert "Change memcpy/memset/memmove to have dest and source alignments."
Pete Cooper [Thu, 19 Nov 2015 05:55:59 +0000 (05:55 +0000)]
Revert "Change memcpy/memset/memmove to have dest and source alignments."

This reverts commit r253512.

This likely broke the bots in:
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

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

8 years agoRevert "Fix debian build after r253512."
Pete Cooper [Thu, 19 Nov 2015 05:55:44 +0000 (05:55 +0000)]
Revert "Fix debian build after r253512."

This reverts commit r253519.

This likely broke the bots in
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

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

8 years ago[coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_...
Richard Smith [Thu, 19 Nov 2015 02:36:35 +0000 (02:36 +0000)]
[coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits.

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

8 years agoDon't actually add the __unsafe_unretained qualifier in MRC;
John McCall [Thu, 19 Nov 2015 02:28:03 +0000 (02:28 +0000)]
Don't actually add the __unsafe_unretained qualifier in MRC;
driving a canonical difference between that and an unqualified
type is a really bad idea when both are valid.  Instead, remember
that it was there in a non-canonical way, then look for that in
the one place we really care about it: block captures.  The net
effect closely resembles the behavior of a decl attribute, except
still closely following ARC's standard qualifier parsing rules.

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

8 years agoFix the emission of ARC-style ivar layouts in the fragile runtime
John McCall [Thu, 19 Nov 2015 02:27:55 +0000 (02:27 +0000)]
Fix the emission of ARC-style ivar layouts in the fragile runtime
to start at the offset of the first ivar instead of the rounded-up
end of the superclass.  The latter could include a large amount of
tail padding because of a highly-aligned ivar, and subclass ivars
can be laid out within that.

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

8 years ago[analyzer] Improve modeling of static initializers.
Anna Zaks [Thu, 19 Nov 2015 01:25:28 +0000 (01:25 +0000)]
[analyzer] Improve modeling of static initializers.

Conversions between unrelated pointer types (e.g. char * and void *) involve
bitcasts which were not properly modeled in case of static initializers. The
patch fixes this problem.

The problem was originally spotted by Artem Dergachev. Patched by Yuri Gribov!

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

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

8 years ago[MS ABI] Let arbitrary entities participate in vftable ordering
David Majnemer [Thu, 19 Nov 2015 00:03:54 +0000 (00:03 +0000)]
[MS ABI] Let arbitrary entities participate in vftable ordering

In the Microsoft ABI, the vftable is laid out in the order in the
declaration order of the entities defined within it.

Obviously, only virtual methods end up in the vftable but they will be
placed into the table at the same position as the first entity with the
same name.

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

8 years agoFix debian build after r253512.
Pete Cooper [Wed, 18 Nov 2015 22:53:40 +0000 (22:53 +0000)]
Fix debian build after r253512.

The conversion from QuantityType to the (temporary) IntegerAlignment class
was ambiguous.

For now add in explicit conversion to unsigned to satisfy the clang-x86_64-debian-fast bot.

I'll remove the explicit conversion when I remove the IntegerAlignment class.

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

8 years ago[analyzer] Skip checking blocks in dependent contexts.
Devin Coughlin [Wed, 18 Nov 2015 22:46:52 +0000 (22:46 +0000)]
[analyzer] Skip checking blocks in dependent contexts.

Since we don't check functions in dependent contexts, we should skip blocks
in those contexts as well. This avoids an assertion failure when the
DeadStoresChecker attempts to evaluate an array subscript expression with
a dependent name type.

rdar://problem/23564220

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

8 years agoChange memcpy/memset/memmove to have dest and source alignments.
Pete Cooper [Wed, 18 Nov 2015 22:18:45 +0000 (22:18 +0000)]
Change memcpy/memset/memmove to have dest and source alignments.

This is a follow on from a similar LLVM commit: r253511.

Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

These intrinsics currently have an explicit alignment argument which is
required to be a constant integer.  It represents the alignment of the
source and dest, and so must be the minimum of those.

This change allows source and dest to each have their own alignments
by using the alignment attribute on their arguments.  The alignment
argument itself is removed.

The only code change to clang is hidden in CGBuilder.h which now passes
both dest and source alignment to IRBuilder, instead of taking the minimum of
dest and source alignments.

Reviewed by Hal Finkel.

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