]> granicus.if.org Git - clang/log
clang
10 years agoARM: add support for v8 ldaex/stlex builtins.
Tim Northover [Wed, 2 Jul 2014 12:56:02 +0000 (12:56 +0000)]
ARM: add support for v8 ldaex/stlex builtins.

ARMv8 adds (to both AArch32 and AArch64) acquiring and releasing
variants of the exclusive operations, in line with the C++11 memory
model.

This adds support for two new intrinsics to expose them to C & C++
developers directly: __builtin_arm_ldaex and __builtin_arm_stlex, in
direct analogy with the versions with no implicit barrier.

rdar://problem/15885451

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

10 years agoMake FunctionDecl::getReturnTypeSourceRange() support non-builtin types
Alp Toker [Wed, 2 Jul 2014 12:55:58 +0000 (12:55 +0000)]
Make FunctionDecl::getReturnTypeSourceRange() support non-builtin types

Also document that the function is a "best-effort" facility to extract source
ranges from limited AST type location info.

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

10 years agoX86: inline all atomic operations up to 128-bits.
Tim Northover [Wed, 2 Jul 2014 10:25:45 +0000 (10:25 +0000)]
X86: inline all atomic operations up to 128-bits.

The backend *can* cope with all of these now, so Clang should give it the
chance. On CPUs without cmpxchg16b (e.g. the original athlon64) LLVM can reform
the libcalls.

rdar://problem/13496295

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

10 years agoDon't accept qualified 'int' main return types in C++ or standard C mode
Alp Toker [Wed, 2 Jul 2014 07:07:20 +0000 (07:07 +0000)]
Don't accept qualified 'int' main return types in C++ or standard C mode

C++ [basic.start.main]p1: "It shall have a return type of type int"

ISO C is also clear about this, so only accept 'int' with qualifiers in GNUMode
C.

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

10 years agoAdded test for capturing VLA types if the captured variable is a function parameter.
Alexey Bataev [Wed, 2 Jul 2014 07:05:22 +0000 (07:05 +0000)]
Added test for capturing VLA types if the captured variable is a function parameter.

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

10 years ago[OPENMP, C++11] Improve code of InitVLACaptures function.
Alexey Bataev [Wed, 2 Jul 2014 05:15:00 +0000 (05:15 +0000)]
[OPENMP, C++11] Improve code of InitVLACaptures function.

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

10 years agoPrevent Clang from crashing on template code.
Richard Trieu [Wed, 2 Jul 2014 04:39:38 +0000 (04:39 +0000)]
Prevent Clang from crashing on template code.

Fixes PR20110, where Clang hits an assertion failure when it expects that the
sub-expression of a bit cast to pointer to also be a pointer, but gets a value
instead.

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

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

10 years ago[OPENMP] Fixed error message reporting for nesting of regions
Alexey Bataev [Wed, 2 Jul 2014 03:04:53 +0000 (03:04 +0000)]
[OPENMP] Fixed error message reporting for nesting of regions

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

10 years agoIntroduce a FunctionDecl::getReturnTypeSourceRange() utility
Alp Toker [Wed, 2 Jul 2014 01:47:15 +0000 (01:47 +0000)]
Introduce a FunctionDecl::getReturnTypeSourceRange() utility

This source range is useful for all kinds of diagnostic QOI and refactoring
work, so let's make it more discoverable.

This commit also makes use of the new function to enhance various diagnostics
relating to return types and resolves an old FIXME.

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

10 years agoclang/test/CodeGenCXX/microsoft-no-rtti-data.cpp: Relax an expression for -Asserts.
NAKAMURA Takumi [Tue, 1 Jul 2014 23:33:03 +0000 (23:33 +0000)]
clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp: Relax an expression for -Asserts.

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

10 years agoCodeGen: Add some comments describing VFTable CG
David Majnemer [Tue, 1 Jul 2014 22:37:08 +0000 (22:37 +0000)]
CodeGen: Add some comments describing VFTable CG

No functionality change, just some comments to describe what is going
on.

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

10 years agoCodeGenCXX: Add tests for RTTI in VFTables
David Majnemer [Tue, 1 Jul 2014 22:25:00 +0000 (22:25 +0000)]
CodeGenCXX: Add tests for RTTI in VFTables

This test was supposed to go in with r212125.

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

10 years agoDriver: Handle /GR- in a compatible way with MSVC
David Majnemer [Tue, 1 Jul 2014 22:24:56 +0000 (22:24 +0000)]
Driver: Handle /GR- in a compatible way with MSVC

There are slight differences between /GR- and -fno-rtti which made
mapping one to the other inappropriate.

-fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related
information for the v-table.

/GR- does not generate complete object locators and thus will not
reference them in vftables.  However, constructs like dynamic_cast and
typeid are permitted.

This should bring our implementation of RTTI up to semantic parity with
MSVC modulo bugs.

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

10 years agoWin64: Disable uwtable until we fix .pdata emission in LLVM
Reid Kleckner [Tue, 1 Jul 2014 22:23:54 +0000 (22:23 +0000)]
Win64: Disable uwtable until we fix .pdata emission in LLVM

LLVM r211399 started emitting .pdata for win64 by default.
Unfortunately, it produces invalid object files.  I plan to fix that
Soon.  For now, don't request unwind tables.  This fixes the clang-cl
self-host on win64.

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

10 years agoAST: Small simplification in VTableBuilder
David Majnemer [Tue, 1 Jul 2014 21:10:07 +0000 (21:10 +0000)]
AST: Small simplification in VTableBuilder

Stash whether or not we have an RTTI component away instead of
recomputing it.

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

10 years agoMS ABI: Reference MSVC RTTI from the VFTable
David Majnemer [Tue, 1 Jul 2014 20:30:31 +0000 (20:30 +0000)]
MS ABI: Reference MSVC RTTI from the VFTable

The pointer for a class's RTTI data comes right before the VFTable but
has no name.  To be properly compatible with this, we do the following:
* Create a single GlobalVariable which holds the contents of the VFTable
  _and_ the pointer to the RTTI data.
* Create a GlobalAlias, with appropriate linkage/visibility, that points
  just after the RTTI data pointer.  This ensures that the VFTable
  symbol will always refer to VFTable data.
* Create a Comdat with a "Largest" SelectionKind and stick the private
  GlobalVariable in it.  By transitivity, the GlobalAlias will be a
  member of the Comdat group.  Using "Largest" ensures that foreign
  definitions without an RTTI data pointer will _not_ be chosen in the
  final linked image.

Whether or not we emit RTTI data depends on several things:
* The -fno-rtti flag implies that we should never not emit a pointer to
  RTTI data before the VFTable.
* __declspec(dllimport) brings in the VFTable from a remote DLL. Use an
  available_externally GlobalVariable to provide a local definition of
  the VFTable.  This means that we won't have any available_externally
  definitions of things like complete object locators.  This is
  acceptable because they are never directly referenced.

To my knowledge, this completes the implementation of MSVC RTTI code
generation.

Further semantic work should be done to properly support /GR-.

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

10 years agoclang-cl: Ignore /Zc:inline and /Zc:rvalueCast
Reid Kleckner [Tue, 1 Jul 2014 18:27:02 +0000 (18:27 +0000)]
clang-cl: Ignore /Zc:inline and /Zc:rvalueCast

These flags enable behavior in MSVC that Clang has by default.

/Zc:inline essentially marks all COMDATs as discardable.  In LLVM
parlance, this means using linkonce_odr linkage, which is what we
already do.

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

10 years agoGCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default in Clang.
Sylvestre Ledru [Tue, 1 Jul 2014 17:24:27 +0000 (17:24 +0000)]
GCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default in Clang.
Currently, we fail with an error.

Reviewers: rafael

Reviewed By: rafael

Subscribers: rnk, cfe-commits

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

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

10 years agoRemove CleanupHackLevel from CGException.
Logan Chien [Tue, 1 Jul 2014 11:47:10 +0000 (11:47 +0000)]
Remove CleanupHackLevel from CGException.

This patch removes the dead code, and refines the
getEHResumeBlock() slightly.

The CleanupHackLevel was a hack to the old exception
handling intrinsics, which have several issues with function
inliner.

Since LLVM 3.0, the new landingpad and resume instructions
are added to LLVM IR.  With the new exception handling
mechanism, most of the issues are fixed now.  We should
always use these instructions to implement the exception
handling code nowadays, and we don't need the hack any more.

Besides, the `CleanupHackLevel` is a compile-time constant,
thus other cases have been considered as dead code for a while.

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

