]> granicus.if.org Git - clang/log
clang
8 years agoAnnotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post...
Yaron Keren [Fri, 29 Jan 2016 19:38:18 +0000 (19:38 +0000)]
Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.

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

8 years agoClass Property: generate metadata for class properties in classes.
Manman Ren [Fri, 29 Jan 2016 19:22:54 +0000 (19:22 +0000)]
Class Property: generate metadata for class properties in classes.

The list of class properties is saved in
Old ABI: cls->isa->ext->properties
New ABI: cls->isa->ro->properties

rdar://23891898

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

8 years agoClass Property: warn for synthesize on a class property.
Manman Ren [Fri, 29 Jan 2016 19:16:39 +0000 (19:16 +0000)]
Class Property: warn for synthesize on a class property.

rdar://23891898

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

8 years agoClass Property: parse @dynamic (class).
Manman Ren [Fri, 29 Jan 2016 19:05:57 +0000 (19:05 +0000)]
Class Property: parse @dynamic (class).

rdar://23891898

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

8 years ago[analyzer] Suppress null reports from defensive checks in function-like macros.
Devin Coughlin [Fri, 29 Jan 2016 18:47:13 +0000 (18:47 +0000)]
[analyzer] Suppress null reports from defensive checks in function-like macros.

We already do this for case splits introduced as a result of defensive null
checks in functions and methods, so do the same for function-like macros.

rdar://problem/19640441

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

8 years ago[analyzer] Improve Nullability checker diagnostics
Anna Zaks [Fri, 29 Jan 2016 18:43:15 +0000 (18:43 +0000)]
[analyzer] Improve Nullability checker diagnostics

- Include the position of the argument on which the nullability is violated
- Differentiate between a 'method' and a 'function' in the message wording
- Test for the error message text in the tests
- Fix a bug with setting 'IsDirectDereference' which resulted in regular dereferences assumed to have call context.

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

8 years agoRevert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoT...
Hans Wennborg [Fri, 29 Jan 2016 18:24:34 +0000 (18:24 +0000)]
Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."

It didn't pass check-clang.

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

8 years agoExtend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher...
Aaron Ballman [Fri, 29 Jan 2016 17:03:11 +0000 (17:03 +0000)]
Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes.

Patch by Richard Thomson

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

8 years agoRemoving unnecessary casts; NFC.
Aaron Ballman [Fri, 29 Jan 2016 13:53:26 +0000 (13:53 +0000)]
Removing unnecessary casts; NFC.

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

8 years agoImplement TemplateArgument::dump() method for debugging, patterned after TemplateName...
Yaron Keren [Fri, 29 Jan 2016 13:46:15 +0000 (13:46 +0000)]
Implement TemplateArgument::dump() method for debugging, patterned after TemplateName::dump().

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

8 years agoAdd an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.
Benjamin Kramer [Fri, 29 Jan 2016 11:29:02 +0000 (11:29 +0000)]
Add an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.

This can be used as a way to modify argv[0] for a clang tool.

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

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

8 years agoAdd target triple to CodeGenOpenCL/pipe_types.cl test case
Ulrich Weigand [Fri, 29 Jan 2016 10:45:23 +0000 (10:45 +0000)]
Add target triple to CodeGenOpenCL/pipe_types.cl test case

The test is failing on SystemZ since different IR is being
generated due to platform ABI differences.  Add a target triple.

Fix suggested by Anastasia Stulova.

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

