]> granicus.if.org Git - clang/log
clang
8 years agoUse std::is_sorted instead of a manual loop. NFC
Craig Topper [Sun, 3 Jan 2016 19:43:20 +0000 (19:43 +0000)]
Use std::is_sorted instead of a manual loop. NFC

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

8 years ago[PGO] Cleanup: Use covmap header definition in the template file
Xinliang David Li [Sun, 3 Jan 2016 19:25:54 +0000 (19:25 +0000)]
[PGO] Cleanup: Use covmap header definition in the template file

This is one last remaining instrumentatation related structure
that needs to be migrate to use the centralized template
definition.  With this change, instrumentation code
related to coverage module header will be kept in sync
with the coverage mapping reader. The remaining code
which makes implicit assumption about covmap control
structure layout in the the lowering pass will cleaned
up in a different patch. This patch is not intended to
have no functional change.

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

8 years agoFix several accidental DOS line endings in source files
Dimitry Andric [Sun, 3 Jan 2016 15:55:40 +0000 (15:55 +0000)]
Fix several accidental DOS line endings in source files

Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings.

There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.

Reviewers: joerg, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

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

8 years agoReimplement __readeflags and __writeeflags on top of intrinsics
David Majnemer [Fri, 1 Jan 2016 06:50:08 +0000 (06:50 +0000)]
Reimplement __readeflags and __writeeflags on top of intrinsics

Lean on LLVM to provide this functionality now that it provides the
necessary intrinsics.

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

8 years ago[TrailingObjects] Fix "Convert classes in OpenMPClause.h" for MSVC
James Y Knight [Fri, 1 Jan 2016 01:12:48 +0000 (01:12 +0000)]
[TrailingObjects] Fix "Convert classes in OpenMPClause.h" for MSVC

"friend class OMPVarListClause" -> "friend OMPVarListClause".  It's a
template, not a class.

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

8 years ago[TrailingObjects] Convert classes in OpenMPClause.h
James Y Knight [Fri, 1 Jan 2016 00:38:24 +0000 (00:38 +0000)]
[TrailingObjects] Convert classes in OpenMPClause.h

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

8 years ago[X86][PKU] add clang intrinsic for {RD|WR}PKRU
Asaf Badouh [Thu, 31 Dec 2015 14:14:07 +0000 (14:14 +0000)]
[X86][PKU] add clang intrinsic for {RD|WR}PKRU

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

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

8 years ago[OPENMP 4.5] Codegen for 'schedule' clause with monotonic/nonmonotonic modifiers.
Alexey Bataev [Thu, 31 Dec 2015 06:52:34 +0000 (06:52 +0000)]
[OPENMP 4.5] Codegen for 'schedule' clause with monotonic/nonmonotonic modifiers.
OpenMP 4.5 adds support for monotonic/nonmonotonic modifiers in 'schedule' clause. Add codegen for these modifiers.

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

8 years ago[TrailingObjects] Fix bug in "Convert classes in ExprObjC.h"
James Y Knight [Thu, 31 Dec 2015 06:01:19 +0000 (06:01 +0000)]
[TrailingObjects] Fix bug in "Convert classes in ExprObjC.h"

(Detected by asan)

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

8 years ago[MS ABI] Remove mangleCXXCatchHandlerType
David Majnemer [Thu, 31 Dec 2015 05:36:54 +0000 (05:36 +0000)]
[MS ABI] Remove mangleCXXCatchHandlerType

It's dead code, no functional change is intended.

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

8 years ago[MS ABI] Change the ArgBackRefMap to hold const qualified pointers
David Majnemer [Thu, 31 Dec 2015 05:36:52 +0000 (05:36 +0000)]
[MS ABI] Change the ArgBackRefMap to hold const qualified pointers

Just a cleanup, no functional change is intended.

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

8 years ago[MS ABI] Replace dead code with an assertion
David Majnemer [Thu, 31 Dec 2015 05:36:50 +0000 (05:36 +0000)]
[MS ABI] Replace dead code with an assertion

As per C++ [dcl.ref]p1, cv-qualified references are not valid. As such,
change the mangler to assert that this event does not happen.

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

8 years ago[MSVC Compat] Diagnose multiple default ctors for dllexport'd classes
David Majnemer [Thu, 31 Dec 2015 05:36:46 +0000 (05:36 +0000)]
[MSVC Compat] Diagnose multiple default ctors for dllexport'd classes

The MS ABI emits a special default constructor closure thunk if a
default constructor has a weird calling convention or default arguments.

The MS ABI has a quirk: there can be only one such thunk because the
mangling scheme does not have room for distinct manglings.  We must
raise a diagnostic in this eventuality.

N.B.  MSVC sorta gets this right.  Multiple default constructors result
in the default constructor closure getting emitted but they seem to
get confused by which default constructors are reasonable to reference
from the closure.  We try to be a little more careful which results in
mild differences in behavior.

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

