]> granicus.if.org Git - clang/log
clang
10 years agoDiagnoseUnknownTypename always emits a diagnostic and returns true
Reid Kleckner [Thu, 19 Jun 2014 01:23:22 +0000 (01:23 +0000)]
DiagnoseUnknownTypename always emits a diagnostic and returns true

Make it return void and delete the dead code in the parser that handled
the case where it might return false.  This has been dead since 2010
when John deleted Action.h.

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

10 years agoObjective-C ARC. Allow conversion of (void*) pointers to
Fariborz Jahanian [Wed, 18 Jun 2014 23:52:49 +0000 (23:52 +0000)]
Objective-C ARC. Allow conversion of (void*) pointers to
retainable ObjC pointers without requiring a bridge-cast
in the context of pointer comparison as this is in effect
a +0 context. // rdar://16627903

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

10 years agoSema: Static redeclaration after extern declarations is a Microsoft Extension
David Majnemer [Wed, 18 Jun 2014 23:26:25 +0000 (23:26 +0000)]
Sema: Static redeclaration after extern declarations is a Microsoft Extension

CL permits static redeclarations to follow extern declarations.  The
storage specifier on the latter declaration has no effect.

This fixes PR20034.

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

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

10 years agoObjective-C. Revert my patch in r211234.
Fariborz Jahanian [Wed, 18 Jun 2014 23:22:38 +0000 (23:22 +0000)]
Objective-C. Revert my patch in r211234.

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

10 years agoObjective-C ARC. Allow conversion of (void*) pointers to
Fariborz Jahanian [Wed, 18 Jun 2014 22:50:40 +0000 (22:50 +0000)]
Objective-C ARC. Allow conversion of (void*) pointers to
retainable ObjC pointers without requiring a bridge-cast
by recognizing this as a +0 context. // rdar://16627903

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

10 years agotests: relax ms-intrinsics test
Saleem Abdulrasool [Wed, 18 Jun 2014 21:48:44 +0000 (21:48 +0000)]
tests: relax ms-intrinsics test

Relax the tests to allow for differences between release and debug builds.  This
should fix the buildbots.

Thanks to Benjamin Kramer and Eric Christo for their invaluable tip that this
was release build specific issue.

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

10 years agoRelax the cl-inputs.c test a little bit in case link.exe is on PATH
Reid Kleckner [Wed, 18 Jun 2014 21:34:36 +0000 (21:34 +0000)]
Relax the cl-inputs.c test a little bit in case link.exe is on PATH

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

10 years ago[MS-ABI] Implement typeid
Warren Hunt [Wed, 18 Jun 2014 21:15:55 +0000 (21:15 +0000)]
[MS-ABI] Implement typeid
This patch enables clang to generate calls to __RTtypeid when lowering
typeid on win32 targets.  Test cases are included.

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

10 years agoCodeGen: improve ms instrincics support
Saleem Abdulrasool [Wed, 18 Jun 2014 20:51:10 +0000 (20:51 +0000)]
CodeGen: improve ms instrincics support

Add support for _InterlockedCompareExchangePointer, _InterlockExchangePointer,
_InterlockExchange.  These are available as a compiler intrinsic on ARM and x86.
These are used directly by the Windows SDK headers without use of the intrin
header.

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

10 years agoObjective-C. Check for integer overflow in Objective-C's
Fariborz Jahanian [Wed, 18 Jun 2014 20:49:02 +0000 (20:49 +0000)]
Objective-C. Check for integer overflow in Objective-C's
boxed expression. // rdar://16417427

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

10 years ago[analyzer] Don't create new PostStmt nodes if we don't have to.
Jordan Rose [Wed, 18 Jun 2014 19:23:30 +0000 (19:23 +0000)]
[analyzer] Don't create new PostStmt nodes if we don't have to.

Doing this caused us to mistakenly think we'd seen a particular state before
when we actually hadn't, which resulted in false negatives. Credit to
Rafael Auler for discovering this issue!

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

10 years agoObjective-C. Try to fix the test in buildbot in my last patch.
Fariborz Jahanian [Wed, 18 Jun 2014 18:16:37 +0000 (18:16 +0000)]
Objective-C. Try to fix the test in buildbot in my last patch.

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

10 years agoObjective-C. Attributes on class declarations carry over
Fariborz Jahanian [Wed, 18 Jun 2014 17:58:27 +0000 (17:58 +0000)]
Objective-C. Attributes on class declarations carry over
to forward class declarations for diagnosis.
// rdar://16681279

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

10 years agoMake clang-cl accept .lib inputs (PR20065)
Hans Wennborg [Wed, 18 Jun 2014 17:21:50 +0000 (17:21 +0000)]
Make clang-cl accept .lib inputs (PR20065)