10 years ago[Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"
Simon Atanasyan [Tue, 1 Jul 2014 10:59:09 +0000 (10:59 +0000)]
[Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"
command line option only. Internally we convert them to the "o32" and "n64"
respectively. So we do not need to refer them anywhere after that conversion.

No functional changes.

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

10 years agoEnable test/CodeGen/indirect-goto.c in 64b for local arrays
Gerolf Hoflehner [Tue, 1 Jul 2014 05:10:06 +0000 (05:10 +0000)]
Enable test/CodeGen/indirect-goto.c in 64b for local arrays

In 32b mode the reference count for block addresses
is not zero. This prevents inlining and constant
folding and causes the test to fail. Changing
the triple allows runnning the test in 64b mode.

The array in foo2 is now local instead of static until
at lower optimization levels the interprocedural constant
propagator is invoked before the global optimizer.

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

10 years agoTemporarily disable the indirect-goto.c test.
Bob Wilson [Tue, 1 Jul 2014 04:56:06 +0000 (04:56 +0000)]
Temporarily disable the indirect-goto.c test.

llvm r212077 causes this test to fail. We need to reorder some passes and
possibly make other changes to reenable the optimization being tested here.

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

10 years agoPR15677 - Crash in template diffing. Check that expression is evaluatable before...
Nikola Smiljanic [Tue, 1 Jul 2014 04:17:53 +0000 (04:17 +0000)]
PR15677 - Crash in template diffing. Check that expression is evaluatable before evaluating it.

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

10 years agoclang-interpreter: use LLVM interpreter if JIT is unavailable
Alp Toker [Tue, 1 Jul 2014 03:19:50 +0000 (03:19 +0000)]
clang-interpreter: use LLVM interpreter if JIT is unavailable

Update the strategy in r212083 to try JIT first and otherwise fall back to the
interpreter. This gives the best of both worlds and still builds fine with no
targets enabled.

Requires supporting changes from LLVM r212086.

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

10 years agodriver: add link dependency on CodeGen
Alp Toker [Tue, 1 Jul 2014 02:42:02 +0000 (02:42 +0000)]
driver: add link dependency on CodeGen

Fix the build when no targets are enabled. This dependency is incurred by two
unfortunate entries in LinkAllPasses.h included from cc1_main.cpp:

  llvm::createJumpInstrTablesPass();
  llvm::createCodeGenPreparePass();

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

10 years agoclang-interpreter: interpret instead of JITing
Alp Toker [Tue, 1 Jul 2014 02:41:55 +0000 (02:41 +0000)]
clang-interpreter: interpret instead of JITing

Fixes the build when no targets are selected, or no native target is built.

This also better matches up with the description/title of the example and
demonstrates how clang can be used to run C++ on constrained environments
without file IO or executable memory permissions (e.g. iOS apps).

A comment is added explaining how to extend the demo with JIT support as
needed.

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

10 years agoDo not define __STRICT_ANSI__ in clang-cl
Ehsan Akhgari [Mon, 30 Jun 2014 20:36:33 +0000 (20:36 +0000)]
Do not define __STRICT_ANSI__ in clang-cl

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

10 years ago[UBSan] Don't link UBSan runtime into shared libraries.
Alexey Samsonov [Mon, 30 Jun 2014 20:27:16 +0000 (20:27 +0000)]
[UBSan] Don't link UBSan runtime into shared libraries.

It used to be a feature of UBSan (it could sanitize a standalone
shared object instead of the whole program), but now it causes
more problems, like PR20165.

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

10 years agoConsider module depedencies when checking a preamble in libclang
Ben Langmuir [Mon, 30 Jun 2014 20:04:14 +0000 (20:04 +0000)]
Consider module depedencies when checking a preamble in libclang

Add module dependencies (header files, module map files) to the list of
files to check when deciding whether to rebuild a preamble. That fixes
using preambles with module imports so long as they are in
non-overridden files.

My intent is to use to unify the existing dependency collectors to the
new “DependencyCollectory” interface from this commit, starting with the
DependencyFileGenerator.

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

10 years agoUse the newly added FindInEnvPath helper in clang
Ehsan Akhgari [Mon, 30 Jun 2014 19:56:37 +0000 (19:56 +0000)]
Use the newly added FindInEnvPath helper in clang

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

10 years ago[x86] Add Clang support for intrinsic __rdpmc.
Andrea Di Biagio [Mon, 30 Jun 2014 18:23:58 +0000 (18:23 +0000)]
[x86] Add Clang support for intrinsic __rdpmc.

This patch adds intrinsic __rdpmc to header file 'ia32intrin.h'.
Intrinsic __rdmpc can be used to read performance monitoring counters. It is
implemented as a direct call to __builtin_ia32_rdpmc.

It takes as input a value representing the index of the performance counter to
read. The value of the performance counter is then returned as a unsigned
64-bit quantity.

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

10 years agoRemoved unused typedef for recursive_directory_iterator
Ben Langmuir [Mon, 30 Jun 2014 16:10:15 +0000 (16:10 +0000)]
Removed unused typedef for recursive_directory_iterator

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

10 years agoclang-format: Support member function reference qualifiers.
Daniel Jasper [Mon, 30 Jun 2014 13:54:27 +0000 (13:54 +0000)]
clang-format: Support member function reference qualifiers.

Before:
  string // break
      operator()() &
  {}

After:
  string // break
  operator()() & {}

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

10 years agoclang-format: Improve expression heuristics.
Daniel Jasper [Mon, 30 Jun 2014 13:44:47 +0000 (13:44 +0000)]
clang-format: Improve expression heuristics.

Upon encountering a binary operator inside parentheses, assume that the
parentheses contain an expression.

Before:
  MACRO('0' <= c&& c <= '9');

After:
  MACRO('0' <= c && c <= '9');

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

10 years agoFixing a few typos in the documentation.
Aaron Ballman [Mon, 30 Jun 2014 13:43:04 +0000 (13:43 +0000)]
Fixing a few typos in the documentation.

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

10 years agoclang-format: [JS] support free-standing functions again.
Daniel Jasper [Mon, 30 Jun 2014 13:24:54 +0000 (13:24 +0000)]
clang-format: [JS] support free-standing functions again.

This worked initially but was broken by r210887.

Before:
  function outer1(a, b) {
    function inner1(a, b) { return a; } inner1(a, b);
  } function outer2(a, b) { function inner2(a, b) { return a; } inner2(a, b); }

After:
  function outer1(a, b) {
    function inner1(a, b) { return a; }
    inner1(a, b);
  }
  function outer2(a, b) {
    function inner2(a, b) { return a; }
    inner2(a, b);
  }

Thanks to Adam Strzelecki for working on this.

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

10 years ago[OPENMP] Added table with allowed nesting info for OpenMP regions (per request from...
Alexey Bataev [Mon, 30 Jun 2014 10:22:46 +0000 (10:22 +0000)]
[OPENMP] Added table with allowed nesting info for OpenMP regions (per request from Samuel F Antao).

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

10 years agoSecond part of fix in CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 09:14:10 +0000 (09:14 +0000)]
Second part of fix in CodeGen/captured-statements-nested.c

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

10 years agoTest fix
Alexey Bataev [Mon, 30 Jun 2014 09:05:08 +0000 (09:05 +0000)]
Test fix

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

10 years agoFixed incompatibility in CodeGen/captured-statements-nested.c with MSVC
Alexey Bataev [Mon, 30 Jun 2014 08:37:48 +0000 (08:37 +0000)]
Fixed incompatibility in CodeGen/captured-statements-nested.c with MSVC

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

10 years agoFixed CodeGen/captured-statements-nested.c test
Alexey Bataev [Mon, 30 Jun 2014 08:17:11 +0000 (08:17 +0000)]
Fixed CodeGen/captured-statements-nested.c test

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

10 years ago[Driver][Mips] Fix test cases - make ABI name and target triple consistent.
Simon Atanasyan [Mon, 30 Jun 2014 08:10:01 +0000 (08:10 +0000)]
[Driver][Mips] Fix test cases - make ABI name and target triple consistent.

No functional changes.

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

10 years ago[Driver][Mips] Check rejecting of invalid MIPS ABI names in the test.
Simon Atanasyan [Mon, 30 Jun 2014 08:09:54 +0000 (08:09 +0000)]
[Driver][Mips] Check rejecting of invalid MIPS ABI names in the test.

No functional changes.

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

10 years agoDisable CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 05:07:42 +0000 (05:07 +0000)]
Disable CodeGen/captured-statements-nested.c

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

10 years agoFixed CodeGen/captured-statements-nested.c test
Alexey Bataev [Mon, 30 Jun 2014 05:02:50 +0000 (05:02 +0000)]
Fixed CodeGen/captured-statements-nested.c test

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

10 years agoDisable CodeGen/captured-statements-nested.c
Alexey Bataev [Mon, 30 Jun 2014 03:30:41 +0000 (03:30 +0000)]
Disable CodeGen/captured-statements-nested.c

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

10 years agoTemp XFAIL CodeGen/captured-statements-nested.c to fix the test
Alexey Bataev [Mon, 30 Jun 2014 03:14:43 +0000 (03:14 +0000)]
Temp XFAIL CodeGen/captured-statements-nested.c to fix the test

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

10 years agoUsing of variable length arrays in captured statements and OpenMP constructs.
Alexey Bataev [Mon, 30 Jun 2014 02:55:54 +0000 (02:55 +0000)]
Using of variable length arrays in captured statements and OpenMP constructs.
Differential Revision: http://reviews.llvm.org/D4067

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

10 years agotest: move test from CodeGen to Sema
Saleem Abdulrasool [Mon, 30 Jun 2014 02:14:37 +0000 (02:14 +0000)]
test: move test from CodeGen to Sema

Move test from CodeGen to Sema to more accurately reflect what is being tested
as pointed out by Alp.

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

10 years agoRemove some incorrect test suppressions
Alp Toker [Mon, 30 Jun 2014 01:34:09 +0000 (01:34 +0000)]
Remove some incorrect test suppressions

These don't actually require any registered backend to run.

This commit tests the water with a handful of fixes for what is a more
widespread problem.

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

10 years agoCodeGenAction::ExecuteAction(): check for invalid LLVM source locations
Alp Toker [Mon, 30 Jun 2014 01:33:59 +0000 (01:33 +0000)]
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations

Add sign checks to deal with the fact that IR parser line/column pairs are
signed integers and sometimes invalid.

The crash path is potentially triggered by corrupt '.bc' files in practice,
though I don't have a binary input test case that can be checked-in right now.

(Unfortunately the backend itself crashes on various ill-formed '.bc' inputs so
this bandage isn't as helpful as it appears yet.)

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

10 years agoExtract an isReservedName() function
Alp Toker [Mon, 30 Jun 2014 01:33:53 +0000 (01:33 +0000)]
Extract an isReservedName() function

We'll want to share the implementation if anything else decides to check
for reserved names in future, so make this little snippet of code more
discoverable.

Also remove the __va_list_tag and __builtin_va_list special-case
checks. They're leftovers from before when the reserved name logic was
added.

No change in functionality.

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

10 years agoBasic: correct the va_list type on Windows on ARM
Saleem Abdulrasool [Sun, 29 Jun 2014 23:05:41 +0000 (23:05 +0000)]
Basic: correct the va_list type on Windows on ARM

Windows on ARM defines va_list as a typedef for char *.  Although the semantics
of argument passing for variadic functions matches AAPCS VFP, the wrapped
struct __va_list type is unused.  This makes the intrinsic definition for
va_list match that of Visual Studio.

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

10 years agoFix a stray semi-colon. (Found by a pedantic warning)
Chandler Carruth [Sun, 29 Jun 2014 22:42:51 +0000 (22:42 +0000)]
Fix a stray semi-colon. (Found by a pedantic warning)

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

10 years agoAdd a matcher for SubstNonTypeTemplateParmExpr.
Alexander Kornienko [Sun, 29 Jun 2014 22:18:53 +0000 (22:18 +0000)]
Add a matcher for SubstNonTypeTemplateParmExpr.

Reviewers: klimek, djasper

Reviewed By: djasper

Subscribers: klimek, aemerson, cfe-commits

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

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

10 years ago[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
Simon Atanasyan [Sun, 29 Jun 2014 16:51:16 +0000 (16:51 +0000)]
[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
and Clang drivers but internally LLVM/Clang use the name "n64".

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

10 years agoRevert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolc...
NAKAMURA Takumi [Sun, 29 Jun 2014 16:00:11 +0000 (16:00 +0000)]
Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32.

It reverts commits as follows:
  r211866: "Driver: use GNU::Link for the Generic_GCC toolchain"
  r211895: "Replace GetProgramPath("ld") with GetLinkerPath()."
  r211995: "Driver: add a cygwin linker tool"

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

10 years agoLibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:07:48 +0000 (11:07 +0000)]
LibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.

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

10 years agoclang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:03:28 +0000 (11:03 +0000)]
clang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.

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

10 years agoDriver: add a cygwin linker tool
Saleem Abdulrasool [Sun, 29 Jun 2014 06:11:14 +0000 (06:11 +0000)]
Driver: add a cygwin linker tool

This adds a linker tool for the Windows cygwin environment.  This linker
invocation is significantly different from the generic ld invocation.  It
requires additional parameters as well as does not accept some normal
parameters.  This should fix self-hosting on Cygwin.

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

10 years agotest: add a test for windows itanium exceptions
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:15 +0000 (23:34 +0000)]
test: add a test for windows itanium exceptions

Some time ago, I noticed that try would get resolved incorrectly for Windows
Itanium targets.  Add an explicit test to exsure that exceptions are handled
correctly for Windows Itanium environments.

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

10 years agoBasic: fix handling for Windows Itanium environment
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:11 +0000 (23:34 +0000)]
Basic: fix handling for Windows Itanium environment

