summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barfDaniel Dunbar2011-05-092-5/+5
| | | | | | | when POSIXLY_COMPLIANT is set. - Patch by Dave Vasilevsky! llvm-svn: 131084
* __builtin_va_list is void* on ARM, not char*.John McCall2011-05-092-1/+6
| | | | | | rdar://problem/9391966 llvm-svn: 131080
* Fix test.Francois Pichet2011-05-081-2/+1
| | | | llvm-svn: 131077
* Allow implicit conversion from function pointer to void* in Microsoft mode. Francois Pichet2011-05-082-1/+20
| | | | | | Necessary to parse MFC code. llvm-svn: 131076
* Move code to emit the callee of an CXXOperatorCallExpr out into a separate ↵Anders Carlsson2011-05-083-12/+137
| | | | | | function in CGClass.cpp llvm-svn: 131075
* Restore an accidentally-deleted word.Alexis Hunt2011-05-081-1/+1
| | | | llvm-svn: 131074
* Don't emit complete constructors for abstract classes. Also, don't emitAnders Carlsson2011-05-082-2/+25
| | | | | | | complete destructors for abstract classes unless the destructor is virtual and thus needs to be in the vtable. llvm-svn: 131068
* Look at all the record redeclaration when looking for a uuid attribute.Francois Pichet2011-05-081-4/+5
| | | | llvm-svn: 131066
* Relax the conversion rules for Objective-C GC qualifiers aDouglas Gregor2011-05-085-5/+62
| | | | | | | | | | | | | | | | | | | | | | bit by allowing __weak and __strong to be added/dropped as part of implicit conversions (qualification conversions in C++). A little history: GCC lets one add/remove/change GC qualifiers just about anywhere, implicitly. Clang did roughly the same before, but we recently normalized the semantics of qualifiers across the board to get a semantics that we could reason about (yay). Unfortunately, this tightened the screws a bit too much for GC qualifiers, where it's common to add/remove these qualifiers at will. Overall, we're still in better shape than we were before: we don't permit directly changing the GC qualifier (e.g., __weak -> __strong), so type safety is improved. More importantly, we're internally consistent in our handling of qualifiers, and the logic that allows adding/removing GC qualifiers (but not adding/removing address spaces!) only touches two obvious places. Fixes <rdar://problem/9402499>. llvm-svn: 131065
* In C++, allow us to emit a global as 'constant' even if it has classDouglas Gregor2011-05-072-7/+20
| | | | | | | type, so long as it is known to have a constant initializer and the class type is a POD class. Fixes <rdar://problem/9306265>. llvm-svn: 131060
* Revert r130717, which caused a regression (<rdar://problem/9402621>).Douglas Gregor2011-05-073-38/+4
| | | | llvm-svn: 131057
* Don't fail at parsing __declspec(property(get=get_func_name)). Just skip ↵Francois Pichet2011-05-071-0/+8
| | | | | | everything inside property() for now while we wait for the BoostPro people to provide a complete patch. llvm-svn: 131053
* PR9866: Fix the implementation of _mm_loadl_pd and _mm_loadh_pd to not makeEli Friedman2011-05-071-2/+2
| | | | | | bad assumptions about the alignment of the double* argument. llvm-svn: 131052
* Temporary preprocessor hack to get around the Microsoft __identifier(x) ↵Francois Pichet2011-05-072-0/+4
| | | | | | | | | | | extension. http://msdn.microsoft.com/en-us/library/hzc8ytsz(v=VS.100).aspx Microsoft doc claims this is a C++/CLI feature but it is really always enabled. This removes 2 error when parsing MFC code with clang. llvm-svn: 131051
* Add support for _if_exists and __if_not_exists at namespace/global scope.Francois Pichet2011-05-074-43/+105
| | | | llvm-svn: 131050
* Patch for PR 7409 - only error on definition of invalid typedefs. Suppress ↵Richard Trieu2011-05-072-3/+38
| | | | | | errors for additional uses of this invalid typedef. llvm-svn: 131043
* Implement a minor optimization by not introducing declarations intoDouglas Gregor2011-05-061-4/+4
| | | | | | DeclContext's lookup table when they aren't in any identifier namespace. llvm-svn: 131037
* When checking for a prior declaration of the name of a namespace, skipDouglas Gregor2011-05-062-4/+29
| | | | | | | | any names that aren't in the appropriate identifier namespaces. Fixes an embarrassing bug where we give a redefinition error due to an Objective-C category (<rdar://problem/9388207>). llvm-svn: 131036
* In ms_struct structs, Establish a new alignment for a Fariborz Jahanian2011-05-062-3/+22
| | | | | | non-bitfield following a bitfield if size of their types differ. llvm-svn: 131032
* Establish a new alignment for an ms_struct bitfield followingFariborz Jahanian2011-05-064-1/+50
| | | | | | a non-bitfield if size of their types differ. llvm-svn: 131023
* Keep track of the file ID corresponding to the original file used toDouglas Gregor2011-05-065-7/+28
| | | | | | | | | | | build a precompiled header. Use this information to eliminate the call to SourceManager::getLocation() while loading a precompiled preamble, since SourceManager::getLocation() itself causes unwanted deserialization. Fixed <rdar://problem/9399352>. llvm-svn: 131021
* Fix false positive warning about uninitialized variable.Cameron Esfahani2011-05-061-1/+1
| | | | llvm-svn: 131019
* Per Richard's suggestion, rename DefLoc to DefaultLoc where it appears.Alexis Hunt2011-05-065-32/+31
| | | | llvm-svn: 131018
* Fix diagnostics to start with a lower case letterAlexis Hunt2011-05-062-3/+3
| | | | llvm-svn: 131017
* Add support for Microsoft __if_exists and __if_not_exists construct inside ↵Francois Pichet2011-05-066-1/+124
| | | | | | | | | | | | function definition. Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols. More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx Support at class and namespace scopes will be added later. llvm-svn: 131014
* Modify some deleted function methods to better reflect reality:Alexis Hunt2011-05-0621-48/+72
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
* Don't emit nsw flags for vector operations; there's basically no benefit, ↵Eli Friedman2011-05-064-64/+61
| | | | | | and a lot of downside (like PR9850, which is about clang's xmmintrin.h making an unexpected transformation on an expression involving _mm_add_epi32). llvm-svn: 131000
* Fix a couple of comments.Eli Friedman2011-05-061-5/+3
| | | | llvm-svn: 130994
* Add an implementation of thunks for varargs methods. The implementation is ↵Eli Friedman2011-05-064-49/+180
| | | | | | a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 . llvm-svn: 130993
* Introduce a new libclang parsing flag,Douglas Gregor2011-05-0613-26/+98
| | | | | | | | | | | | | CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost. Addresses <rdar://problem/9389320>. llvm-svn: 130990
* Reset the emitted initializers.Axel Naumann2011-05-061-0/+2
| | | | | | This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run. llvm-svn: 130986
* Move logic for passing down -mrelax-all / -relax-all into a commonJoerg Sonnenberger2011-05-061-14/+37
| | | | | | | | function. Extend the logic to check if the input was compiled. Use -relax-all as default only if -O0 is used for compilation. Fixes bug 9290. llvm-svn: 130983
* Warn when trying to call a pure virtual member function in a class from the ↵Anders Carlsson2011-05-063-0/+24
| | | | | | class constructor/destructor. Fixes PR7966. llvm-svn: 130982
* Rename ContainsCompileAction to ContainsCompileOrAssembleAction toJoerg Sonnenberger2011-05-061-5/+5
| | | | | | properly reflect its behavior. llvm-svn: 130981
* Do defaulted constructors properly.Alexis Hunt2011-05-069-16/+103
| | | | | | | | Explictly defaultedness is correctly reflected on the AST, but there are no changes to how that affects the definition of functions or much else really. llvm-svn: 130974
* Revert r130912 in order to approach defaulted functions from the otherAlexis Hunt2011-05-0611-78/+15
| | | | | | | direction and not introduce things in the wrong place three different times. llvm-svn: 130968
* Slight tweak to alias template error handling: don't guess that a ↵Richard Smith2011-05-052-3/+3
| | | | | | template-id in an alias declaration was meant to be a specialization. Use a generic, but more accurate, diagnostic. llvm-svn: 130961
* Update www: we now mangle references to function parameters properly. Also, ↵Richard Smith2011-05-051-2/+2
| | | | | | this is really more a decltype issue rather than a late-specified return type issue. llvm-svn: 130958
* type of last arg of objc_assign_ivar is ptrdiff_t. Fariborz Jahanian2011-05-051-1/+5
| | | | | | // rdar://9362887 llvm-svn: 130956
* Implement support for C++0x alias templates.Richard Smith2011-05-0559-138/+1119
| | | | llvm-svn: 130953
* __alignof attribute on the field must considerFariborz Jahanian2011-05-053-13/+14
| | | | | | packed attribute on the field. //rdar://9217290 llvm-svn: 130948
* When the environment variable LIBCLANG_RESOURCE_USAGE is set, teachDouglas Gregor2011-05-053-5/+24
| | | | | | | libclang to emit information about resource usage after parsing, code completion, etc. llvm-svn: 130946
* PR9849: Fix _mm_setr_pi32 and friends to actually work correctly. They ↵Eli Friedman2011-05-051-4/+4
| | | | | | broke with the MMX rewrite a while back. llvm-svn: 130945
* tests: Force a triple in this test (so uint128 is present).Daniel Dunbar2011-05-051-1/+1
| | | | llvm-svn: 130941
* When instantiating a block expression, the instantiatedFariborz Jahanian2011-05-052-2/+39
| | | | | | | blockScopeInfo's CapturesCXXThis field need get set as well. // rdar://9362021. John M. please review. llvm-svn: 130930
* Do not drop uint128 on the floor.Devang Patel2011-05-052-0/+9
| | | | llvm-svn: 130929
* Scoped enumerations should not be treated as integer types (in the CDouglas Gregor2011-05-052-3/+13
| | | | | | | | sense). Fixes <rdar://problem/9366066> by eliminating an inconsistency between C++ overloading (which handled scoped enumerations correctly) and C binary operator type-checking (which didn't). llvm-svn: 130924
* When providing code completions for an Objective-C property access,Douglas Gregor2011-05-053-14/+82
| | | | | | | also include methods with zero-argument selectors. Implements <rdar://problem/9048332>. llvm-svn: 130922
* Introduce a Diagnostic::Report function that accepts and emits a ↵Argyrios Kyrtzidis2011-05-052-0/+47
| | | | | | StoredDiagnostic. llvm-svn: 130919
* Place "incompatible pointer types assigning..." warning under a flag, ↵Ted Kremenek2011-05-051-1/+2
| | | | | | allowing it to be surgically mapped to an error. llvm-svn: 130916
OpenPOWER on IntegriCloud