Patch by Ehsan Akhgari!

(Tiny tweak by me: renamed PathSegment to LibDir.)

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

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

10 years agoDriver: correct the backend option spelling
Saleem Abdulrasool [Wed, 18 Jun 2014 16:52:24 +0000 (16:52 +0000)]
Driver: correct the backend option spelling

The backend option does not have an '-enable' prefix.

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

10 years agoInherit dll attributes to static locals
Hans Wennborg [Wed, 18 Jun 2014 15:55:13 +0000 (15:55 +0000)]
Inherit dll attributes to static locals

This makes us handle static locals in exported/imported functions correctly.

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

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

10 years agoAArch64: re-enable tests that were looking for a non-existent backend.
Tim Northover [Wed, 18 Jun 2014 08:37:28 +0000 (08:37 +0000)]
AArch64: re-enable tests that were looking for a non-existent backend.

In the final phase of the merge, I managed to disable a bunch of Clang
tests accidentally. Fortunately none of them seem to have broken in
the interim.

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

10 years ago[OPENMP] Reformatting and code improvement.
Alexey Bataev [Wed, 18 Jun 2014 07:08:49 +0000 (07:08 +0000)]
[OPENMP] Reformatting and code improvement.

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

10 years agoReplace some assert(0)'s with llvm_unreachable.
Craig Topper [Wed, 18 Jun 2014 05:13:13 +0000 (05:13 +0000)]
Replace some assert(0)'s with llvm_unreachable.

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

10 years agoConvert an llvm_unreachable in an 'else' block to a removal of the 'if' and an assert...
Craig Topper [Wed, 18 Jun 2014 05:13:11 +0000 (05:13 +0000)]
Convert an llvm_unreachable in an 'else' block to a removal of the 'if' and an assertion of its condition. Suggestion from David Blaikie.

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

10 years ago[OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with MSVC).
Alexey Bataev [Wed, 18 Jun 2014 04:14:57 +0000 (04:14 +0000)]
[OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with MSVC).

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

10 years agoReplace some assert(0)'s with llvm_unreachable.
Craig Topper [Wed, 18 Jun 2014 03:57:25 +0000 (03:57 +0000)]
Replace some assert(0)'s with llvm_unreachable.

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

10 years agoConvert assert(0) to llvm_unreachable to silence a warning about Addend being uniniti...
Craig Topper [Wed, 18 Jun 2014 03:13:41 +0000 (03:13 +0000)]
Convert assert(0) to llvm_unreachable to silence a warning about Addend being uninitialized in default case.

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

10 years agoFix bug in code for avoiding dynamic initialization of dllimport globals
Hans Wennborg [Wed, 18 Jun 2014 01:21:33 +0000 (01:21 +0000)]
Fix bug in code for avoiding dynamic initialization of dllimport globals

When instantiating dllimport variables with dynamic initializers, don't
bail out of Sema::InstantiateVariableInitializer without calling
PopExpressionEvaluationContext().

This was causing a stale object to stay on the ExprEvalContexts stack,
causing subsequent calls to getCurrentMangleNumberContext() to fail,
resulting in incorrect numbering of static locals (and probably other
broken things).

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

10 years agoDocumentation for #pragma clang loop directive and options vectorize and interleave.
Tyler Nowicki [Wed, 18 Jun 2014 00:51:32 +0000 (00:51 +0000)]
Documentation for #pragma clang loop directive and options vectorize and interleave.

Reviewed by: Aaron Ballman and Dmitri Gribenko

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

10 years agoFix the caller of checkCorrectionVisibility too.
Kaelyn Takata [Tue, 17 Jun 2014 23:47:29 +0000 (23:47 +0000)]
Fix the caller of checkCorrectionVisibility too.

That's what I get for hurredly splitting the small change out of a much
bigger change that had moved where checkCorrectionVisibility was being
called.

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

10 years agoRemove an unused argument from checkCorrectionVisibility.
Kaelyn Takata [Tue, 17 Jun 2014 23:41:33 +0000 (23:41 +0000)]
Remove an unused argument from checkCorrectionVisibility.

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

10 years agoObjective-C ARC. Do not warn about properties with both
Fariborz Jahanian [Tue, 17 Jun 2014 23:35:13 +0000 (23:35 +0000)]
Objective-C ARC. Do not warn about properties with both
IBOutlet and weak attributes when accessed being
unpredictably set to nil because usage of such properties
are always single threaded and its ivar cannot be set
to nil asynchronously. // rdar://15885642

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

10 years agoRetry building modules that were compiled by other instances and are out-of-date
Ben Langmuir [Tue, 17 Jun 2014 22:35:27 +0000 (22:35 +0000)]
Retry building modules that were compiled by other instances and are out-of-date