8 years ago[TrailingObjects] Convert classes in ExprObjC.h
James Y Knight [Thu, 31 Dec 2015 04:43:19 +0000 (04:43 +0000)]
[TrailingObjects] Convert classes in ExprObjC.h

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

8 years ago[TrailingObjects] Convert remaining classes in Expr.h and ExprCXX.h
James Y Knight [Thu, 31 Dec 2015 04:18:25 +0000 (04:18 +0000)]
[TrailingObjects] Convert remaining classes in Expr.h and ExprCXX.h

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

8 years agoImprove diagnostic for the case where a function template candidate is rejected
Richard Smith [Thu, 31 Dec 2015 02:02:54 +0000 (02:02 +0000)]
Improve diagnostic for the case where a function template candidate is rejected
by overload resolution because deduction succeeds, but the substituted
parameter type for some parameter (with deduced type) doesn't exactly match the
corresponding adjusted argument type.

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

8 years agoImplement [temp.deduct.type]p6: if the nested-name-specifier of a type is
Richard Smith [Wed, 30 Dec 2015 20:56:05 +0000 (20:56 +0000)]
Implement [temp.deduct.type]p6: if the nested-name-specifier of a type is
dependent, the type is a non-deduced context.

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

8 years agoSilencing a -Wcast-qual warning; NFC.
Aaron Ballman [Wed, 30 Dec 2015 16:02:17 +0000 (16:02 +0000)]
Silencing a -Wcast-qual warning; NFC.

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

8 years agoWhen performing an implicit from float to bool, the floating point value must be...
Aaron Ballman [Wed, 30 Dec 2015 14:26:07 +0000 (14:26 +0000)]
When performing an implicit from float to bool, the floating point value must be *exactly* zero in order for the conversion to result in 0. This does not involve a conversion through an integer value, and so truncation of the value is not performed.

This patch address PR25876.

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

8 years agoDisable generating movt on FreeBSD.
Davide Italiano [Wed, 30 Dec 2015 13:53:25 +0000 (13:53 +0000)]
Disable generating movt on FreeBSD.

It's sort of an hack, but we have no choice.
The linker in the base system doesn't handle that correctly (yet).
Once FreeBSD will import lld, this can be backed out.

Patch by: Andrew Turner!

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

8 years agoclang-format: Slightly row back on r256343 by increasing penalty for
Daniel Jasper [Wed, 30 Dec 2015 12:23:00 +0000 (12:23 +0000)]
clang-format: Slightly row back on r256343 by increasing penalty for
breaking between array subscripts.

Before:
  if (aaaaaaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaa]
                                                     [aaaaaaaaaaaaa])
After:
  if (aaaaaaaaaaaaaaaaaaaaaaaa &&
      aaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaa][aaaaaaaaaaaaa])

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

8 years ago[OPENMP 4.5] Allow 'ordered' clause on 'loop simd' constructs.
Alexey Bataev [Wed, 30 Dec 2015 12:06:23 +0000 (12:06 +0000)]
[OPENMP 4.5] Allow 'ordered' clause on 'loop simd' constructs.
OpenMP 4.5 allows to use 'ordered' clause without parameter on 'loop simd' constructs.

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

8 years agoclang-format: [JS] Support TypeScript 1.6 user defined type guards.
Daniel Jasper [Wed, 30 Dec 2015 08:00:58 +0000 (08:00 +0000)]
clang-format: [JS] Support TypeScript 1.6 user defined type guards.

Before:
  function foo(check: Object): check
  is{foo: string, bar: string, baz: string, foobar: string} {
    return 'bar' in check;
  }

After:
  function foo(check: Object):
      check is {foo: string, bar: string, baz: string, foobar: string} {
    return 'bar' in check;
  }

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

8 years ago[ptr-traits] Add another complete type that is necessary for at least
Chandler Carruth [Wed, 30 Dec 2015 06:38:29 +0000 (06:38 +0000)]
[ptr-traits] Add another complete type that is necessary for at least
some of the build bots. Still can't reproduce these failures locally.

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

8 years ago[ptr-traits] Some compilers (older Clang? unsure) on build bots need
Chandler Carruth [Wed, 30 Dec 2015 06:21:02 +0000 (06:21 +0000)]
[ptr-traits] Some compilers (older Clang? unsure) on build bots need
this constructor to be out of line in order to not require the complete
type of TemplateDecl.

Hopefully this will fix the build bots.

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

8 years ago[MS ABI] Add variable templates to the NameBackReferences
David Majnemer [Wed, 30 Dec 2015 05:40:32 +0000 (05:40 +0000)]
[MS ABI] Add variable templates to the NameBackReferences

Only function template specializations are exempt from being added to
the NameBackReferences.  Redundant variable template specializations
should be appropriately substituted.

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

