]> granicus.if.org Git - clang/log
clang
8 years ago[WinEH] Make sure terminate handlers have funclet operands
David Majnemer [Wed, 24 Feb 2016 17:02:45 +0000 (17:02 +0000)]
[WinEH] Make sure terminate handlers have funclet operands

Calls to the terminate handler must be annotated within the exception
region they are within.

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

8 years ago[docs] Change non-c++ code blocks to 'text' format to fix a sphinx warning.
Alexander Kornienko [Wed, 24 Feb 2016 15:07:48 +0000 (15:07 +0000)]
[docs] Change non-c++ code blocks to 'text' format to fix a sphinx warning.

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

8 years ago[OpenCL] Add Sema checks for OpenCL 2.0 block
Xiuli Pan [Wed, 24 Feb 2016 04:29:36 +0000 (04:29 +0000)]
[OpenCL] Add Sema checks for OpenCL 2.0 block

Summary:
Add Sema checks for opencl 2.0 new features: Block.
This patch is partitioned from http://reviews.llvm.org/D16047

Reviewers: Anastasia

Subscribers: pekka.jaaskelainen, cfe-commits

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

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

8 years agoDefault vaarg lowering should support indirect struct types.
James Y Knight [Wed, 24 Feb 2016 02:59:33 +0000 (02:59 +0000)]
Default vaarg lowering should support indirect struct types.

Fixes PR11517 for SPARC.

On most targets, clang lowers va_arg itself, eschewing the use of the
llvm vaarg instruction. This is necessary (at least for now) as the type
argument to the vaarg instruction cannot represent all the ABI
information that is needed to support complex calling conventions.

However, on targets with a simpler varrags ABIs, the LLVM instruction
can work just fine, and clang can simply lower to it. Unfortunately,
even on such targets, vaarg with a struct argument would fail, because
the default lowering to vaarg was naive: it didn't take into account the
ABI attribute computed by classifyArgumentType. In particular, for the
DefaultABIInfo, structs are supposed to be passed indirectly and so
llvm's vaarg instruction should be emitted with a pointer argument.

Now, vaarg instruction emission is able to use computed ABIArgInfo for
the provided argument type, which allows the default ABI support to work
for structs too.

I haven't touched the EmitVAArg implementation for PPC32_SVR4 or XCore,
although I believe both are now redundant, and could be switched over to
use the default implementation as well.

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

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

8 years agoPR24667: fix quadratic runtime if textually-included modular headers define large...
Richard Smith [Tue, 23 Feb 2016 23:20:51 +0000 (23:20 +0000)]
PR24667: fix quadratic runtime if textually-included modular headers define large numbers of macros.

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

8 years ago[analyzer] Find ObjC 'self' decl even when block captures local named 'self'.
Devin Coughlin [Tue, 23 Feb 2016 22:26:04 +0000 (22:26 +0000)]
[analyzer] Find ObjC 'self' decl even when block captures local named 'self'.

When looking up the 'self' decl in block captures, make sure to find the actual
self declaration even when the block captures a local variable named 'self'.

rdar://problem/24751280

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

8 years ago[CMake] Add install-clang-format target by migrating to add_clang_tool
Chris Bieneman [Tue, 23 Feb 2016 20:33:15 +0000 (20:33 +0000)]
[CMake] Add install-clang-format target by migrating to add_clang_tool

This change migrates clang-format to add_clang_tool which makes a component-based install target. To support component-based installation the extra installed scripts all need to have the "clang-format" component too.

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

8 years agoRename Action::begin() to Action::input_begin().
Nico Weber [Tue, 23 Feb 2016 19:30:43 +0000 (19:30 +0000)]
Rename Action::begin() to Action::input_begin().

Also introduce inputs() that reutnrs an llvm::iterator_range.
Iterating over A->inputs() is much less mysterious than
iterating over *A.  No intended behavior change.

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

8 years agoReapply r261657.
Adrian Prantl [Tue, 23 Feb 2016 19:30:08 +0000 (19:30 +0000)]
Reapply r261657.
Remove an unnecessary workaround introduced in r259975. (NFC)

Now that LLVM r259973 allows replacing a temporary type with another
temporary we can rely on the original implementation.

It is possible for enums to be created as part of
their own declcontext. In this case a FwdDecl will be created
twice. This doesn't cause a problem because both FwdDecls are
entered into the ReplaceMap: finalize() will replace the first
FwdDecl with the second and then replace the second with
complete type.

Thanks to echristo for pointing this out.

# Conflicts:
# lib/CodeGen/CGDebugInfo.cpp

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

8 years agoRevert r261634 "Supporting all entities declared in lexical scope in LLVM debug info...
Hans Wennborg [Tue, 23 Feb 2016 19:10:16 +0000 (19:10 +0000)]
Revert r261634 "Supporting all entities declared in lexical scope in LLVM debug info." and r261657

