]> granicus.if.org Git - clang/log
clang
8 years agoInvoke simplifycfg and sroa before instcombine.
Dehao Chen [Thu, 23 Jun 2016 20:13:10 +0000 (20:13 +0000)]
Invoke simplifycfg and sroa before instcombine.

Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions.

Reviewers: davidxl, wmi, dnovillo

Subscribers: llvm-commits

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

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

8 years agoclang-format: [JS] recognize more type locations.
Martin Probst [Thu, 23 Jun 2016 19:52:32 +0000 (19:52 +0000)]
clang-format: [JS] recognize more type locations.

Summary: Includes parenthesized type expressions and type aliases.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoImplement p0292r2 (constexpr if), a likely C++1z feature.
Richard Smith [Thu, 23 Jun 2016 19:16:49 +0000 (19:16 +0000)]
Implement p0292r2 (constexpr if), a likely C++1z feature.

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

8 years agoRe-commit r273548, reverted in r273589, with a fix to not produce
Richard Smith [Thu, 23 Jun 2016 19:02:52 +0000 (19:02 +0000)]
Re-commit r273548, reverted in r273589, with a fix to not produce
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such
a case, the loop condition variable is modified on each iteration of the loop
by definition.

Original commit message:

Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

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

8 years agoAdd a test case for the regression in -Wfor-loop-analysis caused by r273548.
Peter Collingbourne [Thu, 23 Jun 2016 18:11:19 +0000 (18:11 +0000)]
Add a test case for the regression in -Wfor-loop-analysis caused by r273548.

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

8 years agoRevert r273548, "Rearrange condition handling so that semantic checks on a condition...
Peter Collingbourne [Thu, 23 Jun 2016 18:11:15 +0000 (18:11 +0000)]
Revert r273548, "Rearrange condition handling so that semantic checks on a condition variable"
as it caused a regression in -Wfor-loop-analysis.

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

8 years ago[Analyzer] Don't cache report generation ExplodedNodes
Ben Craig [Thu, 23 Jun 2016 15:47:12 +0000 (15:47 +0000)]
[Analyzer] Don't cache report generation ExplodedNodes

During the core analysis, ExplodedNodes are added to the
ExplodedGraph, and those nodes are cached for deduplication purposes.

After core analysis, reports are generated. Here, trimmed copies of
the ExplodedGraph are made. Since the ExplodedGraph has already been
deduplicated, there is no need to deduplicate again.

This change makes it possible to add ExplodedNodes to an
ExplodedGraph without the overhead of deduplication. "Uncached" nodes
also cannot be iterated over, but none of the report generation code
attempts to iterate over all nodes. This change reduces the analysis
time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup).
It should slightly reduce memory consumption. Gains should be roughly
proportional to the number (and path length) of static analysis
warnings.

This patch enables future work that should remove the need for an
InterExplodedGraphMap inverse map. I plan on using the (now unused)
ExplodedNode link to connect new nodes to the original nodes.

http://reviews.llvm.org/D21229

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

8 years agoRestructure the propagation of -fPIC/-fPIE.
Rafael Espindola [Thu, 23 Jun 2016 15:07:32 +0000 (15:07 +0000)]
Restructure the propagation of -fPIC/-fPIE.

The PIC and PIE levels are not independent. In fact, if PIE is defined
it is always the same as PIC.

This is clear in the driver where ParsePICArgs returns a PIC level and
a IsPIE boolean. Unfortunately that is currently lost and we pass two
redundant levels down the pipeline.

This patch keeps a bool and a PIC level all the way down to codegen.

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

8 years agoFixing a FIXME related to Unicode support on Windows. Converted the Win32 APIs to...
Aaron Ballman [Thu, 23 Jun 2016 14:33:53 +0000 (14:33 +0000)]
Fixing a FIXME related to Unicode support on Windows. Converted the Win32 APIs to explicitly use the W version when it involves strings that can hold non-ASCII characters (like file paths). Now explicitly using the A version for strings that will always be ASCII (like registry key paths).

No extra tests required as this is currently covered by existing testing, and this is basically impossible to write Unicode-specific tests for.

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

8 years agoCodeGen: support linker options on Windows ARM
Saleem Abdulrasool [Thu, 23 Jun 2016 13:45:33 +0000 (13:45 +0000)]
CodeGen: support linker options on Windows ARM

We would incorrectly emit the directive sections due to the missing overridden
methods.  We now emit the expected "/DEFAULTLIB" rather than "-l" options for
requested linkage

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