8 years ago[MS ABI] Improve our mangling of pass_object_size
David Majnemer [Wed, 30 Dec 2015 05:13:03 +0000 (05:13 +0000)]
[MS ABI] Improve our mangling of pass_object_size

We didn't add the artificial pass_object_size arguments to the
backreference map which bloated the size of manglings which involved
pass_object_size with duplicate types.

This lets us go from:
?qux@PassObjectSize@@YAHQAHW4__pass_object_size1@__clang@@0W4__pass_object_size1@3@@Z

to:
?qux@PassObjectSize@@YAHQAHW4__pass_object_size1@__clang@@01@Z

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

8 years agoFix alignment issue in CodeGenFunction::PopCleanupBlock.
James Y Knight [Wed, 30 Dec 2015 03:58:33 +0000 (03:58 +0000)]
Fix alignment issue in CodeGenFunction::PopCleanupBlock.

It was copying an EHCleanupStack::Cleanup object into a
SmallVector<char>, with a comment saying that SmallVector's alignment is
always large enough. Unfortunately, that isn't actually true after
r162331 in 2012.

Expand the code (somewhat distastefully) to get a stack allocation with
a correct alignment.

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

8 years ago[ptr-traits] Add #includes of headers rather than forward declarations
Chandler Carruth [Wed, 30 Dec 2015 03:40:23 +0000 (03:40 +0000)]
[ptr-traits] Add #includes of headers rather than forward declarations
for types which are used as pointees in PointerUnions, PointerIntPairs,
and DenseMap pointer keys.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

I think this is the last patch for getting Clang clean here!!!

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

8 years ago[ptr-traits] Move a class definition up to the top of this header so it
Chandler Carruth [Wed, 30 Dec 2015 03:33:22 +0000 (03:33 +0000)]
[ptr-traits] Move a class definition up to the top of this header so it
can be referenced as part of a PointerIntPair.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Move methods manipulating PointerUnions, DenseMap pointer
Chandler Carruth [Wed, 30 Dec 2015 03:24:14 +0000 (03:24 +0000)]
[ptr-traits] Move methods manipulating PointerUnions, DenseMap pointer
keys, and PointerIntPairs where the pointee types are incomplete
out-of-line to where we have the complete type.

This is the standard pattern used throughout the AST library to address
the inherently mutually cross referenced nature of the AST.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Switch the Redeclarable template to using a void pointer in
Chandler Carruth [Wed, 30 Dec 2015 03:09:25 +0000 (03:09 +0000)]
[ptr-traits] Switch the Redeclarable template to using a void pointer in
its PointerUnion rather than an ASTContext pointer.

Using pointers with PointerUnion really should be checking the pointee
type's alignment, and we can't do this without the complete type. The
Redeclarable template inherently can't know the complete type of
ASTContext because of its layering, and because it is a template its
methods can't reasonably be out-of-line the way we traditionally solve
circular references within the AST library.

After discussing this with Richard Smith, his suggestion which I have
implemented here was to just drop to a void* for the PointerUnion. This
essentially documents that we're going to completely ignore the type
(including its potential alignment consequences) for this code. There
are still of course dynamic guards that this ended up working correctly,
and because of the way the code is factored this doesn't leak outside of
the very narrow implementation guts of Redeclarable.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Switch from a really wasteful SmallDenseMap of
Chandler Carruth [Wed, 30 Dec 2015 03:00:23 +0000 (03:00 +0000)]
[ptr-traits] Switch from a really wasteful SmallDenseMap of
SmallVector<.., 16> (16!!!!) objects to a simple SmallVector of pairs.

This no longer de-duplicates the common function pointers used during
deallocation, but this doesn't really seem worth the complexity and
overhead of managing the map-of-vectors. Notably, there is no reason to
assume that functions have the 4-byte alignment that DenseMap relies on,
and indeed this prevents checking the alignment of the DenseMap keys
because we can't even meaningfully query the alignment of functions
using our existing alignment tools.

Generally, function pointers don't seem like a great idea for keys in
a DenseMap. =]

I chatted with Richard Smith about this a bit as well and have written
down a FIXME because this *does* waste some memory and in general seems
a very clumsy memory management strategy. He would like to see a more
fundamental fix eventually here that tries to build a better pattern.

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

8 years ago[ptr-traits] Stop using two bogus types as stand-ins for flags
Chandler Carruth [Wed, 30 Dec 2015 02:51:00 +0000 (02:51 +0000)]
[ptr-traits] Stop using two bogus types as stand-ins for flags
indicating the nature of the default argument in a ParmVarDecl.

Instead, this adds a proper enum stored exclusively in the ParmVarDecl
bits (which we have plenty of) for this. This even allows us to track
a previously unrepresented state in Clang when we parse a function
declaration with a default argument on a parameter but we cannot even
form an invalid expression node (for example, it is an invalid token).
Now, we can model this state in the AST at least, and potentially
improve recovery in this area in the future.