This corrects the handling for i686-windows-itanium.  This environment is nearly
identical to Windows MSVC, except it uses the itanium ABI for C++.

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

10 years agoBasic: whitespace cleanup
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:07 +0000 (23:34 +0000)]
Basic: whitespace cleanup

Remove unnecessary separation of anonymous namespace.  NFC.

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

10 years agoExtend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
Richard Trieu [Sat, 28 Jun 2014 23:25:37 +0000 (23:25 +0000)]
Extend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
trigger on taking the address of a reference that is returned from a function
call.

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

10 years agoImport MutableArrayRef into clang namespace.
Craig Topper [Sat, 28 Jun 2014 23:22:33 +0000 (23:22 +0000)]
Import MutableArrayRef into clang namespace.

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

10 years agoRemove llvm:: from uses of ArrayRef.
Craig Topper [Sat, 28 Jun 2014 23:22:23 +0000 (23:22 +0000)]
Remove llvm:: from uses of ArrayRef.

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

10 years ago[Driver][Mips] Fix else-after-return.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:08 +0000 (15:56 +0000)]
[Driver][Mips] Fix else-after-return.

No functional changes.

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

10 years ago[Driver][Mips] Remove redundant brackets.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:03 +0000 (15:56 +0000)]
[Driver][Mips] Remove redundant brackets.

