summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* ObjectiveC. Remove warning on mismatched methodsFariborz Jahanian2014-01-101-47/+0
| | | | | | | | | which may belong to unrelated classes. It was primarily intended for miuse of @selector expression. But warning is too noisy and will be issued when an actual @selector is used. // rdar://15740134 llvm-svn: 198952
* Make the tautological out of range warning use Sema::DiagRuntimeBehavior so thatRichard Trieu2014-01-101-3/+5
| | | | | | the warning will not trigger on code protected by compile time checks. llvm-svn: 198913
* ObjectiveC. 1) Warn when @dynamic (as well as synthesize) Fariborz Jahanian2014-01-101-6/+2
| | | | | | | | | property has the naming convention that implies 'ownership'. 2) improve on diagnostic and make it property specific. 3) fix the line number in the case of default property synthesis. // rdar://15757510 llvm-svn: 198905
* Removing the notion of TargetAttributesSema and replacing it with one where ↵Aaron Ballman2014-01-097-359/+219
| | | | | | the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not. llvm-svn: 198896
* Have attribute 'objc_precise_lifetime' suppress -Wunused.Ted Kremenek2014-01-091-1/+2
| | | | | | | | | | Fixes <rdar://problem/15596883> In ARC, __attribute__((objc_precise_lifetime)) guarantees that the object stored in it will survive to the end of the variable's formal lifetime. It is therefore useful even if it completely unused. llvm-svn: 198888
* In areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.Argyrios Kyrtzidis2014-01-091-8/+16
| | | | | | rdar://15779837. llvm-svn: 198856
* PR18401: Fix assert by implementing the current proposed direction of coreRichard Smith2014-01-092-17/+20
| | | | | | | issue 1430. Don't allow a pack expansion to be used as an argument to an alias template unless the corresponding parameter is a parameter pack. llvm-svn: 198833
* Treating the RegParmAttr as a TypeAttr because that is what it is.Aaron Ballman2014-01-081-19/+1
| | | | | | Patch reviewed by Rafael Espindola. llvm-svn: 198765
* For AArch64, support builtin neon vector type with 'long' as base element type.Jiangning Liu2014-01-081-0/+3
| | | | llvm-svn: 198741
* PR18400: ignore cv-qualifiers on the underlying type of an enumeration.Richard Smith2014-01-081-1/+1
| | | | llvm-svn: 198723
* PR18234: Mark a tag definition as invalid early if it appears in aRichard Smith2014-01-083-6/+20
| | | | | | | | type-specifier in C++. Some checks will assert in this case otherwise (in particular, the access specifier may be missing if this happens inside a class definition, due to a violation of an AST invariant). llvm-svn: 198721
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-077-8/+8
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* For areVectorOperandsLaxBitCastable(), only return false if both opearands ↵Argyrios Kyrtzidis2014-01-071-14/+18
| | | | | | | | | | are vector types and add a diagnostic when the operand is a vector and non-scalar value. rdar://15722301 llvm-svn: 198680
* Highlight the previous underlying enum type when diagnosing a mismatchAlp Toker2014-01-061-1/+3
| | | | | | | | | | | | | | enum-scoped.cpp:93:6: error: enumeration redeclared with different underlying type 'short' (was 'int') enum Redeclare6 : short; ^ enum-scoped.cpp:92:6: note: previous declaration is here enum Redeclare6 : int; ^ ~~~ The redeclaration source range is still missing but this is a step forward, potentially edging towards a FixIt. llvm-svn: 198601
* Diagnose enum redeclarations properlyAlp Toker2014-01-061-3/+3
| | | | | | | | | | | | | | | | | | In all three checks, the note indicates a previous declaration and never a 'use'. Before: enum-scoped.cpp:92:6: note: previous use is here enum Redeclare6 : int; ^ After: enum-scoped.cpp:92:6: note: previous declaration is here enum Redeclare6 : int; ^ llvm-svn: 198600
* [OpenCL] Produce an error if an address space is used on the returnJoey Gouly2014-01-061-0/+13
| | | | | | type of a function. llvm-svn: 198597
* Fix 'declartion' typosAlp Toker2014-01-051-2/+2
| | | | llvm-svn: 198549
* Pre-declare '::type_info' in MicrosoftMode only, not MicrosoftExtAlp Toker2014-01-051-1/+1
| | | | | | | | It was previously enabled in both but should only have been part of the drop-in quirks mode that is 'MicrosoftMode' given that it's only useful for compatibility with the Microsoft headers/runtime. llvm-svn: 198548
* Move MS predefined type_info out of InitializePredefinedMacrosAlp Toker2014-01-041-0/+7
| | | | | | | | | | | Instead of keeping it in amongst the macros, build the declaration at Sema init the same way we do with other predeclared and builtin types. In practice this means the declaration is marked implicit and therefore won't show up as an unwanted user-declared type in tooling which has been a frequently reported issue (though I haven't been able to cook up a test). llvm-svn: 198497
* [Sema] When checking if a bitcast is appropriate between vector types, take intoArgyrios Kyrtzidis2014-01-041-2/+37
| | | | | | | | | | | consideration the num-of-elements*width-of-element width. Disallow casts when such width is not equal between the vector types otherwise we may end up with an invalid LLVM bitcast. rdar://15722308. llvm-svn: 198474
* Ignore qualified templated functions for -Winfinite-recursion. This treatsRichard Trieu2014-01-041-0/+12
| | | | | | functions like Foo<5>::run() the same way as run<5>() for this warning. llvm-svn: 198470
* Fix 80 col violation.Argyrios Kyrtzidis2014-01-031-1/+2
| | | | llvm-svn: 198444
* Pass the decl directly to the diagnostic, no need to call getDeclName().Argyrios Kyrtzidis2014-01-031-1/+1
| | | | llvm-svn: 198442
* [objc] Refactor and improve functionality for the -Wunused-property-ivar ↵Argyrios Kyrtzidis2014-01-034-40/+79
| | | | | | | | | | | | | | warning. - Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor - Don't check immediately after the method body is finished, check when the @implementation is finished. This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor. - Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self. rdar://15727325 llvm-svn: 198432
* Simplifying the mutual exclusion check now that the diagnostics engine knows ↵Aaron Ballman2014-01-031-12/+7
| | | | | | how to handle Attr objects directly. Updates an associated test case due to the attribute name being properly quoted again. llvm-svn: 198424
* Using the proper helper function instead of manually doing this work. No ↵Aaron Ballman2014-01-031-2/+2
| | | | | | functional changes intended. llvm-svn: 198421
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-031-1/+1
| | | | llvm-svn: 198420
* Removing an unneeded typecast. getScopeRep() already returns a ↵Aaron Ballman2014-01-031-1/+1
| | | | | | NestedNameSpecifier. llvm-svn: 198419
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-032-2/+2
| | | | llvm-svn: 198418
* [OpenCL] Variables in the constant address space must be initialized.Joey Gouly2014-01-031-0/+10
| | | | llvm-svn: 198417
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-031-2/+2
| | | | llvm-svn: 198416
* It turns out the problem was a bit more wide-spread. Removing a lot of ↵Aaron Ballman2014-01-037-30/+20
| | | | | | | | unneeded typecasts. getScopeRep() already returns a NestedNameSpecifier. No functional changes intended. llvm-svn: 198414
* Removing an unneeded typecast. getScopeRep() already returns a ↵Aaron Ballman2014-01-031-1/+1
| | | | | | NestedNameSpecifier. llvm-svn: 198413
* Removing some more unnecessary manual quotes from diagnostics. Updated the ↵Aaron Ballman2014-01-031-1/+1
| | | | | | related test case to ensure correctness. llvm-svn: 198412
* Removing some more unnecessary manual quotes from diagnostics.Aaron Ballman2014-01-031-2/+2
| | | | llvm-svn: 198395
* Removing some more unnecessary manual quotes from attribute diagnostics.Aaron Ballman2014-01-031-1/+1
| | | | llvm-svn: 198392
* Removing some more unnecessary manual quotes from attribute diagnostics.Aaron Ballman2014-01-031-1/+1
| | | | llvm-svn: 198391
* Removing some more unnecessary manual quotes from attribute diagnostics.Aaron Ballman2014-01-032-5/+5
| | | | llvm-svn: 198387
* Removed an unnecessary %select from the alignas diagnostics. The attribute ↵Aaron Ballman2014-01-022-7/+6
| | | | | | already knows how it was spelled. llvm-svn: 198375
* Removing some more unnecessary manual quotes from attribute diagnostics. ↵Aaron Ballman2014-01-021-2/+2
| | | | | | Updated the associated testcase because QualType pretty printing was an improvement. llvm-svn: 198372
* Removing some more unnecessary manual quotes from attribute diagnostics.Aaron Ballman2014-01-021-4/+4
| | | | llvm-svn: 198371
* ObjectiveC. Remove false positive warning for missing propertyFariborz Jahanian2014-01-022-4/+11
| | | | | | | backing ivar by not issuing this warning if ivar is referenced somewhere and accessor makes method calls. // rdar://15727325 llvm-svn: 198367
* Removing some manual quotes from this diagnostic, since the AST diagnostics ↵Aaron Ballman2014-01-021-1/+1
| | | | | | engine knows how to handle NamedDecl objects. llvm-svn: 198365
* Updated the wording of two attribute-related diagnostics so that they print ↵Aaron Ballman2014-01-022-9/+17
| | | | | | the offending attribute name. Also updates the associated test cases. llvm-svn: 198355
* Objective-C ARC++: Prefer references to __strong/__weak over ↵Douglas Gregor2014-01-021-0/+11
| | | | | | | | __unsafe_unretained. Fixes <rdar://problem/15713945>. llvm-svn: 198343
* ObjectiveC. Class methods must be ignored when looking forFariborz Jahanian2014-01-021-1/+2
| | | | | | | property accessor's missing backing ivar. This eliminates the bogus warning being issued. // rdar://15728901 llvm-svn: 198322
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-014-63/+12
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* [OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL.Joey Gouly2013-12-311-2/+5
| | | | | | Patch by joey.gouly@arm.com llvm-svn: 198264
* Rename isBuiltinCall() to getBuiltinCallee()Alp Toker2013-12-281-4/+4
| | | | | | | | This better describes what the function does. Cleanup only. llvm-svn: 198127
* Removed a string literal for a diagnostic, and updated the diagnostic to not ↵Aaron Ballman2013-12-271-1/+1
| | | | | | manually quote. No functional changes intended. llvm-svn: 198076
OpenPOWER on IntegriCloud