8 years agoclang-format: [Proto] Use more compact format for text-formatted options
Daniel Jasper [Thu, 23 Jun 2016 09:40:19 +0000 (09:40 +0000)]
clang-format: [Proto] Use more compact format for text-formatted options

Before:
  enum Type {
    UNKNOWN = 0 [(some_options) = {
      a: aa,
      b: bb
    }];
  };

After:
  enum Type {
    UNKNOWN = 0 [(some_options) = {a: aa, b: bb}];
  };

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

8 years agoAttempt to fix MIPS buildbots after r273425.
Daniel Sanders [Thu, 23 Jun 2016 09:29:38 +0000 (09:29 +0000)]
Attempt to fix MIPS buildbots after r273425.

MIPS has a 'signext' attribute that was causing the check to fail.

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

8 years agoRearrange condition handling so that semantic checks on a condition variable
Richard Smith [Thu, 23 Jun 2016 08:41:20 +0000 (08:41 +0000)]
Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

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

8 years ago[AVX512] Replace masked unpack builtins with shufflevector and selects.
Craig Topper [Thu, 23 Jun 2016 06:36:42 +0000 (06:36 +0000)]
[AVX512] Replace masked unpack builtins with shufflevector and selects.

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

8 years agoUse ranges to concisely express iteration
David Majnemer [Thu, 23 Jun 2016 00:15:04 +0000 (00:15 +0000)]
Use ranges to concisely express iteration

No functional change is intended, this should just clean things up a
little.

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

8 years ago[driver] Remove one more bunch of empty 'test inputs' folders. NFC
Simon Atanasyan [Wed, 22 Jun 2016 20:30:26 +0000 (20:30 +0000)]
[driver] Remove one more bunch of empty 'test inputs' folders. NFC

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

8 years ago[driver] Remove empty folders from the Inputs folder for the driver's tests. NFC
Simon Atanasyan [Wed, 22 Jun 2016 20:20:51 +0000 (20:20 +0000)]
[driver] Remove empty folders from the Inputs folder for the driver's tests. NFC

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

8 years ago[driver][mips] Factor out findMIPSMultilibs code into separate functions. NFC
Simon Atanasyan [Wed, 22 Jun 2016 20:00:50 +0000 (20:00 +0000)]
[driver][mips] Factor out findMIPSMultilibs code into separate functions. NFC

The findMIPSMultilibs is too long. One more reason for splitting is to
escape redundant calls of MultilibSet::FilterOut method which lead to
disk access.

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

8 years ago[Coverage] Push a new region when handling CXXTryStmts
Vedant Kumar [Wed, 22 Jun 2016 19:57:58 +0000 (19:57 +0000)]
[Coverage] Push a new region when handling CXXTryStmts

Push a new region for the try block and propagate execution counts
through it. This ensures that catch statements get a region counter
distinct from the try block's counter.

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

8 years ago[codeview] Set the new IntroducedVirtual debug info flag
Reid Kleckner [Wed, 22 Jun 2016 18:34:45 +0000 (18:34 +0000)]
[codeview] Set the new IntroducedVirtual debug info flag

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

8 years agoMake this test a bit more strict and fix it.
Rafael Espindola [Wed, 22 Jun 2016 18:04:52 +0000 (18:04 +0000)]
Make this test a bit more strict and fix it.

We do pass -pic-level to cc1 when targeting darwin. Given that codegen
itself doesn't use it, the only difference is whether __PIE__ and
__pie__ are defined.

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

8 years ago[analyzer] Teach ObjCDeallocChecker about XCTestCase
Devin Coughlin [Wed, 22 Jun 2016 17:03:10 +0000 (17:03 +0000)]
[analyzer] Teach ObjCDeallocChecker about XCTestCase

Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to
release instance variables and so typically do not release ivars in -dealloc.
This commit applies the existing special casing for SenTestCase to XCTestCase
as well.

rdar://problem/25884696

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

8 years agoAdd support for /Ob1 and -finline-hint-functions flags
Hans Wennborg [Wed, 22 Jun 2016 16:56:16 +0000 (16:56 +0000)]
Add support for /Ob1 and -finline-hint-functions flags

Add support for /Ob1 (and equivalent -finline-hint-functions), which enable
inlining only for functions marked inline, either explicitly (via inline
keyword, for example), or implicitly (function definition in class body,
for example).

This works by enabling inlining pass, and adding noinline attribute to
every function not marked inline.