No functional changes.

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

10 years ago[Driver][Mips] Remove redundant abstract/override function.
Simon Atanasyan [Sat, 28 Jun 2014 15:55:55 +0000 (15:55 +0000)]
[Driver][Mips] Remove redundant abstract/override function.

No functional changes.

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

10 years agoGet arm_acle tests from r211962 working
Alp Toker [Sat, 28 Jun 2014 06:51:27 +0000 (06:51 +0000)]
Get arm_acle tests from r211962 working

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

10 years agoExtend -Wdynamic-class-memaccess to records containing dynamic classes
Reid Kleckner [Fri, 27 Jun 2014 23:58:21 +0000 (23:58 +0000)]
Extend -Wdynamic-class-memaccess to records containing dynamic classes

Reviewers: rtrieu

Subscribers: cfe-commits

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

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

10 years agoIntroduce arm_acle.h supporting existing LLVM builtin intrinsics
Yi Kong [Fri, 27 Jun 2014 21:25:42 +0000 (21:25 +0000)]
Introduce arm_acle.h supporting existing LLVM builtin intrinsics

Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64.

Reviewers: t.p.northover, compnerd, rengolin

Reviewed By: compnerd, rengolin

Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits

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

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

10 years agoRemove 'const' from MemoryBuffers used through the SourceManager
David Blaikie [Fri, 27 Jun 2014 17:40:03 +0000 (17:40 +0000)]
Remove 'const' from MemoryBuffers used through the SourceManager