r261634 and r261633 seems to have caused PR26715. r261657 depends on the former two.

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

8 years agoAmends r252104 to evaluate the controlling expression in an unevaluated context....
Aaron Ballman [Tue, 23 Feb 2016 18:55:15 +0000 (18:55 +0000)]
Amends r252104 to evaluate the controlling expression in an unevaluated context. This eliminates false-positive diagnostics about null pointer dereferences (etc) in the controlling expression.

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

8 years agoRemove an unnecessary workaround introduced in r259975. (NFC)
Adrian Prantl [Tue, 23 Feb 2016 17:13:47 +0000 (17:13 +0000)]
Remove an unnecessary workaround introduced in r259975. (NFC)

Now that LLVM r259973 allows replacing a temporary type with another
temporary we can rely on the original implementation.

It is possible for enums to be created as part of
their own declcontext. In this case a FwdDecl will be created
twice. This doesn't cause a problem because both FwdDecls are
entered into the ReplaceMap: finalize() will replace the first
FwdDecl with the second and then replace the second with
complete type.

Thanks to echristo for pointing this out.

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

8 years agoRevert "[VFS] Add support for handling path traversals"
Bruno Cardoso Lopes [Tue, 23 Feb 2016 17:06:50 +0000 (17:06 +0000)]
Revert "[VFS] Add support for handling path traversals"

This reverts commit r261551 due to failing tests in windows bots:

http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10054

Failing Tests (4):
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.CaseInsensitive
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.DirectoryIteration
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MappedFiles
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.UseExternalName

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

8 years agoFix a typo. NFC
Alexander Kornienko [Tue, 23 Feb 2016 16:12:08 +0000 (16:12 +0000)]
Fix a typo. NFC

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

8 years agoClean up clang-format options documentation. NFC
Alexander Kornienko [Tue, 23 Feb 2016 16:12:00 +0000 (16:12 +0000)]
Clean up clang-format options documentation. NFC

Use uniform style for inline code blocks, specify language for YAML code blocks,
various formatting fixes etc.

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

8 years agoSupport language selection for \code blocks.
Alexander Kornienko [Tue, 23 Feb 2016 16:11:55 +0000 (16:11 +0000)]
Support language selection for \code blocks.

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

8 years agoUpdate clang-format options docs.
Alexander Kornienko [Tue, 23 Feb 2016 16:11:51 +0000 (16:11 +0000)]
Update clang-format options docs.

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

