summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* In C99, emit an inline function when encountering an extern redeclaration.Nick Lewycky2011-07-183-3/+42
| | | | | | Fixes PR10233! llvm-svn: 135377
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-1835-452/+452
| | | | llvm-svn: 135370
* Use the new llvm::TinyPtrVector class, which implements exactly whatChris Lattner2011-07-181-73/+5
| | | | | | ShadowMapEntry was. llvm-svn: 135368
* Revert r135217, which wasn't the correct fix for PR10358. With thisChandler Carruth2011-07-161-6/+4
| | | | | | | | | | | patch, we actually move the state-machine for the value set backwards one step. This can pretty easily lead to infinite loops where we continually try to propagate a bit, succeed for one iteration, but then back up because we find an uninitialized use. A reduced test case from PR10379 is included. llvm-svn: 135359
* Do not modify string returned by getenv on Windows. Francois Pichet2011-07-161-4/+2
| | | | | | Fixes PR9875, patch by Nikola Smiljanic! llvm-svn: 135356
* Zero this struct in a way that neither depends on the size of the struct nor ↵Benjamin Kramer2011-07-161-0/+1
| | | | | | triggers warnings from GCC. llvm-svn: 135351
* [analyzer] Per discussions with the Cocoa team, extend CF naming conventions ↵Ted Kremenek2011-07-161-2/+41
| | | | | | to extend to camel case functions instead of just title case functions. Fixes <rdar://problem/9732321>. llvm-svn: 135350
* [analyzer] Place checking for Core Foundation "Create" rule into a proper ↵Ted Kremenek2011-07-163-11/+16
| | | | | | API. No functionality change. llvm-svn: 135349
* Remove a gcc warning.Fariborz Jahanian2011-07-161-1/+1
| | | | llvm-svn: 135348
* Correctly handle sysroot prefix in -print-search-dirs. Makes libtoolJoerg Sonnenberger2011-07-161-1/+10
| | | | | | more happy on NetBSD. llvm-svn: 135344
* Fix a typo.Fariborz Jahanian2011-07-161-1/+1
| | | | llvm-svn: 135328
* [arcmt] It's not safe to remove the -release on "[[someivar delegate] ↵Argyrios Kyrtzidis2011-07-151-9/+31
| | | | | | | | | | | | | | | | | | release];" since it's very likely that, after migration, the object that was passed to 'setDelegate:' will not be properly retained, e.g: -whatever { id x = [[MyDoHicky alloc] init]; [someivar setDelegate: x]; // x won't get retained in ARC. } -dealloc { [[someivar delegate] release]; // give migration error here. } rdar://8858009 llvm-svn: 135327
* This handles the missing cases of opencl vector literals.Tanya Lattner2011-07-152-6/+20
| | | | | | Test cases provided by Anton Lokhmot. llvm-svn: 135322
* Add tests for CFRefReport's path notes, and fix a few typos and non-standard ↵Jordy Rose2011-07-151-13/+8
| | | | | | terminology ('+0 retain counts') caught by the tests. llvm-svn: 135310
* [arcmt] Rewrite to "foo = nil;" not "foo = 0;", as suggested by Jordy.Argyrios Kyrtzidis2011-07-151-2/+8
| | | | llvm-svn: 135309
* Prevent the -save-temps flag from modifying the input file if the input filenameChad Rosier2011-07-151-0/+9
| | | | | | | conflicts with a to be produced temp filename. rdar://9724657 llvm-svn: 135308
* Augment the interface of ExternalASTSource::FindExternalLexicalDecls()Douglas Gregor2011-07-155-15/+23
| | | | | | | | | | | to allow clients to specify that they've already (correctly) loaded declarations, and that no further action is needed. Also, make sure that we clear the "has external lexical declarations" bit before calling FindExternalLexicalDecls(), to avoid infinite recursion. llvm-svn: 135306
* [arcmt] For:Argyrios Kyrtzidis2011-07-151-8/+31
| | | | | | | | | | | | | | | id x = ... @try { ... } @finally { [x release]; } Migrator will drop the release. It's better to change it to "x = 0" in a @finally to avoid leak when exception is thrown. rdar://9398256 llvm-svn: 135301
* [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.Jordy Rose2011-07-151-1/+4
| | | | llvm-svn: 135294
* Fix typoJoerg Sonnenberger2011-07-151-1/+1
| | | | llvm-svn: 135285
* Use the new APFloat::convertToInt(APSInt) function to simplify uses ofJeffrey Yasskin2011-07-152-11/+8
| | | | | | convertToInt(integerParts*) and make them more reliable. llvm-svn: 135279
* Store bracket locations for array subscript expressions, from Erik Verbruggen!Douglas Gregor2011-07-152-8/+26
| | | | llvm-svn: 135275
* When creating a property in a class extension, make sure to check itsDouglas Gregor2011-07-151-0/+1
| | | | | | attributes. Fixes <rdar://problem/9561076>. llvm-svn: 135273
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-1511-66/+69
| | | | llvm-svn: 135265
* Restore the C-style cast hack for enum template arguments,John McCall2011-07-151-1/+10
| | | | | | | | which is required given the current setup for template argument deduction substitution validation, and add a test case to make sure we don't break it in the future. llvm-svn: 135262
* Move the Serialization library from 'instantiation' to 'expansion', withChandler Carruth2011-07-152-14/+14
| | | | | | the exception of its uses of SourceManager and SourceLocation APIs. llvm-svn: 135260
* Add serialization support for SubstNonTypeTemplateParmExpr.John McCall2011-07-152-285/+135
| | | | | | | | | | Also add the missing serialization support for SEHTryStmt, SEHFinallyStmt, and SEHExceptStmt, and fix and finish the serialization support for AsTypeExpr. In addition, change the code so that it will no longer link if a Stmt subclass is missing serialization support. llvm-svn: 135258
* Fix the definition of AsTypeExpr. I'm still not sure thisJohn McCall2011-07-151-1/+1
| | | | | | | | | | is right --- shouldn't there be a TypeLoc in here somewhere? --- but at least it doesn't have a redundant QualType and a broken children() method. Noticed this while doing things in serialization. llvm-svn: 135257
* protect some calls to ConvertType when a function info is under constructionChris Lattner2011-07-151-3/+3
| | | | | | | to prevent recursive compilation problems. This fixes a failure of CodeGen/decl.c on x86-32 targets that don't fill in the coerce-to type. llvm-svn: 135256
* Clean up UnixAPIChecker, including switching its array of BugTypes to ↵Jordy Rose2011-07-151-70/+40
| | | | | | llvm::OwningPtr<BugType> vars (the new convention). No functionality change. llvm-svn: 135255
* Clean up MacOSXAPIChecker, including switching its array of BugTypes to a ↵Jordy Rose2011-07-151-53/+26
| | | | | | single llvm::OwningPtr<BugType> (the new convention). No functionality change. llvm-svn: 135250
* Enhance the IR type lowering code to be much smarter about recursively loweringChris Lattner2011-07-153-68/+172
| | | | | | | | | | | | | | | | | | | | | | | | | types. Fore xample, we used to lower: struct bar { int a; }; struct foo { void (*FP)(struct bar); } G; to: %struct.foo = type { {}* } since the function pointer would cause recursive translation of bar and we didn't know if that would get us into trouble. We are now smart enough to know that it is fine, so we get this type instead: %struct.foo = type { void (i32)* } Codegen still needs to be prepared for uncooperative types at any place, which is why I let the maximally uncooperative code sit around for awhile to help shake out the bugs. llvm-svn: 135244
* Create a new expression node, SubstNonTypeTemplateParmExpr,John McCall2011-07-1514-86/+128
| | | | | | | | to represent a fully-substituted non-type template parameter. This should improve source fidelity, as well as being generically useful for diagnostics and such. llvm-svn: 135243
* Switch a comment in Rewrite from 'instantiation' to 'expansion'.Chandler Carruth2011-07-151-1/+1
| | | | llvm-svn: 135226
* Switch comments and assert text in AST from 'instantiation' toChandler Carruth2011-07-151-3/+3
| | | | | | 'expansion'. llvm-svn: 135224
* Switch comments about 'macro instantiation' to 'macro expansion' inChandler Carruth2011-07-151-2/+2
| | | | | | ARCMigrate. llvm-svn: 135223
* Remove warnings of constant operands of logical operators from template ↵Richard Trieu2011-07-151-2/+2
| | | | | | | | | | | | | | instantiations. Upon instantiation of template, value-dependent parameters are replaced by equivalent literals, so code like: template<unsigned int A, unsigned int B> struct S { int foo() { int x = A && B; } } will not warn on A && B on every instantiation. This will still warn on other cases inside templates, which will be caught on checking the template definition. llvm-svn: 135222
* Fix false negative reported in PR 10358 by using 'Unknown' in ↵Ted Kremenek2011-07-141-4/+6
| | | | | | -Wuninitialized to avoid cascading warnings. Patch by Kaelyn Uhrain. llvm-svn: 135217
* [arcmt] Don't remove retains/releases on a global variable, flag them with ↵Argyrios Kyrtzidis2011-07-144-11/+22
| | | | | | errors. rdar://9402555. llvm-svn: 135213
* Revert 135177 to fix PR10363.Rafael Espindola2011-07-141-225/+80
| | | | | | | | Revert "For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either." This reverts commit ac420c5053d6aa41d59f782caad9e46e5baaf2c2. llvm-svn: 135210
* [arcmt] Allow -retain of an __unsafe_unretained receiver if the result gets ↵Argyrios Kyrtzidis2011-07-141-1/+2
| | | | | | | | used. Keep the error if the result is unused. rdar://9552694. llvm-svn: 135209
* Teach -Wconversion, -Wsign-compare etc. about division and remainder.John McCall2011-07-141-4/+44
| | | | llvm-svn: 135208
* PR10359: Template declarations which define classes are not permitted to ↵Richard Smith2011-07-141-0/+5
| | | | | | | | | | | | also contain declarators. Previously we would accept code like this: template<typename T> struct S { } f() { return 0; } This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template. Treat this llvm-svn: 135195
* [arcmt] Emit an error for unused -autorelease messages.Argyrios Kyrtzidis2011-07-141-2/+14
| | | | | | | | | | | An unused autorelease is badness. If we remove it the receiver will likely die immediately while previously it was kept alive by the autorelease pool. This is bad practice in general, so leave it and emit an error to force the user to restructure his code. rdar://9599884 llvm-svn: 135193
* For C++11, do more checking of initializer lists up-front, enabling some ↵Sebastian Redl2011-07-141-80/+225
| | | | | | | | | | subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either. This is a first baby step towards supporting generalized initializer lists. This also removes an aggregate test case that was just plain wrong, assuming that non-aggregates couldn't be initialized with initializer lists in C++11 mode. llvm-svn: 135177
* Remove InitializationSequence::ReferenceBinding, the last redundant sequence ↵Sebastian Redl2011-07-141-9/+7
| | | | | | kind. llvm-svn: 135175
* simplifyChris Lattner2011-07-141-1/+1
| | | | llvm-svn: 135170
* StringMap::first() is about to start returning a StringRef, adapt.Chris Lattner2011-07-142-3/+4
| | | | llvm-svn: 135166
* Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer2011-07-147-113/+105
| | | | | | function in LLVM does. llvm-svn: 135155
* Revert r135147 and r135075. The consensus was that this wasn't the right ↵Ted Kremenek2011-07-141-14/+12
| | | | | | thing to do. llvm-svn: 135152
OpenPOWER on IntegriCloud