I've also cleaned up the functions managing both variable initializer
expressions and parameter default argument expresssions as much as
possible. I've left some comments about further improvements based on
a discussion with Richard Smith. Lots of credit to him for walking me
through exactly which of the *many* tradeoffs here he felt was the best
fit.

Should be NFC for now. I've tried my best to preserve existing behavior.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[TrailingObjects] Convert CastExpr and subclasses.
James Y Knight [Wed, 30 Dec 2015 02:27:28 +0000 (02:27 +0000)]
[TrailingObjects] Convert CastExpr and subclasses.

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

8 years agoClean up this code, NFC.
Richard Smith [Wed, 30 Dec 2015 01:06:52 +0000 (01:06 +0000)]
Clean up this code, NFC.

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

8 years ago[analyzer] Handle another Android assert function.
Devin Coughlin [Wed, 30 Dec 2015 00:08:59 +0000 (00:08 +0000)]
[analyzer] Handle another Android assert function.

Android's assert can call both the __assert and __assert2 functions under the cover, but
the NoReturnFunctionChecker does not handle the latter. This commit fixes that.

A patch by Yury Gribov!

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

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

8 years ago[analyzer] Suppress nullability warning for _Nonnull locals zero-initialized by ObjC...
Devin Coughlin [Tue, 29 Dec 2015 23:44:19 +0000 (23:44 +0000)]
[analyzer] Suppress nullability warning for _Nonnull locals zero-initialized by ObjC ARC.

Prevent the analyzer from warning when a _Nonnnull local variable is implicitly
zero-initialized because of Objective-C automated reference counting. This avoids false
positives in cases where a _Nonnull local variable cannot be initialized with an
initialization expression, such as:
  NSString * _Nonnull s; // no-warning
  @autoreleasepool {
    s = ...;
  }

The nullability checker will still warn when a _Nonnull local variable is explicitly
initialized with nil.

This suppression introduces the potential for false negatives if the local variable
is used before it is assigned a _Nonnull value. Based on a discussion with Anna Zaks,
Jordan Rose, and John McCall, I've added a FIXME to treat implicitly zero-initialized
_Nonnull locals as uninitialized in Sema's UninitializedValues analysis to avoid these
false negatives.

rdar://problem/23522311

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

8 years agoWhen a namespace alias redeclares a using declaration, point the diagnostic at
Richard Smith [Tue, 29 Dec 2015 23:42:34 +0000 (23:42 +0000)]
When a namespace alias redeclares a using declaration, point the diagnostic at
the using declaration not at the thing it's using.

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

8 years agoModel NamespaceAliasDecls as having their nominated namespace as an underlying
Richard Smith [Tue, 29 Dec 2015 23:34:32 +0000 (23:34 +0000)]
Model NamespaceAliasDecls as having their nominated namespace as an underlying
declaration. This fixes an issue where we would reject (due to a claimed
ambiguity) a case where lookup finds multiple NamespaceAliasDecls from
different scopes that nominate the same namespace.

The C++ standard doesn't make it clear that such a case is in fact valid (which
I'm working on fixing), but there are no relevant rules that distinguish using
declarations and namespace alias declarations here, so it makes sense to treat
them the same way.

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

8 years agoAddress review comment on r256595
Nico Weber [Tue, 29 Dec 2015 23:30:42 +0000 (23:30 +0000)]
Address review comment on r256595

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

8 years agoFix test from r256596
Nico Weber [Tue, 29 Dec 2015 23:23:38 +0000 (23:23 +0000)]
Fix test from r256596

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

8 years agoEmit a -Wmicrosoft warning when treating ^Z as EOF in MS mode.
Nico Weber [Tue, 29 Dec 2015 23:17:27 +0000 (23:17 +0000)]
Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode.

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

8 years agoEmit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.
Nico Weber [Tue, 29 Dec 2015 23:06:17 +0000 (23:06 +0000)]
Emit a -Wmicrosoft warning when pasting /##/ into a comment token in MS mode.

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

8 years ago[TrailingObjects] Convert OffsetOfExpr.
James Y Knight [Tue, 29 Dec 2015 22:31:18 +0000 (22:31 +0000)]
[TrailingObjects] Convert OffsetOfExpr.

That necessitated moving the OffsetOfNode class out of OffsetOfExpr.

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

8 years ago[MS ABI] Invent a mangling for reference temporaries
David Majnemer [Tue, 29 Dec 2015 22:25:14 +0000 (22:25 +0000)]
[MS ABI] Invent a mangling for reference temporaries

MSVC is non-conforming and doesn't have a mangling for these.  Invent
our own to unblock folks using clang.

This fixes PR25795.

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

8 years agoUse consistent types for all bit-field members in the same bit-field so that MSVC...
Richard Smith [Tue, 29 Dec 2015 22:19:20 +0000 (22:19 +0000)]
Use consistent types for all bit-field members in the same bit-field so that MSVC's bit-field packing algorithm packs them properly.

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