Patch by Rudy Pons <rudy.pons@ilod.org>!

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

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

8 years agoWiden EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)
Hans Wennborg [Wed, 22 Jun 2016 16:21:14 +0000 (16:21 +0000)]
Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)

It currently only takes 2048 gotos to overflow the FixupDepth bitfield,
causing silent miscompilation. Apparently some parser generators run into
this (see PR).

I don't know that that data structure is terribly size sensitive anyway,
and since there's no room to widen the bitfield, let's just use a separate
word in EHCatchScope for it.

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

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

8 years ago[OpenCL] Use function metadata to represent kernel attributes
Yaxun Liu [Wed, 22 Jun 2016 14:56:35 +0000 (14:56 +0000)]
[OpenCL] Use function metadata to represent kernel attributes

This patch uses function metadata to represent reqd_work_group_size, work_group_size_hint and vector_type_hint kernel attributes and kernel argument info.

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

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

8 years agoclang-format: [JS] Do not break before 'as'.
Martin Probst [Wed, 22 Jun 2016 14:35:14 +0000 (14:35 +0000)]
clang-format: [JS] Do not break before 'as'.

Summary:
'as' is a pseudo operator, so automatic semicolon insertion kicks in and the
code fails to part.

Reviewers: djasper

Subscribers: klimek

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

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