This removes a const_cast added in r211884 that occurred due to an
inconsistency in how MemoryBuffers are handled between some parts of
clang and LLVM.

MemoryBuffers are immutable and the general convention in the LLVM
project is to omit const from immutable types as it's simply
redundant/verbose (see llvm::Type, for example). While this change
doesn't remove "const" from /every/ MemoryBuffer, it at least makes this
chain of ownership/usage consistent.

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

10 years agoAdd reparse test for libclang
Ben Langmuir [Fri, 27 Jun 2014 17:04:26 +0000 (17:04 +0000)]
Add reparse test for libclang

Adapted from a reproducer by Dan Schmidt, thanks!

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

10 years agoclang-cl: Map /EHs- to -fno-exceptions
Reid Kleckner [Fri, 27 Jun 2014 17:02:02 +0000 (17:02 +0000)]
clang-cl: Map /EHs- to -fno-exceptions

This isn't 100% compatible with MSVC, but it's close enough.  MSVC's /EH
flag doesn't really control exceptions so much as how to clean up after
an exception is thrown.  The upshot is that cl.exe /EHs- will compile
try, throw, and catch statements with a warning, but clang-cl will
reject such constructs with a hard error.  We can't compile such EH
constructs anyway, but this may matter to consumers of the AST.

Reviewers: hans

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

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

10 years agoCodeGen: Fix a typo in getThreadLocalWrapperLinkage
David Majnemer [Fri, 27 Jun 2014 16:56:27 +0000 (16:56 +0000)]
CodeGen: Fix a typo in getThreadLocalWrapperLinkage

The description had a misspelling.  No functionality change.

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

10 years agoFix a bug in my previous patch by restoring the behavior that the fatal
Chandler Carruth [Fri, 27 Jun 2014 16:37:27 +0000 (16:37 +0000)]
Fix a bug in my previous patch by restoring the behavior that the fatal
error handler is only registered once.

To avoid the use of std::call_once (the obvious way to do this) I've
wrapped everything up into a managed static and done the work in
a constructor. Silly, but it should be effective.