8 years ago[TrailingObjects] Convert Decl* classes.
James Y Knight [Tue, 29 Dec 2015 22:13:13 +0000 (22:13 +0000)]
[TrailingObjects] Convert Decl* classes.

Also remove now-redundant explicit alignment specification on some of
the classes converted prior to TrailingObjects automatically ensuring
proper alignment.

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

8 years ago[MS ABI] Add a mangling for _Complex
David Majnemer [Tue, 29 Dec 2015 22:02:15 +0000 (22:02 +0000)]
[MS ABI] Add a mangling for _Complex

MSVC doesn't implement a mangling for C99's _Complex so we must invent
our own.

For now, treating it like a class type called _Complex in the __clang
namespace.

This means that 'void f(__Complex int))'
will demangle as: 'void f(struct __clang::_Complex<int>)'

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

8 years ago[MS ABI] Mark an unreachable path appropriately
David Majnemer [Tue, 29 Dec 2015 22:02:10 +0000 (22:02 +0000)]
[MS ABI] Mark an unreachable path appropriately

No functional change is intended, just a small cleanup.

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

8 years agofix typos; NFC
Sanjay Patel [Tue, 29 Dec 2015 20:09:37 +0000 (20:09 +0000)]
fix typos; NFC

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

8 years agoTeach typo correction to properly handle mapping declarations to their
Richard Smith [Tue, 29 Dec 2015 19:43:10 +0000 (19:43 +0000)]
Teach typo correction to properly handle mapping declarations to their
underlying decls. Preserve the found declaration throughout, and only map to
the underlying declaration when we want to check whether it's the right kind.
This allows us to provide the right source location for the found declaration,
and prepares for the possibility of underlying decls with a different name
from the found decl.

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

8 years ago[TrailingObjects] Convert AST classes that had a ASTTemplateKWAndArgsInfo.
James Y Knight [Tue, 29 Dec 2015 18:15:14 +0000 (18:15 +0000)]
[TrailingObjects] Convert AST classes that had a ASTTemplateKWAndArgsInfo.

So, also:

- Moved the TemplateArgumentLoc array out of the
  ASTTemplateKWAndArgsInfo class (making it a simple fixed-size object),
  to avoid needing to have a variable-length object as part of a
  variable-length object. Now the objects that have a
  ASTTemplateKWAndArgsInfo also have some TemplateArgumentLoc objects
  appended directly.

- Removed some internal-use accessors which became simply a wrapper on
  getTrailingObjects.

- Moved MemberNameQualifier out of the MemberExpr class, renamed it
  MemberExprNameQualifier, because the template can't
  refer to a class nested within the class it's defining.

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