8 years ago[Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.
Michael Zuckerman [Wed, 22 Jun 2016 12:32:43 +0000 (12:32 +0000)]
[Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.

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

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

8 years ago[AVX512] Use a __v8hi vector inside of _mm_setzero_hi to match its name. Probably...
Craig Topper [Wed, 22 Jun 2016 06:36:23 +0000 (06:36 +0000)]
[AVX512] Use a __v8hi vector inside of _mm_setzero_hi to match its name. Probably no real functional change.

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

8 years ago[AVX512] Fix _mm_setzero_di to not require avx512vl since its used by the avx512dqint...
Craig Topper [Wed, 22 Jun 2016 06:36:21 +0000 (06:36 +0000)]
[AVX512] Fix _mm_setzero_di to not require avx512vl since its used by the avx512dqintrin.h. Also update the avx512dq test to not enable avx512vl feature so we can ensure correct dependencies.

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

8 years ago[AVX512] __builtin_ia32_reducesd_mask and __builtin_ia32_reducess_mask should not...
Craig Topper [Wed, 22 Jun 2016 06:36:18 +0000 (06:36 +0000)]
[AVX512] __builtin_ia32_reducesd_mask and __builtin_ia32_reducess_mask should not require avx512vl.

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

8 years ago[AVX512] Add missing typecasts to intrinsics.
Craig Topper [Wed, 22 Jun 2016 06:36:16 +0000 (06:36 +0000)]
[AVX512] Add missing typecasts to intrinsics.

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

8 years ago[AVX512] Replace masked integer cmp and ucmp builtins with native IR.
Craig Topper [Wed, 22 Jun 2016 04:47:58 +0000 (04:47 +0000)]
[AVX512] Replace masked integer cmp and ucmp builtins with native IR.

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

8 years ago[AVX512] Use correct types for mask parameters in avx512vlbw cmp builtin tests.
Craig Topper [Wed, 22 Jun 2016 04:47:55 +0000 (04:47 +0000)]
[AVX512] Use correct types for mask parameters in avx512vlbw cmp builtin tests.

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

8 years ago[OpenMP] Add the depend clause to target update construct (sema and parsing)
Kelvin Li [Wed, 22 Jun 2016 03:10:32 +0000 (03:10 +0000)]
[OpenMP] Add the depend clause to target update construct (sema and parsing)

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

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

8 years agoRequire an x86 target for the thinlto_backend.ll test.
Peter Collingbourne [Wed, 22 Jun 2016 01:40:47 +0000 (01:40 +0000)]
Require an x86 target for the thinlto_backend.ll test.

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

8 years agoSpecify a target triple to fix the test on non-Linux.
Peter Collingbourne [Wed, 22 Jun 2016 01:17:30 +0000 (01:17 +0000)]
Specify a target triple to fix the test on non-Linux.

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

8 years agoAdd missing test dependency.
Peter Collingbourne [Wed, 22 Jun 2016 01:03:15 +0000 (01:03 +0000)]
Add missing test dependency.

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

8 years agoCodeGen: Replace test/CodeGen/thinlto_backend.c with a functional test.
Peter Collingbourne [Wed, 22 Jun 2016 00:57:26 +0000 (00:57 +0000)]
CodeGen: Replace test/CodeGen/thinlto_backend.c with a functional test.

This new test tests that functions are capable of being imported, rather than
that the import pass is run. This new test is compatible with the approach
being developed in D20268 which runs the importer on its own rather than in
a pass.

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

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

8 years agoStmt.h: Tweak r273312 to avoid bool:1 to appease win32.
NAKAMURA Takumi [Wed, 22 Jun 2016 00:41:50 +0000 (00:41 +0000)]
Stmt.h: Tweak r273312 to avoid bool:1 to appease win32.

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

8 years ago[analyzer] Teach trackNullOrUndefValue() about class property accessors.
Devin Coughlin [Wed, 22 Jun 2016 00:20:00 +0000 (00:20 +0000)]
[analyzer] Teach trackNullOrUndefValue() about class property accessors.

Teach trackNullOrUndefValue() how to properly look through PseudoObjectExprs
to find the underlying semantic method call for property getters. This fixes a
crash when looking through class property getters that I introduced in r265839.

rdar://problem/26796666

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

8 years agoDelete dead code.
Rafael Espindola [Tue, 21 Jun 2016 22:24:45 +0000 (22:24 +0000)]
Delete dead code.

Found by gcc 6.

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

8 years agoEmit the DWARF tag for the RenderScript language
Pirama Arumuga Nainar [Tue, 21 Jun 2016 21:35:11 +0000 (21:35 +0000)]
Emit the DWARF tag for the RenderScript language

Summary:
If the RenderScript LangOpt is set, either via '-x renderscript' or the '.rs'
file extension, set the DWARF language tag to be that of RenderScript.

Reviewers: rsmith

Subscribers: cfe-commits, srhines

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

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

8 years agoTrying to fix a buffer overflow that broke buildbot sanitizer-x86_64-linux-fast/build...
Eric Liu [Tue, 21 Jun 2016 20:49:50 +0000 (20:49 +0000)]
Trying to fix a buffer overflow that broke buildbot sanitizer-x86_64-linux-fast/builds/13946.

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

8 years agoRe-commit "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr."
Tim Shen [Tue, 21 Jun 2016 20:29:17 +0000 (20:29 +0000)]
Re-commit "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr."

Since D21243 fixes relative clang-tidy tests.

This reverts commit a71d9fbd41e99def9159af2b01ef6509394eaeed.

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

8 years ago[x86] AVX FP compare builtins should require AVX target feature (PR28112)
Sanjay Patel [Tue, 21 Jun 2016 20:22:55 +0000 (20:22 +0000)]
[x86] AVX FP compare builtins should require AVX target feature (PR28112)

This is a fix for PR28112:
https://llvm.org/bugs/show_bug.cgi?id=28112

The FP comparison intrinsics that take an immediate parameter (rather than specifying
a comparison predicate in the function name) were added with AVX; these are macros in
avxintrin.h. This patch makes clang behavior match gcc (error if a program tries to use
these without -mavx) and matches the Intel documentation, eg:
VCMPPS: m128 _mm_cmp_ps(m128 a, __m128 b, const int imm)

'V' means this is intended to only work with the AVX form of the instruction.

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

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

8 years agoRefactor scope building in JumpDiagnostics for simplicity. This fixes a
Richard Smith [Tue, 21 Jun 2016 20:10:11 +0000 (20:10 +0000)]
Refactor scope building in JumpDiagnostics for simplicity. This fixes a
(currently theoretical) bug where recursive calls to BuildScopeInformation
would do the wrong thing if the type of the statement is one of the kinds with
special handling, but this is not currently observable because the relevant
recursive calls happen to all be for CompoundStmts. (This becomes visible with
the C++17 'constexpr if' feature, where we get a protected scope for the 'then'
/ 'else' cases of some 'if's, and don't necessarily have a corresponding
compound statement.)

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

8 years agoRevert "[MS] Don't expect vftables to be provided for extern template instantiations"
Reid Kleckner [Tue, 21 Jun 2016 19:51:52 +0000 (19:51 +0000)]
Revert "[MS] Don't expect vftables to be provided for extern template instantiations"

This reverts commit r273296, it broke the Windows self-host.

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

8 years agoDelete dead code.
Rafael Espindola [Tue, 21 Jun 2016 19:19:31 +0000 (19:19 +0000)]
Delete dead code.

Found by gcc 6.

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

8 years agoInvoke PruneEH pass before Sample Profile pass.
Dehao Chen [Tue, 21 Jun 2016 19:16:41 +0000 (19:16 +0000)]
Invoke PruneEH pass before Sample Profile pass.

Summary: We need to call PruneEH pass before AutoFDO pass so that some EH-related calls can get inlined in Sample Profile pass.

Reviewers: davidxl, dnovillo

Subscribers: junbuml, llvm-commits

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

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

8 years ago[MS] Don't expect vftables to be provided for extern template instantiations
Reid Kleckner [Tue, 21 Jun 2016 18:39:55 +0000 (18:39 +0000)]
[MS] Don't expect vftables to be provided for extern template instantiations

MSVC doesn't provide them. PR28223

I left behind the machinery in case we want to resurrect available_externally
vftable emission to support devirtualization.

Reviewers: majnemer

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

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

8 years agoAdded calculateRangesAfterReplaments() to calculate affacted ranges in the new code.
Eric Liu [Tue, 21 Jun 2016 17:56:31 +0000 (17:56 +0000)]
Added calculateRangesAfterReplaments() to calculate affacted ranges in the new code.

Summary:
Added calculateRangesAfterReplaments() to calculate original ranges as well as
newly affacted ranges in the new code.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

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

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

8 years ago[aarch64] Update datalayout for aarch64 tests
Artem Belevich [Tue, 21 Jun 2016 17:35:31 +0000 (17:35 +0000)]
[aarch64] Update datalayout for aarch64 tests

This brings the tests in sync with the changes in r273280.

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

8 years agoclang-format: [JS] Add a Closure Compiler JSDoc tags to the default
Daniel Jasper [Tue, 21 Jun 2016 17:00:20 +0000 (17:00 +0000)]
clang-format: [JS] Add a Closure Compiler JSDoc tags to the default
Google configuration so that it isn't line-wrapped.

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

8 years agoAdd documentation for RenderScript changes
Pirama Arumuga Nainar [Tue, 21 Jun 2016 16:09:30 +0000 (16:09 +0000)]
Add documentation for RenderScript changes

Summary:
- Document the new 'kernel' attribute
- Mention RenderScript support in the Release Notes.

Reviewers: rsmith

Subscribers: tberghammer, danalbert, cfe-commits, srhines

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

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

8 years ago[AArch64] Change the preferred alignment for char and short to word alignment
Evandro Menezes [Tue, 21 Jun 2016 15:55:29 +0000 (15:55 +0000)]
[AArch64] Change the preferred alignment for char and short to word alignment

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

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

8 years ago[AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h where...
Craig Topper [Tue, 21 Jun 2016 06:53:58 +0000 (06:53 +0000)]
[AVX512] Move the 128-bit and 256-bit lzcnt intrinsics to avx512vlcdintrin.h where they belong.

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

8 years agor273237 fixed PR28220, not PR28216
David Majnemer [Tue, 21 Jun 2016 03:43:11 +0000 (03:43 +0000)]
r273237 fixed PR28220, not PR28216

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

8 years ago[CodeGen] Do not run initializers for imported variables
David Majnemer [Tue, 21 Jun 2016 03:40:16 +0000 (03:40 +0000)]
[CodeGen] Do not run initializers for imported variables

The export side is responsible for running any initializers, they are
run when the module is first loaded.  Attempting to run an initializer
for the import side is not possible.

This fixes PR28216.

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

8 years ago[Docs] More warning fixes to unbreak the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 02:19:43 +0000 (02:19 +0000)]
[Docs] More warning fixes to unbreak the docs buildbot.

A number of warnings still remain, but these were the last of the
"unlexable code"-related ones (AFAICT).

I changed a few examples in docs/UsersManual.rst to showcase
-Wextra-tokens because it's already documented (-Wmultichar isn't), and
the sphinx C lexer apparently can't handle char literals like 'ab'. It
seemed like a better overall approach than just marking the code blocks
as none or console.

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

8 years agoclang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease...
NAKAMURA Takumi [Tue, 21 Jun 2016 01:54:54 +0000 (01:54 +0000)]
clang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease *-win32 targets.

  <stdin>:9:25: note: possible intended match here
   %call = tail call i8 @"\01?convert_char_rte@@$$J0YADD@Z"(i8 %x) #2
                          ^

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

8 years ago[Docs] Try to fix the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 00:16:23 +0000 (00:16 +0000)]
[Docs] Try to fix the docs buildbot.

