summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Fix modeling of strnlen to be more conservative. Move tests we ↵Jordy Rose2011-06-143-77/+239
| | | | | | can't properly model (yet?) to string-fail.c. llvm-svn: 132955
* Make __gnu_inline__ functions in gnu99 mode work the same way as inline ↵Eli Friedman2011-06-133-18/+27
| | | | | | | | functions in gnu89 mode in terms of redefinitions. rdar://9559708 . llvm-svn: 132953
* Put local variables in appropriate debug info scope.Devang Patel2011-06-131-5/+5
| | | | | | This fixes radar 8757124. llvm-svn: 132949
* Remote this unreliable test case because it did not do its job.Devang Patel2011-06-131-20/+0
| | | | llvm-svn: 132948
* Update extensions section of the docs to account for wacky gcc stuff we did ↵Eli Friedman2011-06-131-13/+1
| | | | | | end up implementing. llvm-svn: 132947
* Whack a bunch of tests in CodeGenCXX to work on ARM (using ARM ABI). Batch ↵Eli Friedman2011-06-138-32/+32
| | | | | | 1 of 3 or so. llvm-svn: 132945
* Put classes into anonymous namespaces.Benjamin Kramer2011-06-131-20/+26
| | | | llvm-svn: 132924
* Eliminate the -f[no]objc-infer-related-result-type flags; there's noDouglas Gregor2011-06-1318-36/+19
| | | | | | reason to allow the user to control these semantics through a flag. llvm-svn: 132919
* Update Indexer test for new 'atomic' keyword.Fariborz Jahanian2011-06-131-2/+14
| | | | llvm-svn: 132918
* Document CheckObjCMethodOverridesDouglas Gregor2011-06-131-1/+9
| | | | llvm-svn: 132917
* Give a diagnostic when using non-POD types in a va_argDavid Majnemer2011-06-133-1/+17
| | | | llvm-svn: 132905
* Improve the diagnostics generated for switch statements missing expressionsDavid Majnemer2011-06-132-4/+21
| | | | | | | - Move the diagnostic to the case statement instead of at the end of the switch - Add a fix-it hint as to how to fix the compilation error llvm-svn: 132903
* Fix a broken index left over from before this function was converted toChandler Carruth2011-06-131-1/+1
| | | | | | handle memcpy and memmove. Spotted by Nico. llvm-svn: 132902
* Correct the spelling of instantiationDavid Majnemer2011-06-131-1/+1
| | | | llvm-svn: 132901
* My calendar says it's 2011.Benjamin Kramer2011-06-121-1/+1
| | | | llvm-svn: 132894
* Don't assert on initialized typedef declarations in classes:Richard Smith2011-06-124-9/+9
| | | | | | | | | | | | struct { typedef int A = 0; }; According to the C++11 standard, this is not ill-formed, but does not have any ascribed meaning. We can't reasonably accept it, so treat it as ill-formed. Also switch C++ from an incorrect 'fields can only be initialized in constructors' diagnostic for this case to C's 'illegal initializer (only variables can be initialized)' llvm-svn: 132890
* Test for C++11 [class]p6 (trivial classes).Richard Smith2011-06-121-0/+15
| | | | llvm-svn: 132889
* Added 'atomic' for objc properties.Fariborz Jahanian2011-06-111-0/+5
| | | | llvm-svn: 132879
* Implement support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-1157-282/+1563
| | | | llvm-svn: 132878
* Add code completetion code for the new 'atomic' attributeFariborz Jahanian2011-06-112-0/+3
| | | | | | keyword in objc property decl. llvm-svn: 132877
* Extra test for related result type inferenceDouglas Gregor2011-06-111-0/+1
| | | | llvm-svn: 132874
* Fix order of operands for the warning about incompatible Objective-CDouglas Gregor2011-06-113-4/+4
| | | | | | | pointer assignment in C++. This was a longstanding problem spotted by Jordy Rose. llvm-svn: 132873
* Implement Objective-C Related Result Type semantics.Douglas Gregor2011-06-1133-68/+895
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id llvm-svn: 132868
* Restore 'atomic' as an attribute of objcFariborz Jahanian2011-06-115-6/+14
| | | | | | properties. llvm-svn: 132866
* PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to ↵Eli Friedman2011-06-103-3/+11
| | | | | | | | determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates. While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp. llvm-svn: 132861
* __OBJC__ is also a standard predefined macro.Nick Lewycky2011-06-101-1/+3
| | | | llvm-svn: 132855
* This change is breaking selfhost. Revert it until I have more timeAlexis Hunt2011-06-103-115/+195
| | | | | | to study it. llvm-svn: 132843
* Uncomment this testcase now that we pass it.Alexis Hunt2011-06-101-5/+2
| | | | llvm-svn: 132842
* Implement caching of copy assignment operator lookup.Alexis Hunt2011-06-103-195/+115
| | | | | | | | | | | | | I believe, upon, careful review, that this code causes us to incorrectly handle exception specifications of copy assignment operators in C++03 mode. However, we currently do not seem to properly implement the subtle distinction between copying of members and bases made by implicit copy constructors and assignment operators in C++03 - namely that they are limited in their overload selection - in all cases. As such, I feel that committing this code is correct pending a careful review of our implementation of these semantics. llvm-svn: 132841
* [analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level ↵Jordy Rose2011-06-105-42/+41
| | | | | | | | expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary. Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary. llvm-svn: 132840
* Implement caching for copy constructors in similar situations.Alexis Hunt2011-06-103-90/+61
| | | | llvm-svn: 132835
* Implement caching of default constructors on the resolution table. ThisAlexis Hunt2011-06-104-75/+197
| | | | | | | | isn't yet used for the less controlled environments of initialization. Also a few random text fixups. llvm-svn: 132833
* Made changes to how 'struct'/'class' mismatches are handled in ↵Richard Trieu2011-06-107-19/+239
| | | | | | | | | | | | | | | | | -Wmismatched-tags. - Removed fix-it hints from template instaniations since changes to the templates are rarely helpful. - Changed the caret in template instaniations from the class/struct name to the class/struct keyword, matching the other warnings. - Do not offer fix-it hints when multiple declarations disagree. Warnings are still given. - Once a definition is found, offer a fix-it hint to all previous declarations with wrong tag. - Declarations that disagree with a previous definition will get a fix-it hint to change the declaration. llvm-svn: 132831
* Add few missing files in AST directory to xcode project.Fariborz Jahanian2011-06-091-0/+15
| | | | llvm-svn: 132812
* Don't add objc method name mangling to locally declared function.Fariborz Jahanian2011-06-092-0/+18
| | | | | | // rdar://9566314 llvm-svn: 132791
* Handle overloaded operators in ?: precedence warningHans Wennborg2011-06-094-39/+107
| | | | | | | | | | | | | | This is a follow-up to r132565, and should address the rest of PR9969: Warn about cases such as int foo(A a, bool b) { return a + b ? 1 : 2; // user probably meant a + (b ? 1 : 2); } also when + is an overloaded operator call. llvm-svn: 132784
* Add isVCVT_N flag to identify Neon VCVT_N intrinsics, which require specialBob Wilson2011-06-092-3/+13
| | | | | | range checking for immediate operands. Radar 9558930. llvm-svn: 132783
* [analyzer] Ignore parentheses around block-level expressions when computing ↵Jordy Rose2011-06-092-3/+25
| | | | | | liveness. Fixes the other half of PR8962. llvm-svn: 132769
* [analyzer] Look through __extension__ expressions in a GRState's ↵Jordy Rose2011-06-082-6/+20
| | | | | | Environment. Fixes PR8962. llvm-svn: 132762
* Remove stale reference to libIndex.Ted Kremenek2011-06-081-1/+0
| | | | llvm-svn: 132757
* Remove 'atomic' as a property attribute keyword.Fariborz Jahanian2011-06-085-14/+6
| | | | | | | It is not a sanctioned keyword and is assumed as default. // rdar://8790791 llvm-svn: 132753
* Followup to 132737; make two-character string explicit, add someStuart Hastings2011-06-082-1/+4
| | | | | | comments. rdar://problem/9037836 llvm-svn: 132752
* Modify a diagnostic introduced in r132612 to emit QualTypes directlyPeter Collingbourne2011-06-082-4/+4
| | | | | | | This fixes a memory error on FreeBSD (and is the right thing to do in any case). llvm-svn: 132750
* Fix a bunch more notes that were emitted even when the diagnostic theyChandler Carruth2011-06-081-6/+9
| | | | | | were intended for was suppressed. llvm-svn: 132746
* Revert "hack in my new variables for GCC"Chandler Carruth2011-06-083-44/+24
| | | | | | Very sorry for the accidental commit of WIP code. llvm-svn: 132745
* Fix a regression in the two-phase lookup diagnostics that switching theChandler Carruth2011-06-082-0/+24
| | | | | | | | namespace set algorithm (re-)introduced. We may not have seen the 'std' namespace, but we should still suggested associated namespaces. Easy fix, but a bit annoying to test. llvm-svn: 132744
* hack in my new variables for GCCChandler Carruth2011-06-083-24/+44
| | | | llvm-svn: 132743
* Clang support for ARM Uv/Uy/Uq inline-asm constraints.Stuart Hastings2011-06-074-8/+37
| | | | | | rdar://problem/9037836 llvm-svn: 132737
* Sort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386Joerg Sonnenberger2011-06-071-1/+1
| | | | | | may pick it up. This would create bad text relocations. llvm-svn: 132736
* More coherent diagnostic when a stack variable isFariborz Jahanian2011-06-073-3/+9
| | | | | | declared __weak objc-gc mode. // rdar://9666091. llvm-svn: 132731
OpenPOWER on IntegriCloud