When another clang instance builds a module, it may still be considered
"out of date" for the current instance in a couple of cases*.  This
patch prevents us from giving spurious errors when compilers race to
build a module by allowing the module load to fail when the pcm was
built by a different compiler instance.

* Cases where a module can be out of date despite just having been
built:

1) There are different -I paths between invocations that result in
finding a different module map file for some dependent module. This is
not an error, and should never be diagnosed.

<rdar://problem/16843887>

2) There are file system races where the headers making up a module are
touched or moved. Although this can sometimes mean trouble, diagnosing
it only during a build-race is worse than useless and we cannot detect
this in general.  It is more robust to just rebuild.  This was causing
spurious issues in some setups where only the modtime of headers was
bumped during a build.

<rdar://problem/16157638>

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

10 years agoRemove dead code.
Diego Novillo [Tue, 17 Jun 2014 20:01:51 +0000 (20:01 +0000)]
Remove dead code.

The parsing for -Rpass= had been factored into the function
GenerateOptimizationRemarkRegex, but at the time I forgot to remove
the original code that just handled OPT_Rpass_EQ.

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

10 years agoChange libclang initialization to use std::call_once instead of
Zachary Turner [Tue, 17 Jun 2014 19:57:15 +0000 (19:57 +0000)]
Change libclang initialization to use std::call_once instead of
hand rolled once-initialization, and rename the mutex to be more
descriptive of its actual purpose.

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

10 years agoRevert "[OPENMP] Initial support for '#pragma omp for'."
Rafael Espindola [Tue, 17 Jun 2014 17:20:53 +0000 (17:20 +0000)]
Revert "[OPENMP] Initial support for '#pragma omp for'."

This reverts commit r211096. Looks like it broke the msvc build:

SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template

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

10 years agoFix the comment which was backwards.
Yaron Keren [Tue, 17 Jun 2014 17:09:24 +0000 (17:09 +0000)]
Fix the comment which was backwards.

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

10 years agoRewrite ARM NEON intrinsic emission completely.
James Molloy [Tue, 17 Jun 2014 13:11:27 +0000 (13:11 +0000)]
Rewrite ARM NEON intrinsic emission completely.

There comes a time in the life of any amateur code generator when dumb string
concatenation just won't cut it any more. For NeonEmitter.cpp, that time has
come.

There were a bunch of magic type codes which meant different things depending on
the context. There were a bunch of special cases that really had no reason to be
there but the whole thing was so creaky that removing them would cause something
weird to fall over. There was a 1000 line switch statement for code generation
involving string concatenation, which actually did lexical scoping to an extent
(!!) with a bunch of semi-repeated cases.

I tried to refactor this three times in three different ways without
success. The only way forward was to rewrite the entire thing. Luckily the
testing coverage on this stuff is absolutely massive, both with regression tests
and the "emperor" random test case generator.

The main change is that previously, in arm_neon.td a bunch of "Operation"s were
defined with special names. NeonEmitter.cpp knew about these Operations and
would emit code based on a huge switch. Actually this doesn't make much sense -
the type information was held as strings, so type checking was impossible. Also
TableGen's DAG type actually suits this sort of code generation very well
(surprising that...)

So now every operation is defined in terms of TableGen DAGs. There are a bunch
of operators to use, including "op" (a generic unary or binary operator), "call"
(to call other intrinsics) and "shuffle" (take a guess...). One of the main
advantages of this apart from making it more obvious what is going on, is that
we have proper type inference. This has two obvious advantages:

  1) TableGen can error on bad intrinsic definitions easier, instead of just
     generating wrong code.
  2) Calls to other intrinsics are typechecked too. So
     we no longer need to work out whether the thing we call needs to be the Q-lane
     version or the D-lane version - TableGen knows that itself!

Here's an example: before:

  case OpAbdl: {
    std::string abd = MangleName("vabd", typestr, ClassS) + "(__a, __b)";
    if (typestr[0] != 'U') {
      // vabd results are always unsigned and must be zero-extended.
      std::string utype = "U" + typestr.str();
      s += "(" + TypeString(proto[0], typestr) + ")";
      abd = "(" + TypeString('d', utype) + ")" + abd;
      s += Extend(utype, abd) + ";";
    } else {
      s += Extend(typestr, abd) + ";";
    }
    break;
  }

after:

  def OP_ABDL     : Op<(cast "R", (call "vmovl", (cast $p0, "U",
                                                       (call "vabd", $p0, $p1))))>;

As an example of what happens if you do something wrong now, here's what happens
if you make $p0 unsigned before the call to "vabd" - that is, $p0 -> (cast "U",
$p0):