8 years ago[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:
Nathan Wilson [Fri, 29 Jan 2016 04:43:59 +0000 (04:43 +0000)]
[Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:
Diagnose if the return type of a function concept or declaration type of a
variable concept is not bool.

Reviewers: hubert.reinterpretcast

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

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

8 years agoRemove unnecessary forward declaration. NFC
Craig Topper [Fri, 29 Jan 2016 04:01:09 +0000 (04:01 +0000)]
Remove unnecessary forward declaration. NFC

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

8 years agoAdd the clang debug info test directory to .gitignore as it's managed separately.
Eric Christopher [Fri, 29 Jan 2016 01:35:55 +0000 (01:35 +0000)]
Add the clang debug info test directory to .gitignore as it's managed separately.

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

8 years agoUse a consistent spelling for vtables.
Eric Christopher [Fri, 29 Jan 2016 01:35:53 +0000 (01:35 +0000)]
Use a consistent spelling for vtables.

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

8 years ago[CUDA] Generate CUDA's printf alloca in its function's entry block.
Justin Lebar [Thu, 28 Jan 2016 23:58:28 +0000 (23:58 +0000)]
[CUDA] Generate CUDA's printf alloca in its function's entry block.

Summary:
This is necessary to prevent llvm from generating stacksave intrinsics
around this alloca.  NVVM doesn't have a stack, and we don't handle said
intrinsics.

Reviewers: rnk, echristo

Subscribers: cfe-commits, jhen, tra

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

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

8 years agoClass Property: change PropertyMap to include isClassProperty.
Manman Ren [Thu, 28 Jan 2016 23:36:05 +0000 (23:36 +0000)]
Class Property: change PropertyMap to include isClassProperty.

PropertyMap used to map IdentifierInfo (name of the property) to
ObjcPropertyDecl *. Now that a class property can have the same name as
an instance property, we change PropertyMap to map a pair <IdentifierInfo *,
unsigned> to ObjcPropertyDecl *.

Also update a few places from iterating over instance_properties to
iterating over all properties.

rdar://23891898

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

8 years ago[analyzer] NullabilityChecker: Remove unused isReturnSelf() function.
Devin Coughlin [Thu, 28 Jan 2016 23:34:13 +0000 (23:34 +0000)]
[analyzer] NullabilityChecker: Remove unused isReturnSelf() function.

Remove the now-unused isReturnSelf() function so we don't get a compiler
warning. Apologies for not doing this in r259099.

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

8 years agoCheck for frontend errors after releasing the Builder.
Manman Ren [Thu, 28 Jan 2016 23:29:02 +0000 (23:29 +0000)]
Check for frontend errors after releasing the Builder.

Frontend can emit errors when releaseing the Builder. If there are errors before
or when releasing the Builder, we reset the module to stop here before invoking
the backend.

Before this commit, clang will continue to invoke the backend and backend can
crash.

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

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

8 years agoUpdate for llvm change.
Rafael Espindola [Thu, 28 Jan 2016 22:56:41 +0000 (22:56 +0000)]
Update for llvm change.

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

8 years ago[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.
Devin Coughlin [Thu, 28 Jan 2016 22:23:34 +0000 (22:23 +0000)]
[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.

There are multiple, common idioms of defensive nil-checks in copy,
mutableCopy, and init methods in ObjC. The analyzer doesn't currently have the
capability to distinguish these idioms from true positives, so suppress all
warnings about returns in those families. This is a pretty blunt suppression
that we should improve later.

rdar://problem/24395811

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

8 years agoImplementation of PS4 ABI, Round 1
Sunil Srivastava [Thu, 28 Jan 2016 21:36:31 +0000 (21:36 +0000)]
Implementation of PS4 ABI, Round 1
Added a test to safeguard linux ABI.

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

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

8 years agoInclude RecordDecls from anonymous unions in the AST.
Nico Weber [Thu, 28 Jan 2016 19:25:00 +0000 (19:25 +0000)]
Include RecordDecls from anonymous unions in the AST.

For

  void f() {
    union { int i; };
  }

clang used to omit the RecordDecl from the anonymous union from the AST.
That's because the code creating it only called PushOnScopeChains(), which adds
it to the current DeclContext, which here is the function's DeclContext. But
RecursiveASTVisitor doesn't descent into all decls in a FunctionDecl.

Instead, for DeclContexts that contain statements, return the RecordDecl so
that it can be included in the DeclStmt containing the VarDecl for the union.

Interesting bits from the AST before this change:

|-FunctionDecl
| `-CompoundStmt
|   |-DeclStmt
|   | `-VarDecl 0x589cd60 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit

After this change:

-FunctionDecl
| `-CompoundStmt
|   |-DeclStmt
|   | |-CXXRecordDecl 0x4612e48 <col:3, col:18> col:3 union definition
|   | | |-FieldDecl 0x4612f70 <col:11, col:15> col:15 referenced i 'int'
|   | `-VarDecl 0x4613010 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit

This is now closer to how anonymous struct and unions are represented as
members of structs.  It also enabled deleting some one-off code in the
template instantiation code.

Finally, it fixes a crash with ASTMatchers, see the included test case
(this fixes http://crbug.com/580749).

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

8 years agoRemove unused parameter.
Nico Weber [Thu, 28 Jan 2016 19:12:32 +0000 (19:12 +0000)]
Remove unused parameter.

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

8 years agoClass Property: class property and instance property can have the same name.
Manman Ren [Thu, 28 Jan 2016 18:49:28 +0000 (18:49 +0000)]
Class Property: class property and instance property can have the same name.

Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name
of the property: ObjCPropertyDecl::findPropertyDecl,
ObjCContainerDecl::FindPropertyDeclaration,
ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass,
ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl.

ObjCPropertyQueryKind currently has 3 values:
OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class

This extra parameter specifies that we are looking for an instance property with
the given name, or a class property with the given name, or any property with
the given name (if both exist, the instance property will be returned).

rdar://23891898

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

8 years ago[PGO] test case cleanups
Xinliang David Li [Thu, 28 Jan 2016 18:25:53 +0000 (18:25 +0000)]
[PGO] test case cleanups

1. Make test case more focused and robust by focusing on what to be tested (linkage, icall) -- make it easier to validate
2. Testing linkages of data and counter variables instead of names. Counters and data are more relavant to be tested.

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

8 years agoFix strange indent.
Nico Weber [Thu, 28 Jan 2016 18:06:31 +0000 (18:06 +0000)]
Fix strange indent.

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

8 years ago[Coverage] Use a set to track visited FileIDs (NFC)
Vedant Kumar [Thu, 28 Jan 2016 17:52:18 +0000 (17:52 +0000)]
[Coverage] Use a set to track visited FileIDs (NFC)

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

8 years agoRevert r259036, it introduces a cyclic library dependency
Oliver Stannard [Thu, 28 Jan 2016 13:09:49 +0000 (13:09 +0000)]
Revert r259036, it introduces a cyclic library dependency

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

8 years agoAdd backend dignostic printer for unsupported features
Oliver Stannard [Thu, 28 Jan 2016 10:07:34 +0000 (10:07 +0000)]
Add backend dignostic printer for unsupported features

Re-commit of r258950 after fixing layering violation.

Add backend dignostic printer for unsupported features

The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

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

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

8 years agoFix isBeforeInTranslationUnit to not abort on macros defined in cmdline.
Yury Gribov [Thu, 28 Jan 2016 09:28:18 +0000 (09:28 +0000)]
Fix isBeforeInTranslationUnit to not abort on macros defined in cmdline.

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

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

8 years agoSmall refactor in isBeforeInTranslationUnit.
Yury Gribov [Thu, 28 Jan 2016 09:27:46 +0000 (09:27 +0000)]
Small refactor in isBeforeInTranslationUnit.

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

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

8 years ago[Lex] Share some common code between decimal and octal parsing in NumericLiteralParser.
Craig Topper [Thu, 28 Jan 2016 05:22:54 +0000 (05:22 +0000)]
[Lex] Share some common code between decimal and octal parsing in NumericLiteralParser.

There were a couple slight variations between the two copies that I don't believe were intentional. For example, only one of the paths checked for digit separations proceeding a '.', but I think the lexer itself splits the token if a digit separator proceeds a period.

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

8 years agoRevert r258951 (and r258950), "Refactor backend diagnostics for unsupported features"
NAKAMURA Takumi [Thu, 28 Jan 2016 04:41:32 +0000 (04:41 +0000)]
Revert r258951 (and r258950), "Refactor backend diagnostics for unsupported features"

It broke layering violation in LLVMIR.

clang r258950 "Add backend dignostic printer for unsupported features"
llvm  r258951 "Refactor backend diagnostics for unsupported features"

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

8 years ago[Sema] Make extended vectors of `bool` an error.
George Burgess IV [Thu, 28 Jan 2016 01:38:18 +0000 (01:38 +0000)]
[Sema] Make extended vectors of `bool` an error.

In OpenCL, `bool` vectors are a reserved type, and are therefore
illegal.

Outside of OpenCL, if we try to make an extended vector of N `bool`s,
Clang will lower it to an `[N x i1]`. LLVM has no ABI for bitvectors, so
lots of operations on such vectors are thoroughly broken. As a result,
this patch makes them illegal in everything else, as well. :)

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

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

8 years ago[sancov] sancov tool documentation
Mike Aizatsky [Wed, 27 Jan 2016 23:56:12 +0000 (23:56 +0000)]
[sancov] sancov tool documentation

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

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

8 years agoStrengthen cfi-check-fail test.
Evgeniy Stepanov [Wed, 27 Jan 2016 22:28:56 +0000 (22:28 +0000)]
Strengthen cfi-check-fail test.

r258993 allows stricter testing for basic block labels by making
sure that they are always followed by ":". Use this to improve the
test.

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

8 years agoARMv7k: simplify logic for deciding sjlj-exceptions.
Tim Northover [Wed, 27 Jan 2016 22:14:02 +0000 (22:14 +0000)]
ARMv7k: simplify logic for deciding sjlj-exceptions.

Slight change of behaviour in the odd armv7+watchos case, which should match
the other runtime components.

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

8 years agoclang-format: [Java] Remove unnecessary line break after complex annotations
Daniel Jasper [Wed, 27 Jan 2016 20:14:23 +0000 (20:14 +0000)]
clang-format: [Java] Remove unnecessary line break after complex annotations

Before:
  @Annotation("Some"
      + " text")
  List<Integer>
      list;

After:
  @Annotation("Some"
      + " text")
  List<Integer> list;

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

8 years agoClass Property: create accessors (class methods) for class property.
Manman Ren [Wed, 27 Jan 2016 20:10:32 +0000 (20:10 +0000)]
Class Property: create accessors (class methods) for class property.

Change a few places where we assume property accessors can only be instance
methods.

rdar://23891898

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

8 years agoClass Property: handle class properties.
Manman Ren [Wed, 27 Jan 2016 20:00:32 +0000 (20:00 +0000)]
Class Property: handle class properties.

At places where we handle instance properties, if necessary.

rdar://23891898

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

8 years agoARMv7k: select ABI based on v7k Arch rather than watchos OS.
Tim Northover [Wed, 27 Jan 2016 19:32:40 +0000 (19:32 +0000)]
ARMv7k: select ABI based on v7k Arch rather than watchos OS.

Various bits we'd like to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.

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

8 years agoEmit calls to objc_unsafeClaimAutoreleasedReturnValue when
John McCall [Wed, 27 Jan 2016 18:32:30 +0000 (18:32 +0000)]
Emit calls to objc_unsafeClaimAutoreleasedReturnValue when
reclaiming a call result in order to ignore it or assign it
to an __unsafe_unretained variable.  This avoids adding
an unwanted retain/release pair when the return value is
not actually returned autoreleased (e.g. when it is returned
from a nonatomic getter or a typical collection accessor).

This runtime function is only available on the latest Apple
OS releases; the backwards-compatibility story is that you
don't get the optimization unless your deployment target is
recent enough.  Sorry.

rdar://20530049

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

8 years agoAdd backend dignostic printer for unsupported features
Oliver Stannard [Wed, 27 Jan 2016 17:30:28 +0000 (17:30 +0000)]
Add backend dignostic printer for unsupported features

The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

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

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

8 years agoAdding back in a test that I inadvertently removed in r258862
Chris Bieneman [Wed, 27 Jan 2016 15:51:56 +0000 (15:51 +0000)]
Adding back in a test that I inadvertently removed in r258862

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

8 years agoUpdate for LLVM change.
Benjamin Kramer [Wed, 27 Jan 2016 10:01:30 +0000 (10:01 +0000)]
Update for LLVM change.

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

8 years agoFix array index out of bounds
Daniel Marjamaki [Wed, 27 Jan 2016 07:33:50 +0000 (07:33 +0000)]
Fix array index out of bounds

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

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

8 years agoAdding a test for PR25717.
Yunzhong Gao [Wed, 27 Jan 2016 02:18:28 +0000 (02:18 +0000)]
Adding a test for PR25717.

The test tries to produce a large preprocessed output to the console, and checks
that we do not see any unexpected fatal errors.

The test is not enabled unless a lit parameter "--param enable_console=1" is
passed on the command line to lit.py.

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

8 years ago[analyzer] ObjCDeallocChecker: Only operate on classes with retained properties.
Devin Coughlin [Wed, 27 Jan 2016 01:41:58 +0000 (01:41 +0000)]
[analyzer] ObjCDeallocChecker: Only operate on classes with retained properties.

Previously the ObjC Dealloc Checker only checked classes with ivars, not
retained properties, which caused three bugs:

- False positive warnings about a missing -dealloc method in classes with only
ivars.
- Missing warnings about a missing -dealloc method on classes with only
properties.
- Missing warnings about an over-released or under-released ivar associated with
a retained property in classes with only properties.

The fix is to check only classes with at least one retained synthesized
property.

This also exposed a bug when reporting an over-released or under-released
property that did not contain a synthesize statement. The checker tried to
associate the warning with an @synthesize statement that did not exist, which
caused an assertion failure in debug builds. The fix is to fall back to the
@property statement in this case.

A patch by David Kilzer!

Part of rdar://problem/6927496

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

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

8 years agoRevert "Change of UserLabelPrefix default value from "_" to """
James Y Knight [Wed, 27 Jan 2016 01:04:51 +0000 (01:04 +0000)]
Revert "Change of UserLabelPrefix default value from "_" to """

This reverts commit r258504.

This commit breaks (at least) sparc-rtems -- the OS (RTEMS) used to
override UserLabelPrefix to "", despite the arch (SPARC) having set it
to "_". Now, the OS doesn't override anymore, but the arch sets it to
"_", resulting in the wrong value. I expect this probably breaks other
OSes that overrode to "" before, as well. (Clearly we have some missing
test cases, here...)

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

8 years ago[analyzer] Body farm: Look for property ivar in shadowing readwrite property.
Devin Coughlin [Tue, 26 Jan 2016 23:58:48 +0000 (23:58 +0000)]
[analyzer] Body farm: Look for property ivar in shadowing readwrite property.

After r251874, readonly properties that are shadowed by a readwrite property
in a class extension no longer have an instance variable, which caused the body
farm to not synthesize getters. Now, if a readonly property does not have an
instance variable look for a shadowing property and try to get the instance
variable from there.

rdar://problem/24060091

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

8 years ago[CUDA] Implemented device-side support functions in <cmath>.
Artem Belevich [Tue, 26 Jan 2016 23:37:29 +0000 (23:37 +0000)]
[CUDA] Implemented device-side support functions in <cmath>.

CUDA expects math functions in std:: namespace to work on device side.
In order to make it work with clang without allowing device-side code
generation for functions w/o appropriate target attributes, this patch
provides device-side implementations for <cmath> functions. Most of
them call global-scope math functions provided by CUDA headers. In few
cases we use clang builtins.

Tested out-of tree by compiling and running thrust's unit_tests.
https://github.com/thrust/thrust/tree/master/testing

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

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

8 years ago[WinEH] Annotate calls to __RTtypeid with a funclet bundle
David Majnemer [Tue, 26 Jan 2016 23:14:47 +0000 (23:14 +0000)]
[WinEH] Annotate calls to __RTtypeid with a funclet bundle

Clang's CodeGen has several paths which end up invoking or calling a
function. The one that we used for calls to __RTtypeid did not
appropriately annotate the call with a funclet bundle.

This fixes PR26329.

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

8 years agoRemove autoconf support
Chris Bieneman [Tue, 26 Jan 2016 21:30:40 +0000 (21:30 +0000)]
Remove autoconf support

Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

    "This is the way [autoconf] ends
    Not with a bang but a whimper."
    -T.S. Eliot

Reviewers: chandlerc, grosbach, bob.wilson, echristo

Subscribers: klimek, cfe-commits

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

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

8 years agoDo not define GXX_RTTI macro for C.
Yunzhong Gao [Tue, 26 Jan 2016 20:15:02 +0000 (20:15 +0000)]
Do not define GXX_RTTI macro for C.
This is same as GCC behavior (tested with GCC 4.8.2).

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

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

8 years ago[MS ABI] Allow a member pointers' converted type to change
David Majnemer [Tue, 26 Jan 2016 19:30:26 +0000 (19:30 +0000)]
[MS ABI] Allow a member pointers' converted type to change

Member pointers in the MS ABI are tricky for a variety of reasons.
The size of a member pointer is indeterminate until the program reaches
a point where the representation is required to be known.  However,
*pointers* to member pointers may exist without knowing the pointee
type's representation.  In these cases, we synthesize an opaque LLVM
type for the pointee type.

However, we can be in a situation where the underlying member pointer's
representation became known mid-way through the program.  To account for
this, we attempted to manicure CodeGen's type-cache so that we can
replace the opaque member pointer type with the real deal while leaving
the pointer types unperturbed.  This, unfortunately, is a problematic
approach to take as we will violate CodeGen's invariants.

These violations are mostly harmless but let's do the right thing
instead: invalidate the type-cache if a member pointer's LLVM
representation changes.

This fixes PR26313.

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

8 years agoFix Clang-tidy modernize-use-nullptr warnings; other minor fixes.
Eugene Zelenko [Tue, 26 Jan 2016 19:01:06 +0000 (19:01 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.

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

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

8 years agoClass Property: parse property attribute (class).
Manman Ren [Tue, 26 Jan 2016 18:52:43 +0000 (18:52 +0000)]
Class Property: parse property attribute (class).

This is the third patch in a series of patches to support class properties
in addition to instance properties in objective-c.

rdar://23891898

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

8 years ago[OpenMP] Parsing + sema for target parallel directive.
Arpith Chacko Jacob [Tue, 26 Jan 2016 18:48:41 +0000 (18:48 +0000)]
[OpenMP] Parsing + sema for target parallel directive.

Summary:
This patch adds parsing + sema for the target parallel directive and its clauses along with testcases.

Reviewers: ABataev

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

Rebased to current trunk and updated test cases.

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

8 years agoUse instance_properties instead of properties. NFC.
Manman Ren [Tue, 26 Jan 2016 18:05:23 +0000 (18:05 +0000)]
Use instance_properties instead of properties. NFC.

All current properties are instance properties.

This is the second patch in a series of patches to support class properties
in addition to instance properties in objective-c.

rdar://23891898

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

8 years ago[CUDA] Add -fcuda-allow-variadic-functions.
Justin Lebar [Tue, 26 Jan 2016 17:47:20 +0000 (17:47 +0000)]
[CUDA] Add -fcuda-allow-variadic-functions.

Summary:
Turns out the variadic function checking added in r258643 was too strict
for some existing users; give them an escape valve.  When
-fcuda-allow-variadic-functions is passed, the front-end makes no
attempt to disallow C-style variadic functions.  Calls to va_arg are
still not allowed.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo, bkramer

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

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

8 years ago[OpenMP] Parsing + sema for defaultmap clause.
Arpith Chacko Jacob [Tue, 26 Jan 2016 16:37:23 +0000 (16:37 +0000)]
[OpenMP] Parsing + sema for defaultmap clause.

Summary:
This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others).

Reviewers: ABataev

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

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

8 years agoRevert "[Driver] Make sure -fno-math-builtin option is being passed by the driver."
Chad Rosier [Tue, 26 Jan 2016 16:16:53 +0000 (16:16 +0000)]
Revert "[Driver] Make sure -fno-math-builtin option is being passed by the driver."

This reverts commit r258814.

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

8 years ago[Driver] Make sure -fno-math-builtin option is being passed by the driver.
Chad Rosier [Tue, 26 Jan 2016 15:52:05 +0000 (15:52 +0000)]
[Driver] Make sure -fno-math-builtin option is being passed by the driver.

Support for the -fno-math-builtin option was added in r186899.  The codegen side
is being tested in test/CodeGen/nomathbuiltin.c.  The missing part was just
passing the option through the driver.

PR26317

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

8 years ago[Driver] Update FIXME comment now that PR4941 has been addressed.
Chad Rosier [Tue, 26 Jan 2016 15:46:29 +0000 (15:46 +0000)]
[Driver] Update FIXME comment now that PR4941 has been addressed.

The actual fix should be addressed by someone who can test on Darwin.

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

8 years ago[OPENMP 4.5] Allow arrays in 'reduction' clause.
Alexey Bataev [Tue, 26 Jan 2016 12:20:39 +0000 (12:20 +0000)]
[OPENMP 4.5] Allow arrays in 'reduction' clause.
OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions.

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

8 years agoAMDGPU: Add amdgcn cube builtins
Matt Arsenault [Tue, 26 Jan 2016 06:37:54 +0000 (06:37 +0000)]
AMDGPU: Add amdgcn cube builtins

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

8 years agoRecommit: R258773 [OpenCL] Pipe builtin functions
Xiuli Pan [Tue, 26 Jan 2016 04:03:48 +0000 (04:03 +0000)]
Recommit: R258773 [OpenCL] Pipe builtin functions
Fix arc patch fuzz error.
Summary:
Support for the pipe built-in functions for OpenCL 2.0.
The pipe builtin functions may have infinite kinds of element types, one approach
would be to just generate calls that would always use generic types such as void*.
This patch is based on bader's opencl support patch on SPIR-V branch.

Reviewers: Anastasia, pekka.jaaskelainen

Subscribers: keryell, bader, cfe-commits

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

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

8 years agoFix -Wnull-conversion for long macros.
Richard Trieu [Tue, 26 Jan 2016 02:51:55 +0000 (02:51 +0000)]
Fix -Wnull-conversion for long macros.

Move the function to get a macro name from DiagnosticRenderer.cpp to Lexer.cpp
so that other files can use it.  Lexer now has two functions to get the
immediate macro name, the newly added one is better for diagnostic purposes.
Make -Wnull-conversion use this function for better NULL macro detection.

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

8 years agoRecommit the test for r258720 using -###
Ehsan Akhgari [Tue, 26 Jan 2016 02:23:05 +0000 (02:23 +0000)]
Recommit the test for r258720 using -###

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

8 years agoRevert "[OpenCL] Pipe builtin functions"
David Majnemer [Tue, 26 Jan 2016 02:22:31 +0000 (02:22 +0000)]
Revert "[OpenCL] Pipe builtin functions"

This reverts commit r258773, it broke the build bots:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/43853

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

8 years ago[OpenCL] Pipe builtin functions
Xiuli Pan [Tue, 26 Jan 2016 02:06:04 +0000 (02:06 +0000)]
[OpenCL] Pipe builtin functions

Summary:
Support for the pipe built-in functions for OpenCL 2.0.
The pipe builtin functions may have infinite kinds of element types, one approach
would be to just generate calls that would always use generic types such as void*.
This patch is based on bader's opencl support patch on SPIR-V branch.

Reviewers: Anastasia, pekka.jaaskelainen

Subscribers: keryell, bader, cfe-commits

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

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

8 years agoRevert the test for r258720 temporarily
Ehsan Akhgari [Tue, 26 Jan 2016 01:51:47 +0000 (01:51 +0000)]
Revert the test for r258720 temporarily

This test is failing on a bot for reasons that are unclear to me.
Reverting for now...

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

8 years ago[Sema] Remove stray semicolons.
David Majnemer [Tue, 26 Jan 2016 01:39:17 +0000 (01:39 +0000)]
[Sema] Remove stray semicolons.

No functional change is intended.

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

8 years ago[Sema] Incomplete types are OK for covariant returns
David Majnemer [Tue, 26 Jan 2016 01:37:01 +0000 (01:37 +0000)]
[Sema] Incomplete types are OK for covariant returns

Per C++14 [class.virtual]p8, it is OK for the return type's class type
to be incomplete so long as the return type is the same between the base
and complete classes.

This fixes PR26297.

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

8 years ago[MS Compat] Don't crash if __GetExceptionInfo is in global scope
David Majnemer [Tue, 26 Jan 2016 01:12:17 +0000 (01:12 +0000)]
[MS Compat] Don't crash if __GetExceptionInfo is in global scope

__GetExceptionInfo triggered Sema::LazilyCreateBuiltin which tries to
create a non-templated function decl.  This is unnecessary and
ill-advised, there is no need for us to create a declaration for such a
builtin.

This fixes PR26298.

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

8 years agoFix use of constexpr std::pair that's not in C++11.
Evgeniy Stepanov [Mon, 25 Jan 2016 23:45:37 +0000 (23:45 +0000)]
Fix use of constexpr std::pair that's not in C++11.

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

8 years ago[cfi] Cross-DSO CFI diagnostic mode (clang part)
Evgeniy Stepanov [Mon, 25 Jan 2016 23:34:52 +0000 (23:34 +0000)]
[cfi] Cross-DSO CFI diagnostic mode (clang part)

* Runtime diagnostic data for cfi-icall changed to match the rest of
  cfi checks
* Layout of all CFI diagnostic data changed to put Kind at the
  beginning. There is no ABI stability promise yet.
* Call cfi_slowpath_diag instead of cfi_slowpath when needed.
* Emit __cfi_check_fail function, which dispatches a CFI check
  faliure according to trap/recover settings of the current module.
* A tiny driver change to match the way the new handlers are done in
  compiler-rt.

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

8 years ago[CUDA] Add -target to cuda-constructor-alias.cu test so it doesn't fail on Mac.
Justin Lebar [Mon, 25 Jan 2016 22:52:31 +0000 (22:52 +0000)]
[CUDA] Add -target to cuda-constructor-alias.cu test so it doesn't fail on Mac.

The test was checking that we passed -mconstructor-alias to host
compilation, but that explicitly shouldn't happen on Mac.

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

8 years agoUpdate comments to match the implementation.
Manman Ren [Mon, 25 Jan 2016 22:37:47 +0000 (22:37 +0000)]
Update comments to match the implementation.

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

8 years ago[CUDA] Don't generate aliases for static extern "C" functions.
Justin Lebar [Mon, 25 Jan 2016 22:36:37 +0000 (22:36 +0000)]
[CUDA] Don't generate aliases for static extern "C" functions.

Summary:
These aliases are done to support inline asm, but there's nothing we can
do: NVPTX doesn't support aliases.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

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

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

8 years ago[CUDA] Disable ctor/dtor aliases in device code.
Justin Lebar [Mon, 25 Jan 2016 22:36:35 +0000 (22:36 +0000)]
[CUDA] Disable ctor/dtor aliases in device code.

Summary: NVPTX doesn't support aliases, so don't generate them.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

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

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

8 years agoMove ObjCPropertyDecl to before ObjCContainerDecl.
Manman Ren [Mon, 25 Jan 2016 21:52:26 +0000 (21:52 +0000)]
Move ObjCPropertyDecl to before ObjCContainerDecl.

After we add ObjCPropertyDecl::isClassProperty, we can use it in
ObjCContainerDecl to define filter to iterate over instance properties
and class properties.

This is the first patch in a series of patches to support class properties
in addition to instance properties in objective-c.

rdar://23891898

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

8 years ago[MSVC Compat] Only warn for unknown clang-cl arguments
Ehsan Akhgari [Mon, 25 Jan 2016 21:14:52 +0000 (21:14 +0000)]
[MSVC Compat] Only warn for unknown clang-cl arguments

Summary:
MSVC's driver accepts all unknown arguments but warns about them.  clang
by default rejects all unknown arguments.  This causes issues
specifically with build systems such as autoconf which liberally pass
things such as $LDFLAGS to the compiler and expect everything to work.
This patch teaches clang-cl to ignore unknown driver arguments.

Reviewers: rnk

Subscribers: cfe-commits

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

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

8 years agoLTO via the gold plugin needs to be told about debugger tuning.
Paul Robinson [Mon, 25 Jan 2016 19:46:40 +0000 (19:46 +0000)]
LTO via the gold plugin needs to be told about debugger tuning.

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

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

8 years agoPass --wrap=pthread_create to linker for -fsplit-stack.
Rafael Espindola [Mon, 25 Jan 2016 18:29:16 +0000 (18:29 +0000)]
Pass --wrap=pthread_create to linker for -fsplit-stack.

From

https://gcc.gnu.org/ml/gcc-patches/2010-09/msg01807.html

-fsplit-stack should pass --wrap=pthread_create to linker for -fsplit-stack
It is needed to initialize the stack guard.  This fixes PR 20148.

Patch by H.J Lu!

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

8 years agoFix printing of types in initializers with suppressed tags.
Benjamin Kramer [Mon, 25 Jan 2016 10:34:06 +0000 (10:34 +0000)]
Fix printing of types in initializers with suppressed tags.

Tag and specifier printing can be suppressed in Decl::printGroup, but these suppressions leak into the initializers. Thus
    int *x = ((void *)0), *y = ((void *)0);
gets printed as
    int *x = ((void *)0), *y = ((*)0);
And
    struct { struct Z z; } z = {(struct Z){}};
gets printed as
    struct { struct Z z; } z = {(){}};
The stops the suppressions from leaking into the initializers.

Patch by Nick Sumner!

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

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

8 years ago[Sema] Improve constness
Daniel Marjamaki [Mon, 25 Jan 2016 09:29:38 +0000 (09:29 +0000)]
[Sema] Improve constness

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

8 years agoAllow capture typedefs/type aliases for VLAs in lambdas/captured statements chain.
Alexey Bataev [Mon, 25 Jan 2016 07:06:23 +0000 (07:06 +0000)]
Allow capture typedefs/type aliases for VLAs in lambdas/captured statements chain.
Previous it was allowed to capture VLAs/types with arrays of runtime bounds only inside the first lambda/capture statement in stack. Patch allows to capture these typedefs implicitly in chains of lambdas/captured statements.

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

8 years agoFixed processing of GNU extensions to C99 designated initializers
Alexey Bataev [Mon, 25 Jan 2016 05:14:03 +0000 (05:14 +0000)]
Fixed processing of GNU extensions to C99 designated initializers
Clang did not handles correctly inner parts of arrays/structures initializers in GNU extensions to C99 designated initializers.

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

8 years ago[PGO] Windows buildbot failure fix. [NFC]
Betul Buyukkurt [Sun, 24 Jan 2016 00:56:19 +0000 (00:56 +0000)]
[PGO] Windows buildbot failure fix. [NFC]

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

8 years agoClang changes for value profiling
Betul Buyukkurt [Sat, 23 Jan 2016 22:50:44 +0000 (22:50 +0000)]
Clang changes for value profiling

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

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

8 years ago[CUDA] Disallow variadic functions other than printf in device code.
Justin Lebar [Sat, 23 Jan 2016 21:28:17 +0000 (21:28 +0000)]
[CUDA] Disallow variadic functions other than printf in device code.

Reviewers: tra

Subscribers: cfe-commits, echristo, jhen

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

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

8 years ago[CUDA] Make printf work.
Justin Lebar [Sat, 23 Jan 2016 21:28:14 +0000 (21:28 +0000)]
[CUDA] Make printf work.

Summary:
The code in CGCUDACall is largely based on a patch written by Eli
Bendersky:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140324/210218.html

That patch implemented an LLVM pass lowering printf to vprintf; this
one does something similar, but in Clang codegen.

Reviewers: echristo

Subscribers: cfe-commits, jhen, tra, majnemer

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

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

8 years ago[CUDA] Reject the alias attribute in CUDA device code.
Justin Lebar [Sat, 23 Jan 2016 21:28:10 +0000 (21:28 +0000)]
[CUDA] Reject the alias attribute in CUDA device code.

Summary: CUDA (well, strictly speaking, NVPTX) doesn't support aliases.

Reviewers: echristo

Subscribers: cfe-commits, jhen, tra

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

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

8 years ago[CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.
Justin Lebar [Sat, 23 Jan 2016 21:28:08 +0000 (21:28 +0000)]
[CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.

Summary: No functional changes.

Subscribers: tra, echristo, jhen, cfe-commits

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

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

8 years agoImproving documentation for the isMoveAssignmentOperator AST matcher.
Aaron Ballman [Sat, 23 Jan 2016 17:49:18 +0000 (17:49 +0000)]
Improving documentation for the isMoveAssignmentOperator AST matcher.

Patch by Jonathan Coe.

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

8 years agoSemaOpenMP.cpp: Fix a warning in r258543. [-Wunused-variable]
NAKAMURA Takumi [Sat, 23 Jan 2016 01:38:20 +0000 (01:38 +0000)]
SemaOpenMP.cpp: Fix a warning in r258543. [-Wunused-variable]

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

8 years ago[cfi] Do not emit bit set entry for available_externally vtables.
Evgeniy Stepanov [Sat, 23 Jan 2016 01:20:18 +0000 (01:20 +0000)]
[cfi] Do not emit bit set entry for available_externally vtables.

In the Itanium ABI, vtable may be emitted speculatively as an
available_externally global. Such vtable may not be present at the
link time and should not have a corresponding CFI bit set entry.

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