Some out-of-tree libclang users reported this to me, and I've asked them
to put together a test case which exhibits this behavior, but I wanted
to fix things ASAP since the nature of the fix is straight forward.

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

10 years agoThis fixes libclang to cope with the now compile-time multithreaded
Chandler Carruth [Fri, 27 Jun 2014 15:14:39 +0000 (15:14 +0000)]
This fixes libclang to cope with the now compile-time multithreaded
selection re-enabled in r211900 in LLVM.

The approach (unlike r211121) doesn't rely on std::mutex or
std::call_once to avoid breaknig cygwin bots.

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

10 years ago[ARM] Fix AAPCS non-compliance caused by very large structs
Oliver Stannard [Fri, 27 Jun 2014 13:59:27 +0000 (13:59 +0000)]
[ARM] Fix AAPCS non-compliance caused by very large structs

This is a fix to the code in clang which inserts padding arguments to
ensure that the ARM backend can emit AAPCS-VFP compliant code. This code
needs to track the number of registers which have been allocated in order
to do this. When passing a very large struct (>64 bytes) by value, clang
emits IR which takes a pointer to the struct, but the backend converts this
back to passing the struct in registers and on the stack. The bug was that
this was being considered by clang to only use one register, meaning that
there were situations in which padding arguments were incorrectly emitted
by clang.

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

10 years agoReplace GetProgramPath("ld") with GetLinkerPath().
Logan Chien [Fri, 27 Jun 2014 12:37:36 +0000 (12:37 +0000)]
Replace GetProgramPath("ld") with GetLinkerPath().

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

10 years ago[ARM-BE] Generate correct NEON intrinsics for big endian systems.
James Molloy [Fri, 27 Jun 2014 11:53:35 +0000 (11:53 +0000)]
[ARM-BE] Generate correct NEON intrinsics for big endian systems.

The NEON intrinsics in arm_neon.h are designed to work on vectors
"as-if" loaded by (V)LDR. We load vectors "as-if" (V)LD1, so the
intrinsics are currently incorrect.

This patch adds big-endian versions of the intrinsics that does the
"obvious but dumb" thing of reversing all vector inputs and all
vector outputs. This will produce extra REVs, but we trust the
optimizer to remove them.

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

10 years agoDon't check clang binary name, as it can be different in some test setups.
Alexander Kornienko [Fri, 27 Jun 2014 11:18:13 +0000 (11:18 +0000)]
Don't check clang binary name, as it can be different in some test setups.

Summary: This unbreaks our internal build after these tests were turned on in r211738.

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: benlangmuir, cfe-commits

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

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

10 years ago[OPENMP] Parsing and sema analysis for 'copyprivate' clause.
Alexey Bataev [Fri, 27 Jun 2014 10:37:06 +0000 (10:37 +0000)]
[OPENMP] Parsing and sema analysis for 'copyprivate' clause.

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

10 years agoconst_cast the memory MemoryBuffer following LLVM r211883
Alp Toker [Fri, 27 Jun 2014 09:24:27 +0000 (09:24 +0000)]
const_cast the memory MemoryBuffer following LLVM r211883

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

10 years agoDriver: Pass -ivfsoverlay to module crashdumps
Justin Bogner [Fri, 27 Jun 2014 06:35:05 +0000 (06:35 +0000)]
Driver: Pass -ivfsoverlay to module crashdumps

When we create a crashdump involving modules, we build a VFS to
reproduce the problem with. This updates the reproduction script to
use that VFS.

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

10 years agoAdd a FIXME for an unfortunate issue in ConvertBackendLocation()
Alp Toker [Fri, 27 Jun 2014 06:02:00 +0000 (06:02 +0000)]
Add a FIXME for an unfortunate issue in ConvertBackendLocation()

This function is copying the entire file contents into memory repeatedly and
allocating new file IDs *each time* a source location is processed.

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

10 years agoDriver: use GNU::Link for the Generic_GCC toolchain
Saleem Abdulrasool [Fri, 27 Jun 2014 05:06:41 +0000 (05:06 +0000)]
Driver: use GNU::Link for the Generic_GCC toolchain

This changes the behaviour of the driver for linking to match that of the
Generic_GCC::Assemble.    The default link should use "ld" rather than "gcc" for
the linker as gcc does.  This avoids the unnecessary round-tripping through gcc.
It also is much more reasonable behaviour from the user's perspective.  This
should have been updated with SVN r195554 which changed the behaviour of
Generic_GCC::Assemble.

The gcc_forward test needs to be updated to mark the fact that -march is a flag
for GCC not ld.  This was updated as a typo fix, but added a check for a flag
that is not a link flag.