It's complaining that it couldn't lex a compiler warning as C++. I don't
blame it.

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

8 years agoAdd a ENABLE_X86_RELAX_RELOCATIONS cmake option.
Rafael Espindola [Mon, 20 Jun 2016 23:54:44 +0000 (23:54 +0000)]
Add a ENABLE_X86_RELAX_RELOCATIONS  cmake option.

This corresponds to binutils' --enable-x86-relax-relocations.

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

8 years agoRemove MaxFunctionCount module flag annotation.
Easwaran Raman [Mon, 20 Jun 2016 20:48:32 +0000 (20:48 +0000)]
Remove MaxFunctionCount module flag annotation.

Differential revision: http://reviews.llvm.org/D19184

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

8 years agoclang-format: [Proto] Fix "import public" after r273179.
Daniel Jasper [Mon, 20 Jun 2016 20:39:53 +0000 (20:39 +0000)]
clang-format: [Proto] Fix "import public" after r273179.

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

8 years ago[Sema] Only define function as move assignment when needed
Erik Pilkington [Mon, 20 Jun 2016 20:04:15 +0000 (20:04 +0000)]
[Sema] Only define function as move assignment when needed

Fixes PR27941, a crash on invalid.

Differential revision: http://reviews.llvm.org/D20923

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

8 years ago[OpenCL] Include opencl-c.h by default as a clang module
Yaxun Liu [Mon, 20 Jun 2016 19:26:00 +0000 (19:26 +0000)]
[OpenCL] Include opencl-c.h by default as a clang module

Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules.

Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.

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

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