arm_neon.td:574:1: error: No compatible intrinsic found - looking up intrinsic 'vabd(uint8x8_t, int8x8_t)'
Available overloads:
  - float64x2_t vabdq_v(float64x2_t, float64x2_t)
  - float64x1_t vabd_v(float64x1_t, float64x1_t)
  - float64_t vabdd_f64(float64_t, float64_t)
  - float32_t vabds_f32(float32_t, float32_t)
... snip ...

This makes it seriously easy to work out what you've done wrong in fairly nasty
intrinsics.

As part of this I've massively beefed up the documentation in arm_neon.td too.

Things still to do / on the radar:
  - Testcase generation. This was implemented in the previous version and not in
    the new one, because
    - Autogenerated tests are not being run. The testcase in test/ differs from
      the autogenerated version.
    - There were a whole slew of special cases in the testcase generation that just
      felt (and looked) like hacks.
    If someone really feels strongly about this, I can try and reimplement it too.
  - Big endian. That's coming soon and should be a very small diff on top of this one.

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

10 years agoclang-format: Introduce style with spaces on both sides of */&.
Daniel Jasper [Tue, 17 Jun 2014 12:40:34 +0000 (12:40 +0000)]
clang-format: Introduce style with spaces on both sides of */&.

Patch by Janusz Sobczak (slightly extended).
This fixes llvm.org/19929.

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

10 years ago[OPENMP] Initial support for '#pragma omp for'.
Alexey Bataev [Tue, 17 Jun 2014 11:49:22 +0000 (11:49 +0000)]
[OPENMP] Initial support for '#pragma omp for'.

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

10 years ago[OPENMP] Renamed 'DataRecursiveASTVisitor' to just 'RecursiveASTVisitor' for 'reducti...
Alexey Bataev [Tue, 17 Jun 2014 02:32:07 +0000 (02:32 +0000)]
[OPENMP] Renamed 'DataRecursiveASTVisitor' to just 'RecursiveASTVisitor' for 'reduction' clause and small reformatting after Alp Toker's review.

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

10 years agoAdd documentation for PGO with instrumentation to clang's User's Manual.
Bob Wilson [Tue, 17 Jun 2014 00:45:30 +0000 (00:45 +0000)]
Add documentation for PGO with instrumentation to clang's User's Manual.

<rdar://problem/16771671>

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

10 years agoAdd support for the /Fi argument to clang-cl (PR20036)
Hans Wennborg [Tue, 17 Jun 2014 00:19:12 +0000 (00:19 +0000)]
Add support for the /Fi argument to clang-cl (PR20036)

Patch by Ehsan Akhgari!

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

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

10 years agoMS static locals mangling: don't double-increment mangling number for switches
Hans Wennborg [Tue, 17 Jun 2014 00:09:05 +0000 (00:09 +0000)]
MS static locals mangling: don't double-increment mangling number for switches

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

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

10 years agoMS static locals mangling: don't count enum scopes
Hans Wennborg [Tue, 17 Jun 2014 00:00:18 +0000 (00:00 +0000)]
MS static locals mangling: don't count enum scopes

We may not have the mangling for static locals vs. enums completely figured out,
but at least for my simple test cases, enums should not increment the mangling
number.

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

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

10 years agoUse the integrated assembler by default on OpenBSD/powerpc.
Brad Smith [Mon, 16 Jun 2014 23:03:00 +0000 (23:03 +0000)]
Use the integrated assembler by default on OpenBSD/powerpc.

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

10 years agoAArch64: Fix silly think-o in tests.
Jim Grosbach [Mon, 16 Jun 2014 22:18:26 +0000 (22:18 +0000)]
AArch64: Fix silly think-o in tests.

rdar://9283021

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

10 years agoAArch64: Support for __builtin_arm_rbit() and __builtin_arm_rbit64().
Jim Grosbach [Mon, 16 Jun 2014 21:56:02 +0000 (21:56 +0000)]
AArch64: Support for __builtin_arm_rbit() and __builtin_arm_rbit64().

__builtin_arm_rbit() and __builtin_arm_rbit64().

rdar://9283021

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

10 years agoARM: Support for __builtin_arm_rbit() intrinsic.
Jim Grosbach [Mon, 16 Jun 2014 21:55:58 +0000 (21:55 +0000)]
ARM: Support for __builtin_arm_rbit() intrinsic.

Reverse the bits in a word. Maps to the RBIT instruction.

rdar://9283021

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

10 years agoactually, just check if it is a file (including directory or symlink)
Sylvestre Ledru [Mon, 16 Jun 2014 20:51:40 +0000 (20:51 +0000)]
actually, just check if it is a file (including directory or symlink)

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

10 years agoCheck that the directory does not exist.
Sylvestre Ledru [Mon, 16 Jun 2014 20:31:15 +0000 (20:31 +0000)]
Check that the directory does not exist.
Otherwise, it could allows local users to obtain sensitive information or
overwrite arbitrary files via a symlink attack on temporary directories with
predictable names.