The bindings test covers the change for testing, and thus no new test was added.

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

10 years agoCodeGenAction: don't duplicate entire .ll/.bc files into memory
Alp Toker [Fri, 27 Jun 2014 04:34:44 +0000 (04:34 +0000)]
CodeGenAction: don't duplicate entire .ll/.bc files into memory

Requires supporting changes from LLVM r211861.

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

10 years ago[OPENMP] Added several test cases in nesting of OpenMP regions test after review...
Alexey Bataev [Fri, 27 Jun 2014 03:33:10 +0000 (03:33 +0000)]
[OPENMP] Added several test cases in nesting of OpenMP regions test after review from Samuel F Antao.

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

10 years agoAccount for differences in grep implementations
Alp Toker [Fri, 27 Jun 2014 03:11:38 +0000 (03:11 +0000)]
Account for differences in grep implementations

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

10 years agoRestore test from r211844 skipping '.file' directives
Alp Toker [Fri, 27 Jun 2014 02:59:39 +0000 (02:59 +0000)]
Restore test from r211844 skipping '.file' directives

At least this answers the question of whether .bc/.ll input processed by the
frontend produces identical output to the original compilation.

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

10 years agoPartially disable test from r211844
Alp Toker [Fri, 27 Jun 2014 02:35:57 +0000 (02:35 +0000)]
Partially disable test from r211844

ELF assembly contains .line directives that differ based on the input filename.
Weaken the test while considering options.

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

10 years agoAdd test coverage for .bc input in the frontend
Alp Toker [Fri, 27 Jun 2014 02:04:28 +0000 (02:04 +0000)]
Add test coverage for .bc input in the frontend

Test that we can consume LLVM bitcode and additionally check that it produces
the same output as a direct compilation.

The feature is crashy and has gone untested until now, but we might as well
provide some coverage as long as it remains in tree.

Also test LL source input in the same way because the existing tests for that
don't look convincing.

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

10 years agoRemove .bc from test config.suffixes
Alp Toker [Fri, 27 Jun 2014 02:04:21 +0000 (02:04 +0000)]
Remove .bc from test config.suffixes

This was unused. Besides, a binary file can't really contain lit ShTests.

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

10 years agoclang/test/Driver/fuse-ld.c: Really fix to match dos path.
NAKAMURA Takumi [Fri, 27 Jun 2014 01:32:59 +0000 (01:32 +0000)]
clang/test/Driver/fuse-ld.c: Really fix to match dos path.

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

10 years agoDo not inline methods of C++ containers (coming from headers).
Anna Zaks [Fri, 27 Jun 2014 01:03:05 +0000 (01:03 +0000)]
Do not inline methods of C++ containers (coming from headers).

This silences false positives (leaks, use of uninitialized value) in simple
code that uses containers such as std::vector and std::list. The analyzer
cannot reason about the internal invariances of those data structures which
leads to false positives. Until we come up with a better solution to that
problem, let's just not inline the methods of the containers and allow objects
to escape whenever such methods are called.

This just extends an already existing flag "c++-container-inlining" and applies
the heuristic not only to constructors and destructors of the containers, but
to all of their methods.

We have a bunch of distinct user reports all related to this issue
(radar://16058651, radar://16580751, radar://16384286, radar://16795491
[PR19637]).

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

10 years agoAllow different path separator for windows build.
Logan Chien [Fri, 27 Jun 2014 00:19:33 +0000 (00:19 +0000)]
Allow different path separator for windows build.

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

10 years agoAvoid extra back reference key lookup in msmangler
Reid Kleckner [Thu, 26 Jun 2014 22:42:18 +0000 (22:42 +0000)]
Avoid extra back reference key lookup in msmangler

Avoid a second key lookup when the back reference key is going to be
inserted in the StringMap. The string lookups in the msmangler are the
main responsible for the huge overhead when compared to the itanium
mangler. This patch makes a small but noticeable improvement.

Reviewed by: rnk

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

Patch by Agustín Bergé!

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

10 years agoObjective-C ARC. Provide diagnostic and fix-it
Fariborz Jahanian [Thu, 26 Jun 2014 21:22:16 +0000 (21:22 +0000)]
Objective-C ARC. Provide diagnostic and fix-it
when casting a retainable object to a objc_bridge_related
CF type with the suggestion of applying the method
specified in the bridging attribute to the object.
// rdar://15932435

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

10 years agoDriver: Fix a misleading comment and test for what it actually did
Justin Bogner [Thu, 26 Jun 2014 20:59:39 +0000 (20:59 +0000)]
Driver: Fix a misleading comment and test for what it actually did

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