summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* This patch adds doxygen comments for the intrinsincs in the header file ↵Ekaterina Romanova2016-01-291-0/+85
| | | | | | | | | | __wmmintrin_aes.h. The doxygen comments are automatically generated based on Sony's intrinsics document. Differential Revision: http://reviews.llvm.org/D16562 llvm-svn: 259275
* Improve -Wconstant-conversionRichard Trieu2016-01-293-3/+70
| | | | | | | | | | | | | | Switch the evaluation from isIntegerConstantExpr to EvaluateAsInt. EvaluateAsInt will evaluate more types of expressions than isIntegerConstantExpr. Move one case from -Wsign-conversion to -Wconstant-conversion. The case is: 1) Source and target types are signed 2) Source type is wider than the target type 3) The source constant value is positive 4) The conversion will store the value as negative in the target. llvm-svn: 259271
* Class Property: generate metadata for class properties in protocols.Manman Ren2016-01-293-6/+21
| | | | | | | | | | The list of class properties is saved in Old ABI: protocol->ext->class_properties (protocol->ext->size will be updated) New ABI: protocol->class_properties (protocol->size will be updated) rdar://23891898 llvm-svn: 259268
* Class Property: generate metadata for class properties in categories.Manman Ren2016-01-292-4/+45
| | | | | | | | | | | The list of class properties is saved in Old ABI: category->class_properties (category->size will be updated as well) New ABI: category->class_properties (a flag in objc_image_info to indicate whether or not the list of class properties is present) rdar://23891898 llvm-svn: 259267
* [UBSan] Add documentation for runtime issue suppression.Alexey Samsonov2016-01-291-0/+32
| | | | llvm-svn: 259260
* This patch adds doxygen comments for the intrinsincs in the header file ↵Ekaterina Romanova2016-01-291-0/+28
| | | | | | | | __wmmintrin_pclmul.h. The doxygen comments are automatically generated based on Sony's intrinsics document. Differential Revision: http://reviews.llvm.org/D15999 llvm-svn: 259239
* Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren2016-01-2926-34/+34
| | | | | | r259192 post commit comment. llvm-svn: 259232
* Class Property: generate metadata for class properties in classes.Manman Ren2016-01-291-28/+57
| | | | | | | | | | The list of class properties is saved in Old ABI: cls->isa->ext->properties New ABI: cls->isa->ro->properties rdar://23891898 llvm-svn: 259229
* Class Property: warn for synthesize on a class property.Manman Ren2016-01-293-2/+7
| | | | | | rdar://23891898 llvm-svn: 259226
* Class Property: parse @dynamic (class).Manman Ren2016-01-292-2/+29
| | | | | | rdar://23891898 llvm-svn: 259224
* [analyzer] Suppress null reports from defensive checks in function-like macros.Devin Coughlin2016-01-292-1/+94
| | | | | | | | | 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 llvm-svn: 259222
* [analyzer] Improve Nullability checker diagnosticsAnna Zaks2016-01-296-57/+114
| | | | | | | | | - 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. llvm-svn: 259221
* Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add ↵Hans Wennborg2016-01-295-132/+14
| | | | | | | | functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes." It didn't pass check-clang. llvm-svn: 259218
* Extend hasType narrowing matcher for TypedefDecls, add functionProtoType ↵Aaron Ballman2016-01-295-14/+132
| | | | | | | | matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes. Patch by Richard Thomson llvm-svn: 259210
* Removing unnecessary casts; NFC.Aaron Ballman2016-01-291-2/+2
| | | | llvm-svn: 259194
* Implement TemplateArgument::dump() method for debugging, patterned after ↵Yaron Keren2016-01-292-0/+15
| | | | | | TemplateName::dump(). llvm-svn: 259192
* Add an optional ToolName argument to ↵Benjamin Kramer2016-01-293-12/+19
| | | | | | | | | | runToolOnCodeWithArgs/buildASTFromCodeWithArgs. This can be used as a way to modify argv[0] for a clang tool. Differential Revision: http://reviews.llvm.org/D16718 llvm-svn: 259187
* Add target triple to CodeGenOpenCL/pipe_types.cl test caseUlrich Weigand2016-01-291-1/+1
| | | | | | | | | 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. llvm-svn: 259183
* [Concepts] Implement a portion of Concepts TS[dcl.spec.concept]p5 and p6:Nathan Wilson2016-01-294-0/+58
| | | | | | | | | | | 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 llvm-svn: 259159
* Remove unnecessary forward declaration. NFCCraig Topper2016-01-291-1/+0
| | | | llvm-svn: 259156
* Add the clang debug info test directory to .gitignore as it's managed ↵Eric Christopher2016-01-291-0/+2
| | | | | | separately. llvm-svn: 259138
* Use a consistent spelling for vtables.Eric Christopher2016-01-299-26/+26
| | | | llvm-svn: 259137
* [CUDA] Generate CUDA's printf alloca in its function's entry block.Justin Lebar2016-01-282-72/+41
| | | | | | | | | | | | | | | 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 llvm-svn: 259122
* Class Property: change PropertyMap to include isClassProperty.Manman Ren2016-01-284-24/+41
| | | | | | | | | | | | | | 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 llvm-svn: 259119
* [analyzer] NullabilityChecker: Remove unused isReturnSelf() function.Devin Coughlin2016-01-281-16/+0
| | | | | | | Remove the now-unused isReturnSelf() function so we don't get a compiler warning. Apologies for not doing this in r259099. llvm-svn: 259118
* Check for frontend errors after releasing the Builder.Manman Ren2016-01-282-3/+34
| | | | | | | | | | | | | 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 llvm-svn: 259116
* Update for llvm change.Rafael Espindola2016-01-281-1/+1
| | | | llvm-svn: 259108
* [analyzer] Suppress nullability warnings in copy, mutableCopy, and init ↵Devin Coughlin2016-01-282-13/+62
| | | | | | | | | | | | | | 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 llvm-svn: 259099
* Implementation of PS4 ABI, Round 1Sunil Srivastava2016-01-281-1/+10
| | | | | | | | Added a test to safeguard linux ABI. Differential Revision: http://reviews.llvm.org/D16607 llvm-svn: 259095
* Include RecordDecls from anonymous unions in the AST.Nico Weber2016-01-288-34/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). llvm-svn: 259079
* Remove unused parameter.Nico Weber2016-01-281-9/+6
| | | | llvm-svn: 259077
* Class Property: class property and instance property can have the same name.Manman Ren2016-01-2816-61/+154
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 259070
* [PGO] test case cleanupsXinliang David Li2016-01-284-15/+21
| | | | | | | 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. llvm-svn: 259067
* Fix strange indent.Nico Weber2016-01-281-2/+2
| | | | llvm-svn: 259063
* [Coverage] Use a set to track visited FileIDs (NFC)Vedant Kumar2016-01-281-3/+3
| | | | llvm-svn: 259061
* Revert r259036, it introduces a cyclic library dependencyOliver Stannard2016-01-285-118/+17
| | | | llvm-svn: 259043
* Add backend dignostic printer for unsupported featuresOliver Stannard2016-01-285-17/+118
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 259036
* Fix isBeforeInTranslationUnit to not abort on macros defined in cmdline.Yury Gribov2016-01-281-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D15804 llvm-svn: 259031
* Small refactor in isBeforeInTranslationUnit.Yury Gribov2016-01-281-6/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D15804 llvm-svn: 259030
* [Lex] Share some common code between decimal and octal parsing in ↵Craig Topper2016-01-282-61/+48
| | | | | | | | 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. llvm-svn: 259022
* Revert r258951 (and r258950), "Refactor backend diagnostics for unsupported ↵NAKAMURA Takumi2016-01-285-117/+17
| | | | | | | | | | | features" It broke layering violation in LLVMIR. clang r258950 "Add backend dignostic printer for unsupported features" llvm r258951 "Refactor backend diagnostics for unsupported features" llvm-svn: 259016
* [Sema] Make extended vectors of `bool` an error.George Burgess IV2016-01-284-26/+15
| | | | | | | | | | | | | | 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 llvm-svn: 259011
* [sancov] sancov tool documentationMike Aizatsky2016-01-271-0/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D16432 llvm-svn: 259000
* Strengthen cfi-check-fail test.Evgeniy Stepanov2016-01-271-12/+12
| | | | | | | | r258993 allows stricter testing for basic block labels by making sure that they are always followed by ":". Use this to improve the test. llvm-svn: 258997
* ARMv7k: simplify logic for deciding sjlj-exceptions.Tim Northover2016-01-272-2/+4
| | | | | | | Slight change of behaviour in the odd armv7+watchos case, which should match the other runtime components. llvm-svn: 258994
* clang-format: [Java] Remove unnecessary line break after complex annotationsDaniel Jasper2016-01-272-0/+4
| | | | | | | | | | | | | | | Before: @Annotation("Some" + " text") List<Integer> list; After: @Annotation("Some" + " text") List<Integer> list; llvm-svn: 258981
* Class Property: create accessors (class methods) for class property.Manman Ren2016-01-274-26/+83
| | | | | | | | | Change a few places where we assume property accessors can only be instance methods. rdar://23891898 llvm-svn: 258980
* Class Property: handle class properties.Manman Ren2016-01-274-7/+7
| | | | | | | | At places where we handle instance properties, if necessary. rdar://23891898 llvm-svn: 258979
* ARMv7k: select ABI based on v7k Arch rather than watchos OS.Tim Northover2016-01-275-12/+13
| | | | | | | | 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. llvm-svn: 258976
* Emit calls to objc_unsafeClaimAutoreleasedReturnValue whenJohn McCall2016-01-277-171/+702
| | | | | | | | | | | | | | | | | 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 llvm-svn: 258962
OpenPOWER on IntegriCloud