8 years agoAllow running dump_format_style.py from any directory.
Alexander Kornienko [Tue, 23 Feb 2016 16:11:43 +0000 (16:11 +0000)]
Allow running dump_format_style.py from any directory.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding prorv{d|q}{128|256|512} builtin to clang
Michael Zuckerman [Tue, 23 Feb 2016 15:59:47 +0000 (15:59 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding prorv{d|q}{128|256|512} builtin to clang

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

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding pro{lv|r}{d|q}{128|256|512} builtin to clang
Michael Zuckerman [Tue, 23 Feb 2016 14:23:53 +0000 (14:23 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding pro{lv|r}{d|q}{128|256|512} builtin to clang

Adding closer to the end of macro }->})

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

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding pro{lv|r}{d|q}{128|256|512} builtin to clang
Michael Zuckerman [Tue, 23 Feb 2016 13:41:13 +0000 (13:41 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding pro{lv|r}{d|q}{128|256|512} builtin to clang

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

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

8 years agoSupporting all entities declared in lexical scope in LLVM debug info.
Amjad Aboud [Tue, 23 Feb 2016 13:37:18 +0000 (13:37 +0000)]
Supporting all entities declared in lexical scope in LLVM debug info.

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

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

8 years ago[analyzer] Improve pointer arithmetic checker.
Gabor Horvath [Tue, 23 Feb 2016 12:34:39 +0000 (12:34 +0000)]
[analyzer] Improve pointer arithmetic checker.

This patch is intended to improve pointer arithmetic checker.
From now on it only warns when the pointer arithmetic is likely to cause an
error. For example when the pointer points to a single object, or an array of
derived types.

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

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

8 years agoFix a -Wunused-variable diagnostic.
Alexander Kornienko [Tue, 23 Feb 2016 10:29:04 +0000 (10:29 +0000)]
Fix a -Wunused-variable diagnostic.

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

8 years agoPrint options, if requested.
Alexander Kornienko [Tue, 23 Feb 2016 10:29:02 +0000 (10:29 +0000)]
Print options, if requested.

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

8 years ago[ms-inline-asm] Fixing bug in single asm statement support
Marina Yatsina [Tue, 23 Feb 2016 08:53:45 +0000 (08:53 +0000)]
[ms-inline-asm] Fixing bug in single asm statement support

Fixing a crash caused by trying to merge a single-line asm statement with an asm block that follows it, e.g:
asm int 4
asm {
  int 5
}

Now, only adjacent single-line asm statements that are not surrounded by braces will be merged into one asm call.

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

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

8 years agoRevert "[VFS] Add 'overlay-relative' field to YAML files" and "[VFS] Fix call to...
Bruno Cardoso Lopes [Tue, 23 Feb 2016 07:06:12 +0000 (07:06 +0000)]
Revert "[VFS] Add 'overlay-relative' field to YAML files" and "[VFS] Fix call to getVFSFromYAML in unittests"

This reverts commit r261552 and r261556 because of failing unittests on
windows:

Failing Tests (4):
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.CaseInsensitive
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.DirectoryIteration
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MappedFiles
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.UseExternalName

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

8 years agoLex: Return "" when HeaderMap::lookupFilename fails
Duncan P. N. Exon Smith [Tue, 23 Feb 2016 00:48:16 +0000 (00:48 +0000)]
Lex: Return "" when HeaderMap::lookupFilename fails

Change getString() to return Optional<StringRef>, and change
lookupFilename() to return an empty string if either one of the prefix
and suffix can't be found.

This is a more robust follow-up to r261461, but it's still not entirely
satisfactory.  Ideally we'd report that the header map is corrupt;
perhaps something for a follow-up.

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

8 years agoLex: Check for 0 buckets on header map construction
Duncan P. N. Exon Smith [Mon, 22 Feb 2016 22:24:22 +0000 (22:24 +0000)]
Lex: Check for 0 buckets on header map construction

Switch to using `isPowerOf2_32()` to check whether the buckets are a
power of two, and as a side benefit reject loading a header map with no
buckets.  This is a follow-up to r261448.

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

8 years agoFix Visual Studio build after r261574
Hans Wennborg [Mon, 22 Feb 2016 22:21:58 +0000 (22:21 +0000)]
Fix Visual Studio build after r261574

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

8 years ago[ASTMatchers] Add matcher hasAnyName.
Samuel Benzaquen [Mon, 22 Feb 2016 21:13:02 +0000 (21:13 +0000)]
[ASTMatchers] Add matcher hasAnyName.

Summary: Add matcher hasAnyName as an optimization over anyOf(hasName(),...)

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] Add @return to the supported JSDoc pragmas in Google
Daniel Jasper [Mon, 22 Feb 2016 20:24:11 +0000 (20:24 +0000)]
clang-format: [JS] Add @return to the supported JSDoc pragmas in Google
style.

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

8 years ago[WebAssembly] Initial driver support for standard library paths.
Dan Gohman [Mon, 22 Feb 2016 19:26:15 +0000 (19:26 +0000)]
[WebAssembly] Initial driver support for standard library paths.

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

8 years ago[WebAssembly] Lower va_arg in clang.
Dan Gohman [Mon, 22 Feb 2016 19:17:40 +0000 (19:17 +0000)]
[WebAssembly] Lower va_arg in clang.

This uses the general emitVoidPtrVAArg lowering logic for everything, since
this supports all types, and we don't have any special requirements.

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

8 years ago[VFS] Fix call to getVFSFromYAML in unittests
Bruno Cardoso Lopes [Mon, 22 Feb 2016 19:02:27 +0000 (19:02 +0000)]
[VFS] Fix call to getVFSFromYAML in unittests

Follow up from r261552

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

8 years ago[VFS] Add 'overlay-relative' field to YAML files
Bruno Cardoso Lopes [Mon, 22 Feb 2016 18:41:09 +0000 (18:41 +0000)]
[VFS] Add 'overlay-relative' field to YAML files

The VFS overlay mapping between virtual paths and real paths is done through
the 'external-contents' entries in YAML files, which contains hardcoded paths
to the real files.

When a module compilation crashes, headers are dumped into <name>.cache/vfs
directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script
generated for reproduction uses -ivfsoverlay pointing to file to gather the
mapping between virtual paths and files inside <name>.cache/vfs. Currently, we
are only capable of reproducing such crashes in the same machine as they
happen, because of the hardcoded paths in 'external-contents'.

To be able to reproduce a crash in another machine, this patch introduces a new
option in the VFS yaml file called 'overlay-relative'. When it's equal to
'true' it means that the provided path to the YAML file through the
-ivfsoverlay option should also be used to prefix the final path for every
'external-contents'.

Example, given the invocation snippet "... -ivfsoverlay
<name>.cache/vfs/vfs.yaml" and the following entry in the yaml file:

"overlay-relative": "true",
"roots": [
...
  "type": "directory",
  "name": "/usr/include",
  "contents": [
    {
      "type": "file",
      "name": "stdio.h",
      "external-contents": "/usr/include/stdio.h"
    },
...

Here, a file manager request for virtual "/usr/include/stdio.h", that will map
into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h.

This is a useful feature for debugging module crashes in machines other than
the one where the error happened.

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

rdar://problem/24499339

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

8 years ago[VFS] Add support for handling path traversals
Bruno Cardoso Lopes [Mon, 22 Feb 2016 18:41:01 +0000 (18:41 +0000)]
[VFS] Add support for handling path traversals

Handle ".", ".." and "./" with trailing slashes while collecting files
to be dumped into the vfs overlay directory.

Include the support for symlinks into components. Given the path:

/install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin"
component is a symlink, it's not safe to use `path::remove_dots` here,
and `realpath` is used to get the right answer. Since `realpath`
is expensive, we only do it at collecting time (which only happens
during the crash reproducer) and cache the base directory for fast lookups.

Overall, this makes the input to the VFS YAML file to be canonicalized
to never contain traversal components.

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

rdar://problem/24499339

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

8 years agoAdd has_feature attribute_availability_with_strict.
Manman Ren [Mon, 22 Feb 2016 18:24:30 +0000 (18:24 +0000)]
Add has_feature attribute_availability_with_strict.

rdar://23791325

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

8 years ago[analyzer] Detect duplicate [super dealloc] calls
Devin Coughlin [Mon, 22 Feb 2016 17:56:24 +0000 (17:56 +0000)]
[analyzer] Detect duplicate [super dealloc] calls

Add an alpha path checker that warns about duplicate calls to [super dealloc].
This will form the foundation of a checker that will detect uses of
'self' after calling [super dealloc].

Part of rdar://problem/6953275.

Based on a patch by David Kilzer!

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

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

8 years agoDon't enable /GX by default
David Majnemer [Mon, 22 Feb 2016 17:44:51 +0000 (17:44 +0000)]
Don't enable /GX by default

The /GX flag is disabled unless explicitly specified on the command
line.  This partially addresses PR26698.

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

8 years ago[MS ABI] Correctly handle dllimport'd explicit instantiation declaration w/ vbases
David Majnemer [Mon, 22 Feb 2016 17:22:08 +0000 (17:22 +0000)]
[MS ABI] Correctly handle dllimport'd explicit instantiation declaration w/ vbases

We gave a VBTable dllimport storage class and external linkage while
also providing an initializer.  An initializer is only valid if the
VBTable has available_externally linkage.  Fix this by setting the
linkage to available_externally in situ while generating the
initializer.

This fixes PR26686.

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

8 years agoAdd a test for r261425.
David Majnemer [Mon, 22 Feb 2016 17:22:01 +0000 (17:22 +0000)]
Add a test for r261425.

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

8 years agoAdd support for Android Vector calling convention for AArch64
Nirav Dave [Mon, 22 Feb 2016 16:48:42 +0000 (16:48 +0000)]
Add support for Android Vector calling convention for AArch64

This modification applies the following Android commit when we have an
Android environment. This is the sole non-renderscript in the Android repo

commit 9212d4fb30a3ca2f4ee966dd2748c35573d9682c
Author: Tim Murray <timmurray@google.com>
Date:   Fri Aug 15 16:00:15 2014 -0700

    Update vector calling convention for AArch64.

    bug 16846318

    Change-Id: I3cfd167758b4bd634d8480ee6ba6bb55d61f82a7

Reviewers: srhines, jyknight

Subscribers: mcrosier, aemerson, rengolin, tberghammer, danalbert, srhines

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

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

8 years agoclang-format: [JS] treat forwardDeclare as an import/export statement.
Daniel Jasper [Mon, 22 Feb 2016 15:06:53 +0000 (15:06 +0000)]
clang-format: [JS] treat forwardDeclare as an import/export statement.

Patch by Martin Probst. Thank you.

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

8 years agoUse an anonymous hyperlink reference to eliminate Sphinx warnings.
Aaron Ballman [Mon, 22 Feb 2016 13:09:36 +0000 (13:09 +0000)]
Use an anonymous hyperlink reference to eliminate Sphinx warnings.

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

8 years agoMake Sema::CheckFormatString a static function inside SemaChecking.cpp
Andy Gibbs [Mon, 22 Feb 2016 13:00:43 +0000 (13:00 +0000)]
Make Sema::CheckFormatString a static function inside SemaChecking.cpp

No functionality change.  Change at the request of Richard Trieu, see
http://reviews.llvm.org/D15636#357858.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding prol{d|q|w}{128|256|512} builtin to clang .
Michael Zuckerman [Mon, 22 Feb 2016 09:42:57 +0000 (09:42 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding prol{d|q|w}{128|256|512} builtin to clang .

Fixing problem with the lib/include/avx512vlintrin.h file.
Adding one more _ to the prefix of _extension__ -> __extension__.

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

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding prol{d|q|w}{128|256|512} builtin to clang .
Michael Zuckerman [Mon, 22 Feb 2016 09:05:41 +0000 (09:05 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding prol{d|q|w}{128|256|512} builtin to clang .

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

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

8 years agoAddressing review comments for r261163.
Manman Ren [Mon, 22 Feb 2016 04:47:24 +0000 (04:47 +0000)]
Addressing review comments for r261163.

Use "strict" instead of "nopartial". Also make strictly not-introduced
share the same diagnostics as Obsolete and Unavailable.

rdar://23791325

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

8 years agoFix PR24473 : Teach clang to remember to substitute into member variable templates...
Faisal Vali [Mon, 22 Feb 2016 02:24:29 +0000 (02:24 +0000)]
Fix PR24473 : Teach clang to remember to substitute into member variable templates referred to within dependent qualified ids.

In passing also fix a semi-related bug that allows access to variable templates through member access notation.

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

8 years ago[analyzer][scan-build] Non-existing directory for scan-build output.
Anton Yartsev [Sun, 21 Feb 2016 17:04:26 +0000 (17:04 +0000)]
[analyzer][scan-build] Non-existing directory for scan-build output.

Makes scan-build successfully accept non-existing output directories provided via "-o" option. The directory is created in this case. This behavior is conforming to the old perl scan-build implementation.
(http://reviews.llvm.org/D17091)

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding pmovzx{b|d|w}{w|d|q}{128|256|512} builtin to clang
Michael Zuckerman [Sun, 21 Feb 2016 14:00:11 +0000 (14:00 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding pmovzx{b|d|w}{w|d|q}{128|256|512} builtin to clang

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

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

8 years agoAdded SKL and CNL processors and features to Clang
Elena Demikhovsky [Sun, 21 Feb 2016 07:41:23 +0000 (07:41 +0000)]
Added SKL and CNL processors and features to Clang

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

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

8 years agoClass Property: Fix a crash with old ABI when generating metadata in classes.
Manman Ren [Sun, 21 Feb 2016 05:31:05 +0000 (05:31 +0000)]
Class Property: Fix a crash with old ABI when generating metadata in classes.

rdar://23891898

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

8 years agoLex: Never overflow the file in HeaderMap::lookupFilename()
Duncan P. N. Exon Smith [Sun, 21 Feb 2016 00:14:36 +0000 (00:14 +0000)]
Lex: Never overflow the file in HeaderMap::lookupFilename()

If a header map file is corrupt, the strings in the string table may not
be null-terminated.  The logic here previously relied on `MemoryBuffer`
always being null-terminated, but this isn't actually guaranteed by the
class AFAICT.  Moreover, we're seeing a lot of crash traces at calls to
`strlen()` inside of `lookupFilename()`, so something is going wrong
there.

Instead, use `strnlen()` to get the length, and check for corruption.

Also remove code paths that could call `StringRef(nullptr)`.  r261459
made these rather obvious (although they'd been there all along).

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

8 years agoLex: Change HeaderMapImpl::getString() to return StringRef, NFC
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 23:12:51 +0000 (23:12 +0000)]
Lex: Change HeaderMapImpl::getString() to return StringRef, NFC

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

8 years agoLex: Use dbgs() instead of fprintf() in HeaderMap::dump()
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 23:09:14 +0000 (23:09 +0000)]
Lex: Use dbgs() instead of fprintf() in HeaderMap::dump()

This way it's easy to change HeaderMapImpl::getString() to return a
StringRef.

There's a slight change here, because I used `errs()` instead of
`dbgs()`.  But `dbgs()` is more appropriate for a dump method.

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

8 years agoLex: Add a test for HeaderMap::lookupFileName()
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 22:53:22 +0000 (22:53 +0000)]
Lex: Add a test for HeaderMap::lookupFileName()

Add a simple test for `HeaderMap::lookupFileName()`.  I'm planning to
add better error checking in a moment, and I'll add more tests like this
then.

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

8 years agoLex: Check whether the header map buffer has space for the buckets
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 21:24:31 +0000 (21:24 +0000)]
Lex: Check whether the header map buffer has space for the buckets

Check up front whether the header map buffer has space for all of its
declared buckets.

There was already a check in `getBucket()`, but it had UB (comparing
pointers that were outside of objects in the error path) and was
insufficient (only checking for a single byte of the relevant bucket).
I fixed the check, moved it to `checkHeader()`, and left a fixed version
behind as an assertion.

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

8 years agoLex: Check buckets on header map construction
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 21:00:58 +0000 (21:00 +0000)]
Lex: Check buckets on header map construction

If the number of buckets is not a power of two, immediately recognize
the header map as corrupt, rather than waiting for the first lookup.  I
converted the later check to an assert.

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

8 years agoLex: Add some unit tests for corrupt header maps
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 20:39:51 +0000 (20:39 +0000)]
Lex: Add some unit tests for corrupt header maps

Split the implementation of `HeaderMap` into `HeaderMapImpl` so that we
can write unit tests that don't depend on the `FileManager`, and then
write a few tests that cover the types of corrupt header maps already
detected.

This also moves type and constant definitions from HeaderMap.cpp to
HeaderMapTypes.h so that the test can access them.

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

8 years ago[c-index-test] CMake: When installing c-index-test to a different prefix directory...
Argyrios Kyrtzidis [Sat, 20 Feb 2016 20:34:55 +0000 (20:34 +0000)]
[c-index-test] CMake: When installing c-index-test to a different prefix directory, add an rpath so that
it can find libclang.

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

8 years agoLex: clang-format HeaderMap.h, NFC
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 18:55:08 +0000 (18:55 +0000)]
Lex: clang-format HeaderMap.h, NFC

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

8 years agoLex: Remove explicitly deleted copy constructor, NFC
Duncan P. N. Exon Smith [Sat, 20 Feb 2016 18:53:45 +0000 (18:53 +0000)]
Lex: Remove explicitly deleted copy constructor, NFC

`std::unique_ptr<MemoryBuffer>` already deletes these, so there's no
reason for the boiler-plate in HeaderMap.

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

8 years ago[MSVC Compat] Implement -EHc semantics
David Majnemer [Sat, 20 Feb 2016 09:23:47 +0000 (09:23 +0000)]
[MSVC Compat] Implement -EHc semantics

The -EHc flag implicitly adds a nothrow attribute to any extern "C"
function when exceptions are enabled.

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

8 years ago[MSVC Compat] Add support for /GX, /GX-
David Majnemer [Sat, 20 Feb 2016 09:23:44 +0000 (09:23 +0000)]
[MSVC Compat] Add support for /GX, /GX-

These are legacy flags which map to /EHsc and /EHs-c- respectively.

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

8 years agoRemove -fnew-ms-eh
David Majnemer [Sat, 20 Feb 2016 09:23:41 +0000 (09:23 +0000)]
Remove -fnew-ms-eh

This flag no longer controls any behavior inside of clang.

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

8 years agoFix handling of vaargs on PPC32 when going from regsave to overflow.
Roman Divacky [Sat, 20 Feb 2016 08:31:24 +0000 (08:31 +0000)]
Fix handling of vaargs on PPC32 when going from regsave to overflow.

It can happen that when we only have 1 more register left in the regsave
area we need to store a value bigger than 1 register and therefore we
go to the overflow area. In this case we have to leave the last slot
in the regsave area unused and keep using overflow area. Do this
by storing a limit value to the used register counter in the overflow block.

Issue diagnosed by and solution tested by Mark Millard!

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

8 years ago[OPENMP 4.5] Initial support for data members in 'lastprivate' clause.
Alexey Bataev [Sat, 20 Feb 2016 04:09:36 +0000 (04:09 +0000)]
[OPENMP 4.5] Initial support for data members in 'lastprivate' clause.

OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch adds initial support for data
members.

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

8 years agoRemove a duplicate declaration specifier from _ReadBarrier
David Majnemer [Sat, 20 Feb 2016 00:57:00 +0000 (00:57 +0000)]
Remove a duplicate declaration specifier from _ReadBarrier

This fixes PR26675.

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

8 years ago[modules] Do less scanning of macro definition chains when computing the set of
Richard Smith [Fri, 19 Feb 2016 22:43:58 +0000 (22:43 +0000)]
[modules] Do less scanning of macro definition chains when computing the set of
exported module macros outside local submodule visibility mode. Related to
PR24667.

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

8 years ago[modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single
Richard Smith [Fri, 19 Feb 2016 22:25:36 +0000 (22:25 +0000)]
[modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single
option. Previously these options could both be used to specify that you were
compiling the implementation file of a module, with a different set of minor
bugs in each case.

This change removes -fmodule-implementation-of, and instead tracks a flag to
determine whether we're currently building a module. -fmodule-name now behaves
the same way that -fmodule-implementation-of previously did.

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

8 years ago[OpenCL] Generate metadata for opencl_unroll_hint attribute
Anastasia Stulova [Fri, 19 Feb 2016 18:30:11 +0000 (18:30 +0000)]
[OpenCL] Generate metadata for opencl_unroll_hint attribute

Add support for opencl_unroll_hint attribute from OpenCL v2.0 s6.11.5.

Reusing most of metadata generation from CGLoopInfo helper class.

The code is based on Khronos OpenCL compiler:
https://github.com/KhronosGroup/SPIR/tree/spirv-1.0

Patch by Liu Yaxun (Sam)!

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

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

8 years agoRemoved unused local variable
Serge Pavlov [Fri, 19 Feb 2016 12:06:23 +0000 (12:06 +0000)]
Removed unused local variable

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

8 years agopr26544: Bitfield layout with pragma pack and attributes "packed" and
Alexey Bataev [Fri, 19 Feb 2016 11:23:28 +0000 (11:23 +0000)]
pr26544: Bitfield layout with pragma pack and attributes "packed" and
"aligned", by Vladimir Yakovlev

Fix clang/gcc incompatibility of bitfields layout in the presence of
pragma packed and attributes aligned and packed.
Differential Revision: http://reviews.llvm.org/D17023

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

8 years ago[OPENMP] Improved layout of CGOpenMPRuntime class, NFC.
Alexey Bataev [Fri, 19 Feb 2016 10:38:26 +0000 (10:38 +0000)]
[OPENMP] Improved layout of CGOpenMPRuntime class, NFC.

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

8 years agoCorrect typos after acting on invalid subscript expressions
David Majnemer [Fri, 19 Feb 2016 07:15:33 +0000 (07:15 +0000)]
Correct typos after acting on invalid subscript expressions

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

8 years agoAdd test.
JF Bastien [Fri, 19 Feb 2016 06:54:47 +0000 (06:54 +0000)]
Add test.

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

8 years agoARM: fix VFP asm constraints
JF Bastien [Fri, 19 Feb 2016 06:54:45 +0000 (06:54 +0000)]
ARM: fix VFP asm constraints

Summary:
Rich Felker was sad that clang used 'w' and 'P' for VFP constraints when GCC documents them as 't' and 'w':
  https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

This was added way back in 2008:
  http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20080421/005393.html

Subscribers: aemerson, rengolin, cfe-commits

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

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

8 years agoFix SemaTemplate/instantiate-field.cpp after r261297.
Nico Weber [Fri, 19 Feb 2016 02:51:07 +0000 (02:51 +0000)]
Fix SemaTemplate/instantiate-field.cpp after r261297.

For templates, fields can have incomplete types:

  template <class T>
  struct A2 {
    struct B;
    B b;
  };

Don't try to touch the DefinitionData of those fields.

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

8 years agoImplement the likely resolution of core issue 253.
Nico Weber [Fri, 19 Feb 2016 01:52:46 +0000 (01:52 +0000)]
Implement the likely resolution of core issue 253.

C++11 requires const objects to have a user-provided constructor, even for
classes without any fields. DR 253 relaxes this to say "If the implicit default
constructor initializes all subobjects, no initializer should be required."

clang is currently the only compiler that implements this C++11 rule, and e.g.
libstdc++ relies on something like DR 253 to compile in newer versions.  This
change  makes it possible to build code that says `const vector<int> v;' again
when using libstdc++5.2 and _GLIBCXX_DEBUG
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60284).

Fixes PR23381.

http://reviews.llvm.org/D16552

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

8 years agoUpdate cxx_dr_status.html with today's cwg_index.html.
Nico Weber [Fri, 19 Feb 2016 01:49:39 +0000 (01:49 +0000)]
Update cxx_dr_status.html with today's cwg_index.html.

Created by:
cd www
curl -O http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html
./make_cxx_dr_status

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

8 years ago[analyzer] Add checker callback for beginning of function.
Devin Coughlin [Fri, 19 Feb 2016 01:35:10 +0000 (01:35 +0000)]
[analyzer] Add checker callback for beginning of function.

Add a checker callback that is called when the analyzer starts analyzing a
function either at the top level or when inlined. This will be used by a
follow-on patch making the DeallocChecker path sensitive.

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

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

8 years ago[Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly
Reid Kleckner [Fri, 19 Feb 2016 01:15:08 +0000 (01:15 +0000)]
[Sema] PR25181 Fix crash when method declaration with throw spec fails to parse correctly

Fixes crash referenced in PR25181 where dyn_cast is called on a null
instance of LM.Method.

Reviewers: majnemer, rnk

Patch by Don Hinton

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

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

8 years agoAdd call to find_package to load LLVM dependencies
Reid Kleckner [Fri, 19 Feb 2016 00:56:56 +0000 (00:56 +0000)]
Add call to find_package to load LLVM dependencies

ClangConfig requires LLVMConfig, so add find_package call in
ClangConfig so find_package(clang REQUIRED CONFIG) will just work.  This
makes it easier for cmake based projects to use clang, e.g., tools using
ClangTooling.

Patch by Don Hinton

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

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

8 years agoFix my typo from r261278
Richard Trieu [Fri, 19 Feb 2016 00:15:50 +0000 (00:15 +0000)]
Fix my typo from r261278

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

8 years agoAdd -Wcomma warning to Clang.
Richard Trieu [Thu, 18 Feb 2016 23:58:40 +0000 (23:58 +0000)]
Add -Wcomma warning to Clang.

-Wcomma will detect and warn on most uses of the builtin comma operator.  It
currently whitelists the first and third statements of the for-loop.  For other
cases, the warning can be silenced by casting the first operand of the comma
operator to void.

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

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

8 years ago[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter class.
Argyrios Kyrtzidis [Thu, 18 Feb 2016 23:08:36 +0000 (23:08 +0000)]
[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter class.

Patch by Elisavet Sakellari!

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

8 years agoRemove use of builtin comma operator.
Richard Trieu [Thu, 18 Feb 2016 22:34:54 +0000 (22:34 +0000)]
Remove use of builtin comma operator.

Cleanup for upcoming Clang warning -Wcomma.  No functionality change intended.

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

8 years ago[Sema] Fix bug in TypeLocBuilder::pushImpl
Akira Hatanaka [Thu, 18 Feb 2016 21:05:09 +0000 (21:05 +0000)]
[Sema] Fix bug in TypeLocBuilder::pushImpl

The code in TypeLocBuilder::pushImpl wasn't correctly handling the case
where an element that has an 8-byte alignment was being pushed.

I plan to follow up with a patch to remove redundancies and simplify the
function.

rdar://problem/23838912

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

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

8 years agoMissed a spot in r261251, also ignore attributes on all pointer parameters
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:30:40 +0000 (20:30 +0000)]
Missed a spot in r261251, also ignore attributes on all pointer parameters

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

8 years agoUse Backend_EmitMCNull for null codegen unit tests.
David L. Jones [Thu, 18 Feb 2016 20:27:16 +0000 (20:27 +0000)]
Use Backend_EmitMCNull for null codegen unit tests.

Using Backend_EmitLL attemps to create a file with an empty filename.
This is problematic in certain environments: an empty filename may be
illegal, or the default output path may not be writable (in the case
where an empty filename would otherwise have some non-failing
semantics). This patch switches to use Backend_EmitMCNull, which
allows CodeGen to run, but does not attempt to create or write an
output file.

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

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

8 years agoMake test less prone to attribute changes
Krzysztof Parzyszek [Thu, 18 Feb 2016 20:02:03 +0000 (20:02 +0000)]
Make test less prone to attribute changes

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

8 years ago[analyzer] Include comment mistakenly left out of r261243. NFC.
Devin Coughlin [Thu, 18 Feb 2016 19:37:39 +0000 (19:37 +0000)]
[analyzer] Include comment mistakenly left out of r261243. NFC.

It explains why we can't just synthesize bodies of setters in BodyFarm.

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

8 years agoMake deprecation message for -fsanitize-coverage= with numeric argument friendlier.
Nico Weber [Thu, 18 Feb 2016 19:32:54 +0000 (19:32 +0000)]
Make deprecation message for -fsanitize-coverage= with numeric argument friendlier.

http://reviews.llvm.org/D17397

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

8 years ago[analyzer] Improve modeling of ObjC synthesized property setters.
Devin Coughlin [Thu, 18 Feb 2016 19:13:30 +0000 (19:13 +0000)]
[analyzer] Improve modeling of ObjC synthesized property setters.

When modeling a call to a setter for a property that is synthesized to be
backed by an instance variable, don't invalidate the entire instance
but rather only the storage for the updated instance variable itself.

This still doesn't model the effect of the setter completely. It doesn't
bind the set value to the ivar storage location because doing so would cause
the set value to escape, removing valuable diagnostics about potential
leaks of the value from the retain count checker.

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

8 years agoFile missed from r261222
Serge Pavlov [Thu, 18 Feb 2016 16:43:24 +0000 (16:43 +0000)]
File missed from r261222

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

8 years agoAvoid double deletion in Clang driver.
Serge Pavlov [Thu, 18 Feb 2016 16:42:09 +0000 (16:42 +0000)]
Avoid double deletion in Clang driver.

Llvm module object is shared between CodeGenerator and BackendConsumer,
in both classes it is stored as std::unique_ptr, which is not a good
design solution and can cause double deletion error. Usually it does
not occur because in BackendConsumer::HandleTranslationUnit the
ownership of CodeGenerator over the module is taken away. If however
this method is not called, the module is deleted twice and compiler crashes.

As the module owned by BackendConsumer is always the same as CodeGenerator
has, pointer to llvm module can be removed from BackendGenerator.

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

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

8 years agoAdd an AST matcher for real floating-point types. e.g., float, double, long double...
Aaron Ballman [Thu, 18 Feb 2016 16:36:01 +0000 (16:36 +0000)]
Add an AST matcher for real floating-point types. e.g., float, double, long double, but not complex.

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

8 years ago[analyzer] dump_ast_matchers.py: fix replacement regexps
Yury Gribov [Thu, 18 Feb 2016 15:43:56 +0000 (15:43 +0000)]
[analyzer] dump_ast_matchers.py: fix replacement regexps

Patch by Alex Sidorin!

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

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