8 years ago[OpenMP] Add the nowait clause to target update construct.
Kelvin Li [Mon, 20 Jun 2016 19:16:34 +0000 (19:16 +0000)]
[OpenMP] Add the nowait clause to target update construct.

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

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

8 years agoclang-format: [Proto] Don't do bad things if imports are missing ;.
Daniel Jasper [Mon, 20 Jun 2016 18:20:38 +0000 (18:20 +0000)]
clang-format: [Proto] Don't do bad things if imports are missing ;.

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

8 years agoUpdate for DiagnosticInfoStackSize changes
Matt Arsenault [Mon, 20 Jun 2016 18:13:09 +0000 (18:13 +0000)]
Update for DiagnosticInfoStackSize changes

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

8 years ago[modules] Allow emission of update records for predefined __va_list_tag.
Vassil Vassilev [Mon, 20 Jun 2016 15:10:40 +0000 (15:10 +0000)]
[modules] Allow emission of update records for predefined __va_list_tag.

Handles the cases where old __va_list_tag is coming from a module and the new
is not, needing an update record.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27890

Patch by Cristina Cristescu, Richard Smith and me.

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

8 years agoMake test less sensitive to the resource directory.
Paul Robinson [Mon, 20 Jun 2016 14:33:49 +0000 (14:33 +0000)]
Make test less sensitive to the resource directory.
Same tactic as linux-header-search.cpp and android-ndk-standalone.cpp.

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

8 years agoAdd -fsyntax-only to Driver/opencl.cl test.
Cong Liu [Mon, 20 Jun 2016 11:25:26 +0000 (11:25 +0000)]
Add -fsyntax-only to Driver/opencl.cl test.

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

8 years ago[X86] Add -mno-iamcu option.
Andrey Turetskiy [Mon, 20 Jun 2016 10:31:39 +0000 (10:31 +0000)]
[X86] Add -mno-iamcu option.

Add -mno-iamcu option to:
  1) Countervail -miamcu option easily
  2) Be compatible with GCC which supports this option

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

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

8 years agoRevert "Make test less sensitive to the resource directory."
Paul Robinson [Sun, 19 Jun 2016 01:14:35 +0000 (01:14 +0000)]
Revert "Make test less sensitive to the resource directory."
Will need to try this on an actual Windows system.

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

8 years agoMake test less sensitive to the resource directory.
Paul Robinson [Sat, 18 Jun 2016 23:26:37 +0000 (23:26 +0000)]
Make test less sensitive to the resource directory.
Like linux-header-search.cpp and android-ndk-standalone.cpp.

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

8 years ago[X86] _MM_ALIGN16 attribute support for non-windows targets
Zvi Rackover [Sat, 18 Jun 2016 20:01:07 +0000 (20:01 +0000)]
[X86]  _MM_ALIGN16 attribute support for non-windows targets