Reported as CVE-2014-2893 ( https://security-tracker.debian.org/tracker/CVE-2014-2893 )
Found by Jakub Wilk

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

10 years ago[modules] When we merge redecl chains or mark a decl used with an update
Richard Smith [Mon, 16 Jun 2014 20:26:19 +0000 (20:26 +0000)]
[modules] When we merge redecl chains or mark a decl used with an update
record, mark all subsequent decls as 'used' too, to maintain the AST invariant
that getPreviousDecl()->Used implies this->Used.

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

10 years agoMS ABI: Implement x86_64 RTTI
David Majnemer [Mon, 16 Jun 2014 18:46:51 +0000 (18:46 +0000)]
MS ABI: Implement x86_64 RTTI

Summary:
The RTTI scheme for x86_64 is largely the same as the one for i386.

Differences are largely limited to avoiding load-time relocations by
replacing pointers to RTTI metadata with the difference of that data
relative to the load address of the module.

Interestingly, this precludes the possibility of successfully using RTTI
data from another DLL.  The ImageBase reference is always relative to
the current DLL.

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

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

10 years agoObjective-C. Diagnose when property access is using declared
Fariborz Jahanian [Mon, 16 Jun 2014 17:25:41 +0000 (17:25 +0000)]
Objective-C. Diagnose when property access is using declared
property accessor methods which have become deprecated
or available. // rdar://15951801

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

10 years ago[C++1z] Implement N4051: 'typename' is permitted instead of 'class' when declaring...
Richard Smith [Mon, 16 Jun 2014 15:51:22 +0000 (15:51 +0000)]
[C++1z] Implement N4051: 'typename' is permitted instead of 'class' when declaring a template template parameter.

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

10 years agoAdd -std=c++1z flag for C++17 features.
Richard Smith [Mon, 16 Jun 2014 15:16:56 +0000 (15:16 +0000)]
Add -std=c++1z flag for C++17 features.

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

10 years agoFix typos
Alp Toker [Mon, 16 Jun 2014 14:23:44 +0000 (14:23 +0000)]
Fix typos

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

10 years agoUse the ShowInSystemHeader bit consistently for all diagnostics
Alp Toker [Mon, 16 Jun 2014 13:56:47 +0000 (13:56 +0000)]
Use the ShowInSystemHeader bit consistently for all diagnostics

By describing system header suppressions directly in tablegen we eliminate
special cases in getDiagnosticSeverity().

Dropping the reliance on builtin diagnostic classes when mapping also gets us
closer to the goal of reusing the diagnostic machinery for custom diagnostics.

No change in functionality.

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

10 years agoclang/AST/OpenMPClause.h: Update \param VL. [-Wdocumentation]
NAKAMURA Takumi [Mon, 16 Jun 2014 09:33:34 +0000 (09:33 +0000)]
clang/AST/OpenMPClause.h: Update \param VL. [-Wdocumentation]

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

10 years ago[OPENMP] Initial support of 'reduction' clause
Alexey Bataev [Mon, 16 Jun 2014 07:08:35 +0000 (07:08 +0000)]
[OPENMP] Initial support of 'reduction' clause

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

10 years agoHide the concept of diagnostic levels from lex, parse and sema
Alp Toker [Sun, 15 Jun 2014 23:30:39 +0000 (23:30 +0000)]
Hide the concept of diagnostic levels from lex, parse and sema

The compilation pipeline doesn't actually need to know about the high-level
concept of diagnostic mappings, and hiding the final computed level presents
several simplifications and other potential benefits.

The only exceptions are opportunistic checks to see whether expensive code
paths can be avoided for diagnostics that are guaranteed to be ignored at a
certain SourceLocation.

This commit formalizes that invariant by introducing and using
DiagnosticsEngine::isIgnored() in place of individual level checks throughout
lex, parse and sema.

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

10 years agotest: add missed file in previous commit
Saleem Abdulrasool [Sun, 15 Jun 2014 18:48:41 +0000 (18:48 +0000)]
test: add missed file in previous commit

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

10 years agoPreprocessor: improve ACLE 6.4.1, 6.4.2 support
Saleem Abdulrasool [Sun, 15 Jun 2014 18:35:07 +0000 (18:35 +0000)]
Preprocessor: improve ACLE 6.4.1, 6.4.2 support

This improves conformance with ACLE 6.4.1.  Define additional macros that
indicate support for the ARM and Thumb instruction set architecture.  This
includes the following set of macros:

  __ARM_ARCH
  __ARM_ARCH_ISA_ARM
  __ARM_ARCH_ISA_THUMB
  __ARM_32BIT_STATE

These help identify the environment that the code is intended to execute on.

Adjust the handling for ACLE 6.4.2 to be more correct.  We would define the
profile as a free-standing token rather than a quoted single character.

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

10 years agoOne of our buildbot for FreeBSD does not support std::to_string.
Sylvestre Ledru [Sat, 14 Jun 2014 09:28:27 +0000 (09:28 +0000)]
One of our buildbot for FreeBSD does not support std::to_string.
Use stringstream instead to convert int to string

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

10 years agoList the function/method name in the index page of scan-build
Sylvestre Ledru [Sat, 14 Jun 2014 08:49:40 +0000 (08:49 +0000)]
List the function/method name in the index page of scan-build

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

10 years agoWith the option '-analyzer-config stable-report-filename=true',
Sylvestre Ledru [Sat, 14 Jun 2014 08:45:32 +0000 (08:45 +0000)]
With the option '-analyzer-config stable-report-filename=true',
instead of report-XXXXXX.html, scan-build/clang analyzer generate
report-<filename>-<function, method name>-<function position>-<id>.html.
(id = i++ for several issues found in the same function/method)

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

10 years agoFix a crash in Retain Count checker error reporting
Anna Zaks [Fri, 13 Jun 2014 23:47:38 +0000 (23:47 +0000)]
Fix a crash in Retain Count checker error reporting

Fixes a crash in Retain Count checker error reporting logic by handing
the allocation statement retrieval from a BlockEdge program point.

Also added a simple CFG dump routine for debugging.

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

10 years agoDocument Darwin-specific defaults.
Adrian Prantl [Fri, 13 Jun 2014 23:35:54 +0000 (23:35 +0000)]
Document Darwin-specific defaults.

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

10 years agoA non-trivial array-fill expression isn't necessarily a CXXConstructExpr. It
Richard Smith [Fri, 13 Jun 2014 23:04:49 +0000 (23:04 +0000)]
A non-trivial array-fill expression isn't necessarily a CXXConstructExpr. It
could be an InitListExpr that runs constructors in C++11 onwards. Fixes a
recent regression (introduced in r210091).

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

10 years agoMake these two words equally bold.
Adrian Prantl [Fri, 13 Jun 2014 21:31:55 +0000 (21:31 +0000)]
Make these two words equally bold.

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

10 years agoCopy the documentation of -fstandalone-debug from the man page to the user
Adrian Prantl [Fri, 13 Jun 2014 21:12:31 +0000 (21:12 +0000)]
Copy the documentation of -fstandalone-debug from the man page to the user
manual.

rdar://problem/17307006

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

10 years agoAdd support for the /EP argument to clang-cl
Hans Wennborg [Fri, 13 Jun 2014 20:59:54 +0000 (20:59 +0000)]
Add support for the /EP argument to clang-cl

This maps the /EP argument to both -E and -P.

Patch by Ehsan Akhgari!

Differential Reviion: http://reviews.llvm.org/D4133

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

10 years agoFix test for release builds.
Tim Northover [Fri, 13 Jun 2014 20:00:38 +0000 (20:00 +0000)]
Fix test for release builds.

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

10 years agoAtomics: emit "cmpxchg weak" where possible
Tim Northover [Fri, 13 Jun 2014 19:43:04 +0000 (19:43 +0000)]
Atomics: emit "cmpxchg weak" where possible

Most builtins date from before the "cmpxchg weak" was a gleam in the
C++ committee's eye, so fortunately not much needs to change. But a
few of them *do* acknowledge that failure is possible.

For these, we'll emit the usual cartesian product of cmpxchg
operations if we can't statically determine weakness.  CodeGen can
sort it out later if the function gets inlined.

The only other non-trivial aspect of this is (I think) that we emit
the scalar expression for "IsWeak" once, at the beginning, and
propagate its value through the successive blocks. There's not much in
it, but it's slightly more consistent with the existing handling of
FailureOrder.

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

10 years ago[PPC64LE] Run some existing Altivec tests on powerpc64le as well
Bill Schmidt [Fri, 13 Jun 2014 18:30:06 +0000 (18:30 +0000)]
[PPC64LE] Run some existing Altivec tests on powerpc64le as well

There are several Altivec tests that formerly ran only on big-endian
targets (and in some cases only on 32-bit targets).  It is useful to
verify these on little-endian targets as well.

While testing these, I discovered a typo in <altivec.h>.  This is also
fixed by this patch.

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

10 years agoAdds a Pragma spelling for attributes to tablegen and makes use of it for loop
Tyler Nowicki [Fri, 13 Jun 2014 17:57:25 +0000 (17:57 +0000)]
Adds a Pragma spelling for attributes to tablegen and makes use of it for loop
hint attributes. Includes tests for pragma printing and for attribute order
which is incorrectly reversed by ParsedAttributes.

Reviewed by Aaron Ballman

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

10 years agoRemove top-level Clang -fsanitize= flags for optional ASan features.
Alexey Samsonov [Fri, 13 Jun 2014 17:53:44 +0000 (17:53 +0000)]
Remove top-level Clang -fsanitize= flags for optional ASan features.

Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.

The only problem I see is that users won't be able to disable extra
instrumentation for init-order and use-after-scope by a top-level Clang flag.
But this instrumentation was implicitly enabled for quite a while and
we didn't hear from users hurt by it.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Fri, 13 Jun 2014 17:20:50 +0000 (17:20 +0000)]
Update for llvm api change.

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

10 years agoFirst commit. Modified FIXME comment.
Tyler Nowicki [Fri, 13 Jun 2014 17:15:27 +0000 (17:15 +0000)]
First commit. Modified FIXME comment.

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

10 years agoIR-change: cmpxchg operations now return { iN, i1 }.
Tim Northover [Fri, 13 Jun 2014 14:24:59 +0000 (14:24 +0000)]
IR-change: cmpxchg operations now return { iN, i1 }.

This is a minimal fix for clang. I'll soon add support for generating
weak variants when requested, but that's not really necessary for the
LLVM change in isolation.

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

10 years agoTests: use CHECK-LABEL to help debugging failures
Tim Northover [Fri, 13 Jun 2014 14:24:48 +0000 (14:24 +0000)]
Tests: use CHECK-LABEL to help debugging failures

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

10 years agoDo not store duplicate parents when memoization data is available.
Samuel Benzaquen [Fri, 13 Jun 2014 13:31:40 +0000 (13:31 +0000)]
Do not store duplicate parents when memoization data is available.

Summary:
Do not store duplicate parents when memoization data is available.
This does not solve the duplication problem, but ameliorates it.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

10 years agoclang-format: [JS] Understand named function literals.
Daniel Jasper [Fri, 13 Jun 2014 07:02:04 +0000 (07:02 +0000)]
clang-format: [JS] Understand named function literals.

Before:
  return {a: function SomeFunction(){// ...
                                     return 1;
  }
  }
  ;

After:
  return {
    a: function SomeFunction() {
      // ...
      return 1;
    }
  };

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

10 years agoMS ABI: Fix inheritance model calculation in CRTP
David Majnemer [Fri, 13 Jun 2014 06:43:46 +0000 (06:43 +0000)]
MS ABI: Fix inheritance model calculation in CRTP

CRTP-like patterns involve a class which inherits from another class
using itself as a template parameter.

However, the base class itself may try to create a pointer-to-member
which involves the derived class.  This is problematic because we
may not have finished parsing the most derived classes' base specifiers
yet.

It turns out that MSVC simply uses the unspecified inheritance model
instead of doing anything fancy.

This fixes PR19987.

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

10 years agoMissed a space at the end of the line.
Brad Smith [Fri, 13 Jun 2014 03:53:07 +0000 (03:53 +0000)]
Missed a space at the end of the line.

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

10 years agoUse dwarf-2 by default on OpenBSD and FreeBSD.
Brad Smith [Fri, 13 Jun 2014 03:35:37 +0000 (03:35 +0000)]
Use dwarf-2 by default on OpenBSD and FreeBSD.

The Tools.cpp part of the patch partially based on a patch from
FreeBSD's LLVM tree.

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

10 years agoExtend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag...
Richard Smith [Fri, 13 Jun 2014 02:24:47 +0000 (02:24 +0000)]
Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.

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

10 years agoRecover from missing 'typename' in sizeof(T::InnerType)
Reid Kleckner [Thu, 12 Jun 2014 23:03:48 +0000 (23:03 +0000)]
Recover from missing 'typename' in sizeof(T::InnerType)

Summary:
'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression.  This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type.  If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.

This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang.  Please try it and
file bugs!

Reviewers: rsmith

Subscribers: cfe-commits

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

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

10 years agoRemove stale part of comment.
Eli Bendersky [Thu, 12 Jun 2014 22:47:08 +0000 (22:47 +0000)]
Remove stale part of comment.

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

10 years agoCheck the access of operator delete from the destructor context
Reid Kleckner [Thu, 12 Jun 2014 22:39:12 +0000 (22:39 +0000)]
Check the access of operator delete from the destructor context

Previously we would do the access check from the context of
MarkVTableUsed.

Also update this test to C++11, since that is typically used with the MS
C++ ABI.

Fixes PR20005.

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

10 years agoThe Clang C API does not require C++. Thanks to Jordan Rose for pointing out this...
Richard Smith [Thu, 12 Jun 2014 22:09:11 +0000 (22:09 +0000)]
The Clang C API does not require C++. Thanks to Jordan Rose for pointing out this error!

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

10 years agos/pr2007/20007/ in a test
Reid Kleckner [Thu, 12 Jun 2014 21:46:38 +0000 (21:46 +0000)]
s/pr2007/20007/ in a test

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

10 years agoPrefix another use of error_code.
Rafael Espindola [Thu, 12 Jun 2014 21:36:35 +0000 (21:36 +0000)]
Prefix another use of error_code.

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

10 years agoTweak documentation.
Nico Weber [Thu, 12 Jun 2014 21:15:10 +0000 (21:15 +0000)]
Tweak documentation.

1. Having "get started", "get involved", and "hacking" makes it hard to find
   how to send patches, so add a link from "get involved" to "hacking".
2. Remove an almost 5 year old note on the test running meachanism changing
   soon.
3. Let "hacking" link to the LLVM developer policy.

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

10 years agoObjective-C ARC. Blocks that strongly capture themselves
Fariborz Jahanian [Thu, 12 Jun 2014 20:57:14 +0000 (20:57 +0000)]
Objective-C ARC. Blocks that strongly capture themselves
to call themselves will get the warning:
"Capturing <itself> strongly in this block is likely to
lead to a retain cycle". Cut down on the amount of noise
by noticing that user at some point sets the captured variable
to null in order to release it (and break the cycle).
// rdar://16944538

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

10 years agoRefer to error_code with the std prefix.
Rafael Espindola [Thu, 12 Jun 2014 20:37:59 +0000 (20:37 +0000)]
Refer to error_code with the std prefix.

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

10 years agoMS ABI: Fix forming pointers to members of a base class
Reid Kleckner [Thu, 12 Jun 2014 19:49:17 +0000 (19:49 +0000)]
MS ABI: Fix forming pointers to members of a base class

Previously we would calculate the inheritance model of a class when
requiring a pointer to member type of that class to be complete.  The
inheritance model is used to figure out how many fields are used by the
member pointer.

However, once we require a pointer to member of a derived class type to
be complete, we can form pointers to members of bases without
calculating the inheritance model for those bases.  This was causing
crashes on this simple test case:

  struct A {
    void f();
    void f(int);
  };
  struct B : public A {};
  void g() { void (B::*a)() = &B::f; }

Now we calculate the inheritance models of all base classes when
completing a member pointer type.

Fixes PR2007.

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

10 years agoPermit -Wswitch coverage for enumerations.
Saleem Abdulrasool [Thu, 12 Jun 2014 19:33:26 +0000 (19:33 +0000)]
Permit -Wswitch coverage for enumerations.

Thanks to David Blakie and Richard Smith for pointing out that we can retain the
-Wswitch coverage while avoiding the warning from GCC by pushing the unreachable
outside of the switch!

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

10 years agoBasic: fix warnings from GCC
Saleem Abdulrasool [Thu, 12 Jun 2014 17:43:37 +0000 (17:43 +0000)]
Basic: fix warnings from GCC

tools/clang/lib/Basic/DiagnosticIDs.cpp: In function ‘clang::DiagnosticIDs::Level toLevel(clang::diag::Severity)’:
tools/clang/lib/Basic/DiagnosticIDs.cpp:382:1: warning: control reaches end of non-void function [-Wreturn-type]

tools/clang/lib/Format/Format.cpp: In member function ‘virtual std::string clang::format::ParseErrorCategory::message(int) const’:
tools/clang/lib/Format/Format.cpp:282:1: warning: control reaches end of non-void function [-Wreturn-type]

Add a default cases that asserts that we handle the severity, parse error.

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

10 years agoInclude system_error directly.
Rafael Espindola [Thu, 12 Jun 2014 17:19:42 +0000 (17:19 +0000)]
Include system_error directly.

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

10 years agoMore tests for // rdar://17259812
Fariborz Jahanian [Thu, 12 Jun 2014 16:55:43 +0000 (16:55 +0000)]
More tests for // rdar://17259812

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

10 years agoObjective-C. Use isObjCRetainableType in my last
Fariborz Jahanian [Thu, 12 Jun 2014 16:12:30 +0000 (16:12 +0000)]
Objective-C. Use isObjCRetainableType in my last
patch. NFC.

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

10 years agoExplicitly initialize all fields to avoid -Wmissing-field-initializers warning.
Eli Bendersky [Thu, 12 Jun 2014 15:47:57 +0000 (15:47 +0000)]
Explicitly initialize all fields to avoid -Wmissing-field-initializers warning.

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

10 years agoReplace llvm::error_code with std::error_code.
Rafael Espindola [Thu, 12 Jun 2014 14:02:15 +0000 (14:02 +0000)]
Replace llvm::error_code with std::error_code.

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