]> granicus.if.org Git - clang/log
clang
9 years ago[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64
Reid Kleckner [Wed, 1 Jul 2015 21:00:00 +0000 (21:00 +0000)]
[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64

32-bit finally funclets are intended to be called both directly from the
parent function and indirectly from the EH runtime. Because we aren't
contorting LLVM's X86 prologue to match MSVC's, calling the finally
block directly passes in a different value of EBP than the one that the
runtime provides. We need an adapter thunk to adjust EBP to the expected
value. However, WinEHPrepare already has to solve this problem when
cleanups are not pre-outlined, so we can go ahead and rely on it rather
than duplicating work.

Now we only do the llvm.x86.seh.recoverfp dance for 32-bit SEH filter
functions.

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

9 years ago[modules] Don't make out-of-line member specializations of an instantiated
Richard Smith [Wed, 1 Jul 2015 19:32:54 +0000 (19:32 +0000)]
[modules] Don't make out-of-line member specializations of an instantiated
class template specialization visible just because the class template
specialization's definition is visible.

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

9 years ago[modules] Skip trailing attributes when skipping a class definition during parse...
Richard Smith [Wed, 1 Jul 2015 18:56:50 +0000 (18:56 +0000)]
[modules] Skip trailing attributes when skipping a class definition during parse-merging.

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

9 years agoRevert "[DebugInfo] Fix debug info generation for function static variables, typedefs...
David Blaikie [Wed, 1 Jul 2015 18:07:22 +0000 (18:07 +0000)]
Revert "[DebugInfo] Fix debug info generation for function static variables, typedefs, and records"

Caused PR24008.

This reverts commit r241154.

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

9 years ago[SEH] Add 32-bit lowering for SEH __try
Reid Kleckner [Wed, 1 Jul 2015 17:10:10 +0000 (17:10 +0000)]
[SEH] Add 32-bit lowering for SEH __try

This re-lands r236052 and adds support for __exception_code().

In 32-bit SEH, the exception code is not available in eax. It is only
available in the filter function, and now we arrange to load it and
store it into an escaped variable in the parent frame.

As a consequence, we have to disable the "catch i8* null" optimization
on 32-bit and always generate a filter function. We can re-enable the
optimization if we detect an __except block that doesn't use the
exception code, but this probably isn't worth optimizing.

Reviewers: majnemer

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

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

9 years ago[DebugInfo] Fix debug info generation for function static variables, typedefs, and...
Michael Kuperstein [Wed, 1 Jul 2015 12:34:39 +0000 (12:34 +0000)]
[DebugInfo] Fix debug info generation for function static variables, typedefs, and records

Function static variables, typedefs and records (class, struct or union) declared inside
a lexical scope were associated with the function as their parent scope, rather than the
lexical scope they are defined or declared in.

This fixes PR19238

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D9760

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

9 years ago[modules] Don't require the 'inline' specifier when merging an inline function;
Richard Smith [Wed, 1 Jul 2015 07:24:18 +0000 (07:24 +0000)]
[modules] Don't require the 'inline' specifier when merging an inline function;
any source of the inline nature is sufficient.

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

9 years ago[OPENMP 4.0] Initial support for 'omp cancellation point' construct.
Alexey Bataev [Wed, 1 Jul 2015 06:57:41 +0000 (06:57 +0000)]
[OPENMP 4.0] Initial support for 'omp cancellation point' construct.

Add parsing and sema analysis for 'omp cancellation point' directive.

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

9 years agoFix a couple of unused variables in no-asserts
Justin Bogner [Wed, 1 Jul 2015 05:41:50 +0000 (05:41 +0000)]
Fix a couple of unused variables in no-asserts

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

9 years ago-frewrite-includes: Prefer insert to emplace
Justin Bogner [Wed, 1 Jul 2015 04:53:19 +0000 (04:53 +0000)]
-frewrite-includes: Prefer insert to emplace

Some bots didn't like r241140.

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

9 years ago-frewrite-includes: Rework how includes and modules are differentiated
Justin Bogner [Wed, 1 Jul 2015 04:40:10 +0000 (04:40 +0000)]
-frewrite-includes: Rework how includes and modules are differentiated

The map of FileChange structs here was storing two disjoint types of
information:

1. A pointer to the Module that an #include directive implicitly
   imported

2. A FileID and FileType for an included file. These would be left
   uninitialized in the Module case.

This change splits these two kinds of information into their own maps,
which both simplifies how we access either and avoids the undefined
behaviour we were hitting due to the uninitialized fields in the
included file case.

Mostly NFC, but fixes some errors found by self-host with ubsan.

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

9 years ago[modules] Before checking whether the controlling macro of a header is defined,
Richard Smith [Wed, 1 Jul 2015 02:29:35 +0000 (02:29 +0000)]
[modules] Before checking whether the controlling macro of a header is defined,
update the identifier in case we've imported a definition of the macro (and
thus the contents of the header) from a module.

Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer
makes sense to keep these separate now that the only user of the former also
needs the latter.

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

9 years agoCodeGen: Do not give local-linkage functions externally available linkage, even tempo...
Peter Collingbourne [Wed, 1 Jul 2015 02:10:26 +0000 (02:10 +0000)]
CodeGen: Do not give local-linkage functions externally available linkage, even temporarily.

When an internal-linkage thunk is code gen'd, CodeGenVTables::emitThunk
will first be called with ForVTable=true (which incorrectly set the
thunk's linkage to available_externally under the Itanium ABI) and later
with ForVTable=false (which reset it to internal). Because we will always
see a call with ForVTable=false, this incorrect linkage never ended up in
the final IR. However, the temporary presence of this linkage caused us
to give such functions a comdat as a result of code introduced in r241102.
To avoid this, check that the thunk is externally visible before giving it
available_externally linkage.

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

9 years ago[modules] Make the include guard optimization fire a bit more when considering
Richard Smith [Wed, 1 Jul 2015 01:51:38 +0000 (01:51 +0000)]
[modules] Make the include guard optimization fire a bit more when considering
re-entering a modular header.

When we do the include guard check, we're in the visibility state for the file
with the #include; the include guard may not be visible there, but we don't
actually need it to be: if we've already parsed the submodule we're considering
entering, it's always safe to skip it.

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

9 years agoUse a stable sort to guarantee target feature ordering in the IR
Eric Christopher [Wed, 1 Jul 2015 01:07:12 +0000 (01:07 +0000)]
Use a stable sort to guarantee target feature ordering in the IR
in order to make testing somewhat more feasible. Has the advantage
of making it easier to find target features as well.

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

9 years agoCodeGen: Resize LifetimeExtendedCleanupHeader to avoid alignment issues
Justin Bogner [Wed, 1 Jul 2015 00:59:27 +0000 (00:59 +0000)]
CodeGen: Resize LifetimeExtendedCleanupHeader to avoid alignment issues

The LifetimeExtendedCleanupHeader is carefully fit into 32 bytes,
meaning that cleanups on the LifetimeExtendedCleanupStack are *always*
allocated at a misaligned address and cause undefined behaviour.

There are two ways to solve this - add padding after the header when
we allocated our cleanups, or just simplify the header and let it use
64 bits in the first place. I've opted for the latter, and added a
static assert to avoid the issue in the future.

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

9 years ago[Sema] Don't crash when deduction fails for decltype(auto)
David Majnemer [Wed, 1 Jul 2015 00:29:28 +0000 (00:29 +0000)]
[Sema] Don't crash when deduction fails for decltype(auto)

We didn't check the return result of BuildDecltypeType, resulting in us
crashing when we tried to grab the canonical version of the type.

This fixes PR23995.

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

9 years agoFix sse4 for target attribute feature additions.
Eric Christopher [Wed, 1 Jul 2015 00:08:32 +0000 (00:08 +0000)]
Fix sse4 for target attribute feature additions.
This reinstates part of the hack removed in r233223, by special
casing sse4 as part of the feature additions. The notable change
here is that we consider it only as part of setting the SSE level
and not as part of the actual target features set which handles
setting the rest of the masks.

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

9 years agoFix a TODO dealing with canonicalizing attributes on functions by
Eric Christopher [Wed, 1 Jul 2015 00:08:29 +0000 (00:08 +0000)]
Fix a TODO dealing with canonicalizing attributes on functions by
using a string map to canonicalize. Fix up a couple of testcases
that needed changing since we are no longer simply appending features
to the list, but all of their mask dependencies as well.

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

9 years agoFix use-after-free.
Peter Collingbourne [Tue, 30 Jun 2015 22:08:44 +0000 (22:08 +0000)]
Fix use-after-free.

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

9 years ago[modules] Make sure macros get made visible in the top-level file if we've got
Richard Smith [Tue, 30 Jun 2015 21:29:55 +0000 (21:29 +0000)]
[modules] Make sure macros get made visible in the top-level file if we've got
local submodule visibility enabled; that top-level file might not actually be
the module includes buffer if use of prebuilt modules is disabled.

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

9 years ago[MS ABI] Stick constructor closures in an IR COMDAT group
David Majnemer [Tue, 30 Jun 2015 21:23:51 +0000 (21:23 +0000)]
[MS ABI] Stick constructor closures in an IR COMDAT group

We no-longer stick linkonce_odr entities in COMDATs in the backend.
Instead, we rely on the IR COMDAT mechanism.

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

9 years agoMore range-based-for-loopification. NFC
Douglas Katzman [Tue, 30 Jun 2015 19:32:57 +0000 (19:32 +0000)]
More range-based-for-loopification. NFC

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

9 years agoCodeGen: Assign an appropriate comdat to thunks.
Peter Collingbourne [Tue, 30 Jun 2015 19:07:26 +0000 (19:07 +0000)]
CodeGen: Assign an appropriate comdat to thunks.

Previously we were not assigning a comdat to thunks in the Microsoft ABI,
which would have required us to emit these functions outside of a comdat.
(Due to an inconsistency in how we were emitting objects, we were getting this
right most of the time, but only when compiling with function sections.) This
code generator change causes us to create a comdat for each thunk.

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

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

9 years agoUpdate testcases: DICompileUnits are now created distinct by DIBuilder.
Adrian Prantl [Tue, 30 Jun 2015 18:32:50 +0000 (18:32 +0000)]
Update testcases: DICompileUnits are now created distinct by DIBuilder.

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

9 years agoRelax this test so it also works on platforms that use characters other
Adrian Prantl [Tue, 30 Jun 2015 18:05:46 +0000 (18:05 +0000)]
Relax this test so it also works on platforms that use characters other
than forward slashes as path separators.

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

9 years agoUse an early exit to improve readability. (NFC)
Adrian Prantl [Tue, 30 Jun 2015 18:01:05 +0000 (18:01 +0000)]
Use an early exit to improve readability. (NFC)

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

9 years agoDebug Info: Emit debug info for @import declarations.
Adrian Prantl [Tue, 30 Jun 2015 17:39:51 +0000 (17:39 +0000)]
Debug Info: Emit debug info for @import declarations.

This allows a module-aware debugger such as LLDB to import the currently
visible modules before dropping into the expression evaluator.

rdar://problem/20965932

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

9 years agoAdd a function to ExternalASTSource that returns a descriptor that
Adrian Prantl [Tue, 30 Jun 2015 17:39:43 +0000 (17:39 +0000)]
Add a function to ExternalASTSource that returns a descriptor that
abstracts the commonalities between modules and PCH files that are
needed to emit debug info for a module or precompiled header.

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

9 years ago[clang-cl] Use /arch: to set the base target CPU
Reid Kleckner [Tue, 30 Jun 2015 16:32:04 +0000 (16:32 +0000)]
[clang-cl] Use /arch: to set the base target CPU

The main effect of this change is that /arch:IA32 will use i386 as the
CPU, while clang-cl will continue to default to pentium4 (aka SSE2 plus
the usual other features).

/arch:AVX and /arch:AVX2 will also now enable the other features
available in sandybridge and haswell respectively, which is consistent
with MSDN.

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

9 years ago[Static Analyzer] Minor improvements to SATest.
Gabor Horvath [Tue, 30 Jun 2015 15:31:17 +0000 (15:31 +0000)]
[Static Analyzer] Minor improvements to SATest.

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

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

9 years ago[X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR
Michael Kuperstein [Tue, 30 Jun 2015 13:36:19 +0000 (13:36 +0000)]
[X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR

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

9 years ago[CONCEPTS] Parsing of concept keyword
Hubert Tong [Tue, 30 Jun 2015 12:14:52 +0000 (12:14 +0000)]
[CONCEPTS] Parsing of concept keyword

Summary: This change adds parsing for the concept keyword in a
declaration and tracks the location. Diagnostic testing added for
invalid use of concept keyword.

Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast

Reviewed By: rsmith, hubert.reinterpretcast

Subscribers: cfe-commits

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

Patch by Nathan Wilson!

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

9 years agoclang-format: Properly parse parenthesis in braced lists.
Daniel Jasper [Tue, 30 Jun 2015 11:32:22 +0000 (11:32 +0000)]
clang-format: Properly parse parenthesis in braced lists.

Among other things, this makes clang-format understand arbitrary blocks
embedded in them, such as:

  SomeFunction({MACRO({ return output; }), b});

where MACRO could e.g. expand to a lambda.

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

9 years ago[X86] Add missing undef of DEFAULT_FN_ATTRS in FXSR intrinsics
Michael Kuperstein [Tue, 30 Jun 2015 10:18:54 +0000 (10:18 +0000)]
[X86] Add missing undef of DEFAULT_FN_ATTRS in FXSR intrinsics

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

9 years ago[X86] Add FXSR intrinsics
Michael Kuperstein [Tue, 30 Jun 2015 09:45:38 +0000 (09:45 +0000)]
[X86] Add FXSR intrinsics

Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64)

These were previously declared in Intrin.h for MSVC compatibility, but now
that we have them implemented, these declarations can be removed.

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

9 years agoFix a couple of tests in clang/test to match "x86_thiscallcc" introduced in r240971.
NAKAMURA Takumi [Tue, 30 Jun 2015 08:02:26 +0000 (08:02 +0000)]
Fix a couple of tests in clang/test to match "x86_thiscallcc" introduced in r240971.

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

9 years agoUnbreak the Visual C++ 2013 build after r241032.
Yaron Keren [Tue, 30 Jun 2015 07:35:19 +0000 (07:35 +0000)]
Unbreak the Visual C++ 2013 build after r241032.

clang\lib\Parse\ParseDeclCXX.cpp(2396): error C3486: a parameter for a lambda cannot have a default argument

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

9 years ago[CodeGen] Tweak isTriviallyRecursive further
David Majnemer [Tue, 30 Jun 2015 04:41:18 +0000 (04:41 +0000)]
[CodeGen] Tweak isTriviallyRecursive further

isTriviallyRecursive is a hack used to bridge a gap between the
expectations that source code assumes and the semantics that LLVM IR can
provide.  Specifically, asm labels on functions are treated as an
explicit name for a GlobalObject in Clang but treated like an
output-processing step in GCC.  Tweak this hack a little further to emit
calls to library functions instead of emitting an incorrect definition.
The definition in question would have available_externally linkage (this
is OK) but result in a call to itself which will either result in an
infinite loop or stack overflow.

This fixes PR23964.

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

9 years ago[MS ABI] Workaround corner-case bug in the ABI for operator delete
David Majnemer [Tue, 30 Jun 2015 03:30:26 +0000 (03:30 +0000)]
[MS ABI] Workaround corner-case bug in the ABI for operator delete

MSVC only genreates array cookies if the class has a destructor.  This
is problematic when having to call T::operator delete[](void *, size_t)
because the second argument's argument is impossible to synthesize
correctly if the class has no destructor (because there will be no array
cookie).

Instead, MSVC passes the size of the class.  Do the same, for
compatibility, instead of crashing.

This fixes PR23990.

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

9 years agoSphinx-based clang man pages
Andrew Wilkins [Tue, 30 Jun 2015 02:52:38 +0000 (02:52 +0000)]
Sphinx-based clang man pages

Summary:
This diff introduces .rst files, Sphinx config, and a CMake target
for building clang man pages. This will deprecate the existing .pod-
based man page, and will integrate nicely with CMake. This diff does
not remove the existing man page; that will be done in a follow-up
once packagers have had a chance to react to the change.

For now, only clang(1) has been done; others can be added over time
by dropping additional files into the docs/CommandGuide directory.
The index page for CommandGuide has been copied from LLVM's
docs/CommandGuide.

The man page itself is mostly the same, with a few minor cosmetic
changes. The only major change is the SYNOPSIS section. I was unable
to get .rst/Sphinx produce the same style as in the existing man page.
Instead, I changed it to match the LLVM tools' relatively simple style.

To build the man pages, use the "docs-clang-man" target if building
with CMake. Otherwise, use "make -f Makefile.sphinx man".

Reviewers: cmatthews, silvas

Subscribers: dim, gaeke, beanz, cfe-commits

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

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

9 years agoAdd two missing arguments.
Adrian Prantl [Tue, 30 Jun 2015 02:34:37 +0000 (02:34 +0000)]
Add two missing arguments.
I forgot to add this file to r241035.

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

9 years agoPass HeaderSearchOptions and PreprocessorOptions into CodeGenModule.
Adrian Prantl [Tue, 30 Jun 2015 02:26:03 +0000 (02:26 +0000)]
Pass HeaderSearchOptions and PreprocessorOptions into CodeGenModule.
In order to produce debug info for clang modules CGDebugInfo it needs
access to macros passed on the command line and the isysroot.

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

9 years agoRework parsing of pure-specifiers. Perform the grammar matching and
Richard Smith [Tue, 30 Jun 2015 01:28:56 +0000 (01:28 +0000)]
Rework parsing of pure-specifiers. Perform the grammar matching and
disambiguation in the parser rather than trying to do it in Sema.

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

9 years agoPR23942: a pure-specifier's integer literal must be spelled '0'
Richard Smith [Mon, 29 Jun 2015 23:19:23 +0000 (23:19 +0000)]
PR23942: a pure-specifier's integer literal must be spelled '0'

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

9 years agoAdd support for the x86 builtin __builtin_cpu_supports.
Eric Christopher [Mon, 29 Jun 2015 21:00:05 +0000 (21:00 +0000)]
Add support for the x86 builtin __builtin_cpu_supports.

This matches the implementation of the gcc support for the same
feature, including checking the values set up by libgcc at runtime.
The structure looks like this:

  unsigned int __cpu_vendor;
  unsigned int __cpu_type;
  unsigned int __cpu_subtype;
  unsigned int __cpu_features[1];

with a set of enums to match various fields that are field out after
parsing the output of the cpuid instruction.
This also adds a set of errors checking for valid input (and cpu).

compiler-rt support for this and the other builtins in this family
(__builtin_cpu_init and __builtin_cpu_is) are forthcoming.

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

9 years ago[CodeGen] Remove atomic sugar from record types in isSafeToConvert
David Majnemer [Mon, 29 Jun 2015 20:13:23 +0000 (20:13 +0000)]
[CodeGen] Remove atomic sugar from record types in isSafeToConvert

We failed to see that we should have deferred the creation of a type
which references a type currently under construction because of atomic
sugar.

This fixes PR23985.

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

9 years agoMore range-based for loops. NFC
Douglas Katzman [Mon, 29 Jun 2015 19:12:56 +0000 (19:12 +0000)]
More range-based for loops. NFC

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

9 years agoComment fixes. NFC.
Douglas Katzman [Mon, 29 Jun 2015 18:42:16 +0000 (18:42 +0000)]
Comment fixes. NFC.

- Hexagon options were physically next to to ones that had a
  preceding comment saying "Double dash options", which they aren't.

- The 'ld' tool classes are named Linker, not Link.

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

9 years agoFix a test case broken by my previous commit.
Douglas Gregor [Mon, 29 Jun 2015 18:15:31 +0000 (18:15 +0000)]
Fix a test case broken by my previous commit.

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

9 years agoMake __has_feature(nullability) and __has_extension(nullability) always true.
Douglas Gregor [Mon, 29 Jun 2015 18:11:42 +0000 (18:11 +0000)]
Make __has_feature(nullability) and __has_extension(nullability) always true.

These are _Underbar_capital-prefixed additions to the language that
shouldn't depend on language standard.

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

9 years agoInstantiation of local class members.
Serge Pavlov [Mon, 29 Jun 2015 17:50:19 +0000 (17:50 +0000)]
Instantiation of local class members.

If a function containing a local class is instantiated, instantiate
all of local class member, including default arguments and exception
specifications.

This change fixes PR21332 and thus implements DR1484.

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

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

9 years agoAccount for calling convention specifiers in function definitions in IR test cases
David Blaikie [Mon, 29 Jun 2015 17:29:50 +0000 (17:29 +0000)]
Account for calling convention specifiers in function definitions in IR test cases

Several tests wouldn't pass when executed on an armv7a_pc_linux triple
due to the non-default arm_aapcs calling convention produced on the
function definitions in the IR output. Account for this with the
application of a little regex.

Patch by Ying Yi.

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

9 years agoMake __has_extension(assume_nonnull) always true.
Douglas Gregor [Mon, 29 Jun 2015 17:25:49 +0000 (17:25 +0000)]
Make __has_extension(assume_nonnull) always true.

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

9 years ago[Modules] Test lock file removed on signal
Ben Langmuir [Mon, 29 Jun 2015 17:09:24 +0000 (17:09 +0000)]
[Modules] Test lock file removed on signal

For r240967.

rdar://problem/21512307

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

9 years agoRemove unnecessary include.
Adrian Prantl [Mon, 29 Jun 2015 16:14:36 +0000 (16:14 +0000)]
Remove unnecessary include.

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

9 years agoclang-format: Add option to break after definition return type for top-level function...
Birunthan Mohanathas [Mon, 29 Jun 2015 15:30:42 +0000 (15:30 +0000)]
clang-format: Add option to break after definition return type for top-level functions only

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

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

9 years agoclang-format: Adjust Mozilla style defaults
Birunthan Mohanathas [Mon, 29 Jun 2015 15:18:58 +0000 (15:18 +0000)]
clang-format: Adjust Mozilla style defaults

Summary: This makes the Mozilla style defaults more compliant with the Mozilla style guide. A few options were removed in order to use the LLVM style defaults.

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

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

9 years ago[x86][AVX512CD] Add conflict and lzcnt intrinsics in their 512bit versions
Asaf Badouh [Mon, 29 Jun 2015 12:51:53 +0000 (12:51 +0000)]
[x86][AVX512CD] Add conflict and lzcnt intrinsics in their 512bit versions
include tests

review
http://reviews.llvm.org/D10795

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

9 years ago[X86][AVX512BW] Add more intrinsics support:
Asaf Badouh [Mon, 29 Jun 2015 12:16:40 +0000 (12:16 +0000)]
[X86][AVX512BW] Add more intrinsics support:
 Blend, abs, packs, adds, subs, avg, max, min, permute.
 all the intrinsics are covered by tests

review:
http://reviews.llvm.org/D10799

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

9 years agoclang-format: Don't indent relative to unary operators (some more).
Daniel Jasper [Mon, 29 Jun 2015 10:42:59 +0000 (10:42 +0000)]
clang-format: Don't indent relative to unary operators (some more).

Before:
  long aaaaaaaa = !aaaa( // break
                      aaaaaa);
  long aaaaaaaa = !aa.aa( // break
      aaaaaa);

After:
  long aaaaaaaa = !aaaa( // break
      aaaaaa);
  long aaaaaaaa = !aa.aa( // break
      aaaaaa);

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

9 years agoThis is a comment-only change to test commit access
Igor Breger [Mon, 29 Jun 2015 09:48:56 +0000 (09:48 +0000)]
This is a comment-only change to test commit access

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

9 years ago[ARM]: Extend -mfpu options for half-precision and vfpv3xd
Javed Absar [Mon, 29 Jun 2015 09:30:19 +0000 (09:30 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd

Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16.
These are related to half-precision floating-point and single precision.

Reviewers: rengolin, ranjeet.singh

Subscribers: llvm-commits

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

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

9 years agoAVX-512: Implemented AVX-512 FMA intrinsics and tests.
Elena Demikhovsky [Mon, 29 Jun 2015 09:20:57 +0000 (09:20 +0000)]
AVX-512:  Implemented  AVX-512 FMA intrinsics and tests.

by Igor Breger

http://reviews.llvm.org/D10797

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

9 years agoDelete unused variables.
Frederic Riss [Mon, 29 Jun 2015 04:41:58 +0000 (04:41 +0000)]
Delete unused variables.

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

9 years ago[MS ABI] Unify constant and non-constant member pointer conversion
David Majnemer [Mon, 29 Jun 2015 00:06:50 +0000 (00:06 +0000)]
[MS ABI] Unify constant and non-constant member pointer conversion

We had two separate paths for member pointer conversion: one which
takes a constant and another which takes an arbitrary value.  In the
latter case, we are permitted to construct arbitrary instructions.

It turns out that the bulk of the member pointer conversion is sharable
if we construct an artificial IRBuilder.

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

9 years agoRevert r240872, "Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts...
NAKAMURA Takumi [Sun, 28 Jun 2015 23:14:35 +0000 (23:14 +0000)]
Revert r240872, "Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix later."

This has been fixed since r240912.

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

9 years ago[PPC] fixes typos in builtins-ppc-p8vector.c
Jingyue Wu [Sun, 28 Jun 2015 18:30:36 +0000 (18:30 +0000)]
[PPC] fixes typos in builtins-ppc-p8vector.c

The extra ] causes %{{[0-9]]*}} to match only %<single digit> such as %1.

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

9 years agoclang-format: Stop old options from overriding new options
Birunthan Mohanathas [Sun, 28 Jun 2015 14:52:34 +0000 (14:52 +0000)]
clang-format: Stop old options from overriding new options

Summary: Depends on D10785.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

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

9 years agoclang-format: Add missing members to FormatStyle::operator==
Birunthan Mohanathas [Sun, 28 Jun 2015 14:52:01 +0000 (14:52 +0000)]
clang-format: Add missing members to FormatStyle::operator==

Summary: Depends on D10784.

Reviewers: djasper

Reviewed By: djasper

Subscribers: dblaikie, klimek, cfe-commits

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

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

9 years agoclang-format: Alphabetize FormatStyle members
Birunthan Mohanathas [Sun, 28 Jun 2015 14:51:17 +0000 (14:51 +0000)]
clang-format: Alphabetize FormatStyle members

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

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

9 years ago[Driver] x86-64 Windows is always PIC
David Majnemer [Sun, 28 Jun 2015 04:23:33 +0000 (04:23 +0000)]
[Driver] x86-64 Windows is always PIC

This fixes PR23963.

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

9 years agoclang-format: Support @autoreleasepool.
Nico Weber [Sun, 28 Jun 2015 01:06:16 +0000 (01:06 +0000)]
clang-format: Support @autoreleasepool.

Format @autoreleasepool properly for the Attach brace style
by recognizing @autoreleasepool as a block introducer.

Patch from Strager Neds!
http://reviews.llvm.org/D10372

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

9 years ago[Sema] Unions cannot have virtual functions.
Davide Italiano [Sat, 27 Jun 2015 19:18:55 +0000 (19:18 +0000)]
[Sema] Unions cannot have virtual functions.

PR: PR23931
Differential Revision: http://reviews.llvm.org/D10752
Reviewed by:  rsmith

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

9 years agoFix typo. NFC.
Alex Denisov [Sat, 27 Jun 2015 19:04:55 +0000 (19:04 +0000)]
Fix typo. NFC.

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

9 years agoclang-format: Fix language of DisableFormat description
Birunthan Mohanathas [Sat, 27 Jun 2015 09:25:28 +0000 (09:25 +0000)]
clang-format: Fix language of DisableFormat description

This is a comment-only change to test commit access.

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

9 years agoSuppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix...
NAKAMURA Takumi [Sat, 27 Jun 2015 03:33:47 +0000 (03:33 +0000)]
Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix later.

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

9 years agoAdd a testcase for bitfield debug info.
Adrian Prantl [Fri, 26 Jun 2015 21:25:18 +0000 (21:25 +0000)]
Add a testcase for bitfield debug info.

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

9 years agoAdd missing builtins to altivec.h for ABI compliance (vol. 1)
Nemanja Ivanovic [Fri, 26 Jun 2015 19:27:20 +0000 (19:27 +0000)]
Add missing builtins to altivec.h for ABI compliance (vol. 1)

This patch corresponds to review:
http://reviews.llvm.org/D10637

This is the first round of additions of missing builtins listed in the ABI document. More to come (this builds onto what seurer already addes). This patch adds:
vector signed long long vec_abs(vector signed long long)
vector double vec_abs(vector double)
vector signed long long vec_add(vector signed long long, vector signed long long)
vector unsigned long long vec_add(vector unsigned long long, vector unsigned long long)
vector double vec_add(vector double, vector double)
vector double vec_and(vector bool long long, vector double)
vector double vec_and(vector double, vector bool long long)
vector double vec_and(vector double, vector double)
vector signed long long vec_and(vector signed long long, vector signed long long)
vector double vec_andc(vector bool long long, vector double)
vector double vec_andc(vector double, vector bool long long)
vector double vec_andc(vector double, vector double)
vector signed long long vec_andc(vector signed long long, vector signed long long)
vector double vec_ceil(vector double)
vector bool long long vec_cmpeq(vector double, vector double)
vector bool long long vec_cmpge(vector double, vector double)
vector bool long long vec_cmpge(vector signed long long, vector signed long long)
vector bool long long vec_cmpge(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmpgt(vector double, vector double)
vector bool long long vec_cmple(vector double, vector double)
vector bool long long vec_cmple(vector signed long long, vector signed long long)
vector bool long long vec_cmple(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmplt(vector double, vector double)
vector bool long long vec_cmplt(vector signed long long, vector signed long long)
vector bool long long vec_cmplt(vector unsigned long long, vector unsigned long long)

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

9 years ago[PPC]: Fix bug in getMultiarchTriple.
Douglas Katzman [Fri, 26 Jun 2015 18:37:15 +0000 (18:37 +0000)]
[PPC]: Fix bug in getMultiarchTriple.

And generally prefer not to restate TargetTriple.str() over and over.

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

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

9 years agoAvoid false positive/negative test results from line directive interference.NFC.
Chad Rosier [Fri, 26 Jun 2015 17:49:10 +0000 (17:49 +0000)]
Avoid false positive/negative test results from line directive interference.NFC.

http://reviews.llvm.org/D10443
Patch by Geoff Berry.

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

9 years ago[static analyzer] Analyzer is skipping forward declared C/C++ functions
Anna Zaks [Fri, 26 Jun 2015 17:42:58 +0000 (17:42 +0000)]
[static analyzer] Analyzer is skipping forward declared C/C++ functions

A patch by Karthik Bhat!

This patch fixes a regression introduced by r224398. Prior to r224398
we were able to analyze the following code in test-include.c and report
a null deref in this case. But post r224398 this analysis is being skipped.

E.g.
  // test-include.c
  #include "test-include.h"
  void test(int * data) {
    data = 0;
    *data = 1;
  }

   // test-include.h
  void test(int * data);

This patch uses the function body (instead of its declaration) as the location
of the function when deciding if the Decl should be analyzed with path-sensitive
analysis. (Prior to r224398, the call graph was guaranteed to have a definition
when available.)

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

9 years agoclang-format some of the files in lib/Driver. NFC
Douglas Katzman [Fri, 26 Jun 2015 15:47:46 +0000 (15:47 +0000)]
clang-format some of the files in lib/Driver. NFC

Nothing was hand edited afterward except a few literal strings
and comments that were poorly broken.

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

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

9 years ago[ObjC] Add NSValue support for objc_boxed_expressions
Alex Denisov [Fri, 26 Jun 2015 05:28:36 +0000 (05:28 +0000)]
[ObjC] Add NSValue support for objc_boxed_expressions

Patch extends ObjCBoxedExpr to accept records (structs and unions):

typedef struct __attribute__((objc_boxable)) _Color {
  int r, g, b;
} Color;

Color color;
NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)];

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

9 years agoFix crash-on-invalid bug in template instantiation.
Manuel Klimek [Fri, 26 Jun 2015 02:15:04 +0000 (02:15 +0000)]
Fix crash-on-invalid bug in template instantiation.

Get rid of code-path that (according to Richard Smith) is not needed but
leads to a crasher bug when assuming a template has been fully
instantiated and thus has a definition.

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

9 years agoFileCheck-ize test and make sure more things don't happen.
Paul Robinson [Fri, 26 Jun 2015 00:36:50 +0000 (00:36 +0000)]
FileCheck-ize test and make sure more things don't happen.

Attribute 'nodebug' means no llvm.dbg.* intrinsics, no !dbg
annotations, and no DISubprogram for the function.

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

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

9 years agoAdd new file from r240741 to CMakeLists.txt.
Nico Weber [Fri, 26 Jun 2015 00:19:32 +0000 (00:19 +0000)]
Add new file from r240741 to CMakeLists.txt.

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

9 years ago[Sema] Commit a better fix for r240242
Davide Italiano [Fri, 26 Jun 2015 00:18:35 +0000 (00:18 +0000)]
[Sema] Commit a better fix for r240242

Skip calls to HasTrivialDestructorBody() in the case where the
destructor is never invoked. Alternatively, Richard proposed to change
Sema to declare a trivial destructor for anonymous union member, which
seems too wasteful.

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

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

9 years agoAdd an inttypes.h wrapper that fixes up some macros in Microsoft mode.
Nico Weber [Fri, 26 Jun 2015 00:13:18 +0000 (00:13 +0000)]
Add an inttypes.h wrapper that fixes up some macros in Microsoft mode.

Before MSVS2015, MSVS's headers disagree about int32_t and PRIx32 and so on.
Provide a wrapper header to fix this, so that -Wformat can still be used.
Fixes PR23412.

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

9 years ago[Sema] Maintain ellipsis location when transforming lambda captures
Meador Inge [Fri, 26 Jun 2015 00:09:55 +0000 (00:09 +0000)]
[Sema] Maintain ellipsis location when transforming lambda captures

This patch fixes a crash caused by the following case:

  template<typename T>
  auto f(T x) {
    auto g = [](auto ... args) {
      auto h = [args...]() -> int {
        return 0;
      };
      return h;
    };
    return g;
  }

  auto x = f(0)();

When the templated function 'f' is instantiated and the inner-most
lambda is transformed the ellipsis location on the captured variable
is lost.  Then the lambda returned by 'f' is instantiated and the
tree transformer chokes on the invalid ellipsis location.  The
problem is fixed by making a minor change to properly track the
ellipsis location.

This fixes PR23716.

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

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

9 years ago[CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to...
David Majnemer [Thu, 25 Jun 2015 23:50:40 +0000 (23:50 +0000)]
[CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to lib functions

isTriviallyRecursive is only supposed to guard functions part of the
implementation.

This fixes PR23953.

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

9 years agoFix a typo correction crash when resolving ambiguous corrections.
Kaelyn Takata [Thu, 25 Jun 2015 23:47:39 +0000 (23:47 +0000)]
Fix a typo correction crash when resolving ambiguous corrections.

In certain cases, the tree transform would introduce new TypoExprs while
trying one of the corrections, invalidating the unique_ptr in the state
reference, and also causing a TypoExpr to exist that will never be
corrected since it doesn't exist in the final corrected expression. The
simple solution to both problems is to temporarily disable typo
correction while handling potentially ambiguous typo corrections.

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

9 years ago[docs] Several updates to the Address Sanitizer webpage.
Anna Zaks [Thu, 25 Jun 2015 23:36:44 +0000 (23:36 +0000)]
[docs] Several updates to the Address Sanitizer webpage.

 - Added the description of the interceptor suppression.
 - Re-organized a bit: grouped a few things under the Issue Suppression
   section, grouped IOC and leaks under a section, placed symbolication
   info into Symbolizing the Reports section..
 - In supported platforms: "MacOS" -> "OS X"; added "iOS Simulator"
 - Added a paragraph to the Usage section describing when DYLD_INSERT_LIBRARIES
   might need to be used.
 - "attribute((no_sanitize_address))" -> "__attribute__((no_sanitize("address")))"
 - Updated Leak Sanitizer page with most up to date info.
....

http://reviews.llvm.org/D10559

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

9 years agoRemove `requires` for x86 CPU features.
Sean Silva [Thu, 25 Jun 2015 23:22:11 +0000 (23:22 +0000)]
Remove `requires` for x86 CPU features.

Ever since the target attributes change, we don't need to guard these
headers with `requires`. Actually it's a bit worse, because if we do
then they are included textually under the covers, causing declarations
to appear in submodules they aren't supposed to be in.

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

9 years agoFix the test added in r240710.
Jonathan Roelofs [Thu, 25 Jun 2015 23:21:11 +0000 (23:21 +0000)]
Fix the test added in r240710.

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

9 years ago[CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.
Alexey Samsonov [Thu, 25 Jun 2015 23:14:32 +0000 (23:14 +0000)]
[CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.

Summary:
Namely, we must have proper C++ABI support in UBSan runtime. We don't
have a good way to check for that, so just assume that C++ABI support is
there whenever -fsanitize=vptr is supported (i.e. only on handful of
platforms).

Exact diagnostic is also tricky. It's not "cfi" that is unsupported,
just the diagnostic mode. So, I suggest to report that
"-fno-sanitize-trap=cfi-foobar" is incompatible with a given target
toolchain.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: cfe-commits

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

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

9 years agoDisplay profile file name when emitting a file not found diagnostic.
Diego Novillo [Thu, 25 Jun 2015 22:56:00 +0000 (22:56 +0000)]
Display profile file name when emitting a file not found diagnostic.

When a profile file cannot be opened, we used to display just the error
message but not the name of the profile the compiler was trying to open.
This will become useful in the next set of patches that introduce
GCC-compatible flags to specify profiles.

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

9 years agoThis should actually fix the broken bots.
Chris Bieneman [Thu, 25 Jun 2015 22:15:39 +0000 (22:15 +0000)]
This should actually fix the broken bots.

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

9 years ago[Parse] Allow 'constexpr' in condition declarations
Meador Inge [Thu, 25 Jun 2015 22:06:40 +0000 (22:06 +0000)]
[Parse] Allow 'constexpr' in condition declarations

This patch implements the functionality specified by DR948.
The changes are two fold.  First, the parser was modified
to allow 'constexpr's to appear in condition declarations
(which was a hard error before).  Second, Sema was modified
to cleanup maybe odr-used declarations by way of a call to
'ActOnFinishFullExpr'.  As 'constexpr's were not allowed in
condition declarations before the cleanup wasn't necessary
(such declarations were always odr-used).

This fixes PR22491.

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

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

9 years ago[modules] Properly merge visibility of class definitions that got merged while
Richard Smith [Thu, 25 Jun 2015 21:42:33 +0000 (21:42 +0000)]
[modules] Properly merge visibility of class definitions that got merged while
parsing then merged again when the module was loaded.

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