Summary:
This patch adds support for the _MM_ALIGN16 attribute on non-windows targets. This aligns Clang with ICC which supports the attribute on all targets.

Fixes PR28056

Reviewers: aaboud, echristo, cfe-commits, mkuper

Subscribers: zvi, mehdi_amini

Projects: #clang-c

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

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

8 years ago[X86][XOP] Refreshed builtin tests ready for creation of llvm fast-isel tests
Simon Pilgrim [Sat, 18 Jun 2016 18:20:14 +0000 (18:20 +0000)]
[X86][XOP] Refreshed builtin tests ready for creation of llvm fast-isel tests

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

8 years ago[X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests
Simon Pilgrim [Sat, 18 Jun 2016 17:09:40 +0000 (17:09 +0000)]
[X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests

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

8 years ago[MS] Put member pointer representation flags in our debug info
Reid Kleckner [Fri, 17 Jun 2016 22:27:59 +0000 (22:27 +0000)]
[MS] Put member pointer representation flags in our debug info

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

8 years ago[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)
Vedant Kumar [Fri, 17 Jun 2016 21:53:55 +0000 (21:53 +0000)]
[Coverage] Adopt llvm::coverage::encodeFilenamesAndRawMappings (NFC)

Use an llvm helper function to encode filenames and raw mappings.

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

8 years agotest: support / and \ as directory separators
Saleem Abdulrasool [Fri, 17 Jun 2016 19:59:01 +0000 (19:59 +0000)]
test: support / and \ as directory separators

Windows uses \ as the directory separator and this causes the tests to fail on
Windows.

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

8 years agoNVPTX: Add supported CL features
Jan Vesely [Fri, 17 Jun 2016 19:02:14 +0000 (19:02 +0000)]
NVPTX: Add supported CL features

Fixes libclc compilation broken by r269670

Reviewers: jholewinsky

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

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

8 years ago[CodeGen] Use pointer-sized integers for ptrtoint sources
David Majnemer [Fri, 17 Jun 2016 17:47:24 +0000 (17:47 +0000)]
[CodeGen] Use pointer-sized integers for ptrtoint sources

Given something like:
void *v = (void *)100;

We need to synthesize a ptrtoint operation from 100.  During constant
emission, we choose i64 as the type for our constant because it
guaranteed not to drop any bits from our CharUnits representation of the
value.  However, this is suboptimal for 32-bit targets: LLVM passes like
GlobalOpt will get confused by these sorts of casts resulting in
pessimization.

Instead, make sure the ptrtoint operand has a pointer-sized integer
type.

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

8 years agotest: generalise the matching
Saleem Abdulrasool [Fri, 17 Jun 2016 17:33:36 +0000 (17:33 +0000)]
test: generalise the matching

Use a regex for the clang version as that will change all the time.

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

8 years agoDriver: introduce and use `-isystem-after` for cross-windows
Saleem Abdulrasool [Fri, 17 Jun 2016 17:23:16 +0000 (17:23 +0000)]
Driver: introduce and use `-isystem-after` for cross-windows

This mirrors the many other -i*after options to insert a new system search
directory at the end of the search path.  This makes it possible to actually
inject a search path after the resource dir.  This option is similar in spirit
to the /imsvc option in the clang-cl driver.  This is needed to properly use the
driver for Windows targets where the clang headers wrap some of the system
headers.

This concept is actually useful on other targets (e.g. Linux) and would be
really easy to support on the core toolchain.

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

8 years ago[OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver
Yaxun Liu [Fri, 17 Jun 2016 17:19:28 +0000 (17:19 +0000)]
[OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver

Fix a regression which forbids using -std=cl|CL1.1|CL1.2|CL2.0 in driver.

Allow -std and -cl-std={cl|CL}{|1.1|1.2|2.0}.

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

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

8 years ago[Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installations
Bryan Chan [Fri, 17 Jun 2016 16:47:14 +0000 (16:47 +0000)]
[Driver] Adapt Linux::GCCVersion::Parse to match GCC 5 installations

Summary:
Some GCC 5 installations store the libstdc++ includes and GCC-specific files in paths without
the minor part of the version number, such as

  /usr/include/c++/5
  /usr/lib64/gcc/x86_64-suse-linux/5

Reviewers: cfe-commits, thiagomacieira, jroelofs

Subscribers: tinti, jroelofs

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

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

8 years ago[codeview] Stop emitting fully qualified subprogram display names
Reid Kleckner [Fri, 17 Jun 2016 16:11:20 +0000 (16:11 +0000)]
[codeview] Stop emitting fully qualified subprogram display names

This effectively reverts r255744, and leaves the printing option tweaks.

We can add the name qualifiers easily in the backend.

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

8 years ago[X86][SSE4A] Use native IR for mask movntsd/movntss intrinsics.
Simon Pilgrim [Fri, 17 Jun 2016 14:28:16 +0000 (14:28 +0000)]
[X86][SSE4A] Use native IR for mask movntsd/movntss intrinsics.

Depends on llvm side commit r273002.

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

8 years agoAMDGPU: Fix supported CL features
Jan Vesely [Fri, 17 Jun 2016 02:25:03 +0000 (02:25 +0000)]
AMDGPU: Fix supported CL features

Reviewers: arsenm

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

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

8 years agoToolingTests/runToolOnCode.TestSkipFunctionBody: Appease msc targets.
NAKAMURA Takumi [Fri, 17 Jun 2016 02:04:51 +0000 (02:04 +0000)]
ToolingTests/runToolOnCode.TestSkipFunctionBody: Appease msc targets.

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

8 years ago[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.
Ranjeet Singh [Fri, 17 Jun 2016 00:59:41 +0000 (00:59 +0000)]
[ARM] Add mrrc/mrrc2 intrinsics and update existing mcrr/mcrr2 intrinsics.

Reapplying patch in r272777 which was reverted
because the llvm patch which added support
for generating the mcrr/mcrr2 instructions
from the intrinsic was causing an assertion
failure. This has now been fixed in llvm.

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

8 years agoHeaders: wordsmith error message
Saleem Abdulrasool [Fri, 17 Jun 2016 00:27:02 +0000 (00:27 +0000)]
Headers: wordsmith error message

Use the marketing name for the MSVC release as pointed out by Nico Weber!

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

8 years ago[CodeGen] Fix a segfault caused by pass_object_size.
George Burgess IV [Thu, 16 Jun 2016 23:06:04 +0000 (23:06 +0000)]
[CodeGen] Fix a segfault caused by pass_object_size.

This patch fixes a bug where we'd segfault (in some cases) if we saw a
variadic function with one or more pass_object_size arguments.

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

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

8 years agoFix a few issues while skipping function bodies
Olivier Goffart [Thu, 16 Jun 2016 21:40:06 +0000 (21:40 +0000)]
Fix a few issues while skipping function bodies

 - In functions with try { } catch { }, only the try block would be
   skipped, not the catch blocks

 - The template functions would still be parsed.

 - The initializers within a constructor would still be parsed.

 - The inline functions within class would still be stored, only to be
   discared later.

 - Invalid code with try would assert (as in "int foo() try assert_here")

This attempt to do even less while skipping function bodies.

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

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

8 years agoKeep invalid functions as part of the AST
Olivier Goffart [Thu, 16 Jun 2016 21:39:55 +0000 (21:39 +0000)]
Keep invalid functions as part of the AST

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

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

8 years agoFunctions declared in a scope should not hide previous declaration in earlier scopes
Olivier Goffart [Thu, 16 Jun 2016 21:39:46 +0000 (21:39 +0000)]
Functions declared in a scope should not hide previous declaration in earlier scopes

This code should be an error:

 void foo(int);
 void f3() {
   int foo(float);
   {
     float foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
   }
 }

the foo(float) function declared at function scope should not hide the float(int)
while trying to redeclare functions.

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

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

8 years agoMinor fixes for miamcpu-opt.c test
Artem Belevich [Thu, 16 Jun 2016 20:16:49 +0000 (20:16 +0000)]
Minor fixes for miamcpu-opt.c test

Added -no-canonical-prefixes to make cc1 binary name more predictable.
Added appropriate REQUIRES keywords.

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

8 years ago[DebugInfo] Put the vftable index in the debug info
Reid Kleckner [Thu, 16 Jun 2016 20:08:51 +0000 (20:08 +0000)]
[DebugInfo] Put the vftable index in the debug info

This won't always be enough info to call a virtual method from the
debugger, but it's a start.

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

8 years ago[x86] generate IR for AVX2 integer min/max builtins
Sanjay Patel [Thu, 16 Jun 2016 18:45:01 +0000 (18:45 +0000)]
[x86] generate IR for AVX2 integer min/max builtins
Sibling patch to r272932:
http://reviews.llvm.org/rL272932

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