8 years ago[analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning...
Devin Coughlin [Tue, 29 Dec 2015 17:40:49 +0000 (17:40 +0000)]
[analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning nil.

The nullability checker currently allows casts to suppress warnings when a nil
literal is passed as an argument to a parameter annotated as _Nonnull:

  foo((NSString * _Nonnull)nil); // no-warning

It does so by suppressing the diagnostic when the *type* of the argument expression
is _Nonnull -- even when the symbolic value returned is known to be nil.

This commit updates the nullability checker to similarly honor such casts in the analogous
scenario when nil is returned from a function with a _Nonnull return type:

  return (NSString * _Nonnull)nil; // no-warning

This commit also normalizes variable naming between the parameter and return cases and
adds several tests demonstrating the limitations of this suppression mechanism (such as
when nil is cast to _Nonnull and then stored into a local variable without a nullability
qualifier). These tests are marked with FIXMEs.

rdar://problem/23176782

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

8 years ago[TrailingObjects] Use a different technique to determine if a getDecl
James Y Knight [Tue, 29 Dec 2015 16:44:11 +0000 (16:44 +0000)]
[TrailingObjects] Use a different technique to determine if a getDecl
member function exists on a class.

The previous trick depended on inheriting from the class it was
checking, which will fail when I start marking things 'final'.

Attempt #2: now with a special #ifdef branch for MSVC.

Hopefully *this* actually builds with all supported compilers...

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

8 years ago[MS ABI] Implement a mangling for _Atomic types
David Majnemer [Tue, 29 Dec 2015 11:46:00 +0000 (11:46 +0000)]
[MS ABI] Implement a mangling for _Atomic types

MSVC doesn't implement a mangling for C11's _Atomic so we must invent
our own.

For now, treating it like a class type called _Atomic in the __clang
namespace.

This means that 'void f(__Atomic(int))'
will demangle as: 'void f(struct __clang::_Atomic<int>)'

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

8 years ago[MS ABI] Cleanup our mangling of vector types
David Majnemer [Tue, 29 Dec 2015 11:45:58 +0000 (11:45 +0000)]
[MS ABI] Cleanup our mangling of vector types

We used to produce a type which demangled to:
union __clang_vec8_F

That 'F' is the mangling for 'short' but it is present in the mangled
name in an inappropriate place, leading to it not getting demangled.

Instead, create a synthetic class type in a synthetic namespace called
__clang. With this, it now demangles to:
union __clang::__vector<short,8>

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

8 years ago[MS ABI] Cleanup the mangling of artifical types
David Majnemer [Tue, 29 Dec 2015 11:45:53 +0000 (11:45 +0000)]
[MS ABI] Cleanup the mangling of artifical types

Hand-rolling the mangling results in us not correctly adding names to
the backreference map.

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

8 years agoclang-format: [JS/TypeScript] Support "enum" as property name.
Daniel Jasper [Tue, 29 Dec 2015 08:54:23 +0000 (08:54 +0000)]
clang-format: [JS/TypeScript] Support "enum" as property name.

Before:
  enum: string
  [];

After:
  enum: string[];

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

8 years ago[ms inline asm] Add support for label names with '$' chars
Marina Yatsina [Tue, 29 Dec 2015 08:49:34 +0000 (08:49 +0000)]
[ms inline asm] Add support for label names with '$' chars

In MS inline asm syntax a label with '$' char produces an error, while in AT&T it does not.
In AT&T inline asm syntax Clang escapes the '$' char and replaces it with "$$". Adopted same approach for MS syntax.

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

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

8 years agoRevert "[TrailingObjects] Use a different technique to determine if a getDecl"
James Y Knight [Tue, 29 Dec 2015 04:46:43 +0000 (04:46 +0000)]
Revert "[TrailingObjects] Use a different technique to determine if a getDecl"

This reverts commit r256534.

Failed to build on MSVC with error:
clang/ASTMatchers/ASTMatchersInternal.h(572): error C2228: left of '.getDecl' must have class/struct/union
        type is 'add_rvalue_reference<_Ty>::type'

(http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/13873/steps/build/logs/stdio)

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

8 years ago[TrailingObjects] Use a different technique to determine if a getDecl
James Y Knight [Tue, 29 Dec 2015 04:34:11 +0000 (04:34 +0000)]
[TrailingObjects] Use a different technique to determine if a getDecl
member function exists on a class.

The previous trick depended on inheriting from the class it was
checking, which will fail when I start marking things 'final'.

Hopefully this actually builds with all supported compilers...

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

8 years agoRevert r93378, which is incorrect but currently unobservable (because the
Richard Smith [Tue, 29 Dec 2015 01:02:53 +0000 (01:02 +0000)]
Revert r93378, which is incorrect but currently unobservable (because the
underlying declaration of a NamedDecl happens to always have the same name
and identifier namespace as the decl itself today).

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

8 years agoFix up a comment and a bit of trailing whitespace.
Eric Christopher [Mon, 28 Dec 2015 21:57:05 +0000 (21:57 +0000)]
Fix up a comment and a bit of trailing whitespace.

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

8 years agoSmall refactoring in CheckerContext::isCLibraryFunction(). NFC.
Devin Coughlin [Mon, 28 Dec 2015 21:47:51 +0000 (21:47 +0000)]
Small refactoring in CheckerContext::isCLibraryFunction(). NFC.

Use getRedeclContext() instead of a manually-written loop and fix a comment.

A patch by Aleksei Sidorin!

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

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

8 years agoWe check for dwarf 5 in the backend, so go ahead and pass it along via
Eric Christopher [Mon, 28 Dec 2015 19:58:44 +0000 (19:58 +0000)]
We check for dwarf 5 in the backend, so go ahead and pass it along via
the front end as well.

Note that DWARF5 isn't finalized and any feature support is subject to
change and accepting of the option doesn't mean we're supporting the
full range of the current standard.

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

8 years agoDo not crash if class is defined in wrong scope.
Serge Pavlov [Mon, 28 Dec 2015 19:40:14 +0000 (19:40 +0000)]
Do not crash if class is defined in wrong scope.

This patch fixes PR16677. The latter represents the case when due to
misprinted character class definition occurs in the scope of template
arguments. Base class of this class depends on the template parameter in the
same scope and cannot be resolved, it causes crash. Right behavior is to
make semantic processing even if the definition is wrong, as the code
that emits appropriate message is called after the processing.

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

8 years agoComment and reorganize some of the target feature option sets.
Eric Christopher [Mon, 28 Dec 2015 19:07:48 +0000 (19:07 +0000)]
Comment and reorganize some of the target feature option sets.

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

8 years agoFix up comment in header.
Eric Christopher [Mon, 28 Dec 2015 19:07:46 +0000 (19:07 +0000)]
Fix up comment in header.

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

8 years agoAvoid crash when dumping LocInfoType.
Serge Pavlov [Mon, 28 Dec 2015 17:19:12 +0000 (17:19 +0000)]
Avoid crash when dumping LocInfoType.

LocInfoType is a helper type used internally inside Sema and Parser, it
does not exist in valid AST. LocInfoType uses code value outside the
range of valid Type codes, as a result, dumping such type causes error.
The fix allows correct dumping LocInfoType.

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

8 years agoSilence enumeral and non-enumeral type in conditional expression warning; NFC.
Aaron Ballman [Mon, 28 Dec 2015 15:52:46 +0000 (15:52 +0000)]
Silence enumeral and non-enumeral type in conditional expression warning; NFC.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Lex
Alexander Kornienko [Mon, 28 Dec 2015 15:30:42 +0000 (15:30 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Lex

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: dblaikie

Subscribers: dblaikie, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in tools/libclang
Alexander Kornienko [Mon, 28 Dec 2015 15:24:08 +0000 (15:24 +0000)]
Refactor: Simplify boolean conditional return statements in tools/libclang

Summary: Use clang-tidy to simplify boolean conditional return statements.

Reviewers: alexfh

Subscribers: alexfh, chfast, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend
Alexander Kornienko [Mon, 28 Dec 2015 15:19:39 +0000 (15:19 +0000)]
Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: dcoughlin, alexfh

Subscribers: alexfh, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Frontend
Alexander Kornienko [Mon, 28 Dec 2015 15:15:16 +0000 (15:15 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Frontend

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: alexfh

Subscribers: alexfh, cfe-commits

Patch by Richard Thomson!

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

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

8 years ago[X86] Better support for the MCU psABI (clang part)
Michael Kuperstein [Mon, 28 Dec 2015 14:39:54 +0000 (14:39 +0000)]
[X86] Better support for the MCU psABI (clang part)

This adds support for the MCU psABI in a way different from r251223 and r251224,
basically reverting most of these two patches. The problem with the approach
taken in r251223/4 is that it only handled libcalls that originated from the backend.
However, the mid-end also inserts quite a few libcalls and assumes these use the
platform's default calling convention.

The previous patch tried to insert inregs when necessary both in the FE and,
somewhat hackily, in the CG. Instead, we now define a new default calling convention
for the MCU, which doesn't use inreg marking at all, similarly to what x86-64 does.

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers
Alexander Kornienko [Mon, 28 Dec 2015 13:06:58 +0000 (13:06 +0000)]
Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers

Summary: Use clang-tidy to simplify boolean conditional return values

Reviewers: dcoughlin, krememek

Subscribers: krememek, cfe-commits

Patch by Richard Thomson!

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

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

8 years agoclang-format: Fix incorrect function type detection.
Daniel Jasper [Mon, 28 Dec 2015 07:44:25 +0000 (07:44 +0000)]
clang-format: Fix incorrect function type detection.

Before:
  int x = f (&h)();

After:
  int x = f(&h)();

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

8 years ago[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
Alexey Bataev [Mon, 28 Dec 2015 07:25:51 +0000 (07:25 +0000)]
[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
OpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])
Where kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.
OpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])
Modifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.

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

8 years ago[OPENMP 4.5] Do not allow 'linear' clause along with 'ordered(expr)' clause.
Alexey Bataev [Mon, 28 Dec 2015 06:23:08 +0000 (06:23 +0000)]
[OPENMP 4.5] Do not allow 'linear' clause along with 'ordered(expr)' clause.
According to OpenMP 4.5 "A linear clause or an ordered clause with a parameter can be specified on a loop directive but not both.""

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

8 years ago[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC
Craig Topper [Sun, 27 Dec 2015 21:55:19 +0000 (21:55 +0000)]
[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC

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

8 years agoConstify NestedNameSpecifier::dump and add a no-argument dump function suitable for...
Yaron Keren [Sun, 27 Dec 2015 14:34:22 +0000 (14:34 +0000)]
Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for calling from a debugger.

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

8 years agoOn {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.
Dimitry Andric [Sun, 27 Dec 2015 10:36:44 +0000 (10:36 +0000)]
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.

Summary:
See also:
https://sourceware.org/binutils/docs/as/MIPS-Options.html#index-g_t_0040code_007b_002dG_007d-option-_0028MIPS_0029-1392

Reviewers: theraven, atanasyan, brooks, emaste

Subscribers: rnk, emaste, cfe-commits, seanbruno, dim

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

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

8 years agoFix C++ support on recent DragonFly BSD releases
Dimitry Andric [Sun, 27 Dec 2015 10:01:44 +0000 (10:01 +0000)]
Fix C++ support on recent DragonFly BSD releases

Summary:
[ Copied from https://llvm.org/bugs/show_bug.cgi?id=25597 ]

Clang support for DragonFly BSD is lagging a bit, resulting in poor
support for c++.

DragonFlyBSD is unique in that it has two base compilers.  At the time
of the last Clang update for DragonFly, these compilers were GCC 4.4 and
GCC 4.7 (default).

With DragonFly Release 4.2, GCC 4.4 was replaced with GCC 5.0, partially
because the C++11 support of GCC 4.7 was incomplete.  The DragonFly
project will Release version 4.4 soon.

This patch updates the Clang driver to use libstdc++ from GCC 5.2 The
support for falling back to the alternate compiler was removed for two
reasons:

1) The last release to use GCC 4.7 is DF 4.0 which has already reached EOL
2) GCC 4.7 libstdc++ is insufficient for many "ports"

Therefore, I think it is reasonable that the development version of
clang expects GCC 5.2 to be in place and not try to fall back to another
compiler.

The attached patch will do this.  The Tools.cpp file was signficantly
modified to fix the linking which had been changed somewhere along the
line.  The rest of the changes should be self-explanatory.

Reviewers: joerg, rsmith, davide

Subscribers: jrmarino, davide, cfe-commits

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

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

8 years agoArrayRef-ize TemplateParameterList. NFC
David Majnemer [Sun, 27 Dec 2015 07:16:27 +0000 (07:16 +0000)]
ArrayRef-ize TemplateParameterList. NFC

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

8 years agoFor FreeBSD on mips, pass -G options to the linker
Dimitry Andric [Sun, 27 Dec 2015 06:47:09 +0000 (06:47 +0000)]
For FreeBSD on mips, pass -G options to the linker

Summary:
On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the linker.  See also:

https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html#index-G-2007

This has been adapted from https://reviews.freebsd.org/D1190, with an added test case.

Reviewers: theraven, atanasyan, emaste

Subscribers: brooks, tomatabacu, cfe-commits, seanbruno, emaste

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

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

8 years agoPrune the feature "tls". No one is using it since TLS is enabled for Cygwin.
NAKAMURA Takumi [Sun, 27 Dec 2015 06:14:33 +0000 (06:14 +0000)]
Prune the feature "tls". No one is using it since TLS is enabled for Cygwin.

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

8 years agoSema.h: Prune '\param NumExprs' corresponding to r256401. [-Wdocumentation]
NAKAMURA Takumi [Fri, 25 Dec 2015 16:19:28 +0000 (16:19 +0000)]
Sema.h: Prune '\param NumExprs' corresponding to r256401. [-Wdocumentation]

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

8 years ago[OPENMP] Do not allow to use threadprivate or thread local variables as loop iteratio...
Alexey Bataev [Fri, 25 Dec 2015 13:38:08 +0000 (13:38 +0000)]
[OPENMP] Do not allow to use threadprivate or thread local variables as loop iteration variables.
According to OpenMP the loop iteration variable may not appear in a threadprivate directive.

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

8 years agoclang-format: [TableGen] Support ;-less include lines.
Daniel Jasper [Fri, 25 Dec 2015 08:53:31 +0000 (08:53 +0000)]
clang-format: [TableGen] Support ;-less include lines.

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

8 years agoRevert r256399 "[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC"
Craig Topper [Fri, 25 Dec 2015 00:36:02 +0000 (00:36 +0000)]
Revert r256399 "[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC"

It broke lldb build.

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

8 years ago[Sema] ArrayRef-ize SubstExprs. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:29 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize SubstExprs. NFC

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

8 years ago[Sema] ArrayRef-ize ActOnTemplateParameterList. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:25 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ActOnTemplateParameterList. NFC

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

8 years ago[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:20 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ActOnBaseSpecifiers. NFC

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

8 years ago[Sema] ArrayRef-ize BuildObjCDictionaryLiteral. NFC
Craig Topper [Thu, 24 Dec 2015 23:58:15 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize BuildObjCDictionaryLiteral. NFC

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

8 years ago[Sema] ArrayRef-ize ParseObjCStringLiteral and CodeCompleteObjCProtocolReferences...
Craig Topper [Thu, 24 Dec 2015 23:58:11 +0000 (23:58 +0000)]
[Sema] ArrayRef-ize ParseObjCStringLiteral and CodeCompleteObjCProtocolReferences. NFC

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

8 years agoSome minor correction based on David Blaikie post-commit code review for r255281.
Ekaterina Romanova [Thu, 24 Dec 2015 22:52:41 +0000 (22:52 +0000)]
Some minor correction based on David Blaikie post-commit code review for r255281.

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

8 years agofix test that depends on LLVM optimizations
Sanjay Patel [Thu, 24 Dec 2015 21:53:40 +0000 (21:53 +0000)]
fix test that depends on LLVM optimizations

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

8 years agouse auto for obvious type; NFC
Sanjay Patel [Thu, 24 Dec 2015 21:11:29 +0000 (21:11 +0000)]
use auto for obvious type; NFC

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

8 years ago[X86][ms-inline asm] Test case for adding support for memory operands that include...
Marina Yatsina [Thu, 24 Dec 2015 12:11:40 +0000 (12:11 +0000)]
[X86][ms-inline asm] Test case for adding support for memory operands that include structs

Test case for commit 256381

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

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