summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger2011-05-131-0/+12
| | | | | | | mangled to avoid doing it twice for platforms that use prefixes like Darwin. llvm-svn: 131311
* Introduce __has_extension macroPeter Collingbourne2011-05-133-0/+86
| | | | | | | | | | | | | | | __has_extension is a function-like macro which takes the same set of feature identifiers as __has_feature. It evaluates to 1 if the feature is supported by Clang in the current language (either as a language extension or a standard language feature) or 0 if not. At the same time, add support for the C1X feature identifiers c_generic_selections (renamed from generic_selections) and c_static_assert, and document them. Patch by myself and Jean-Daniel Dupas. llvm-svn: 131308
* Remove the 'unaligned load' builtins now that they're no longer used in the ↵Bill Wendling2011-05-131-3/+0
| | | | | | *mmintrin.h files. llvm-svn: 131300
* Add c-index-test printing and tests for static and virtual methodDouglas Gregor2011-05-133-25/+25
| | | | | | query functions, from Erik Verbruggen! llvm-svn: 131295
* When determining whether we can make a declaration into a globalDouglas Gregor2011-05-131-0/+12
| | | | | | | constant, also consider whether it's a class type that has any mutable fields. If so, it can't be a global constant. llvm-svn: 131276
* Implement a few basic tests for defaulted and deleted functions.Alexis Hunt2011-05-134-8/+49
| | | | | | | More comprehensive testing once copy {constructors,assignment operators} can be defaulted. llvm-svn: 131275
* Implement the __is_trivially_copyable type traitAlexis Hunt2011-05-132-0/+92
| | | | llvm-svn: 131270
* Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.Devang Patel2011-05-123-3/+3
| | | | | | s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g llvm-svn: 131245
* Do not add AT_APPLE_objc_class_extension attribute if @implementation is not ↵Devang Patel2011-05-121-0/+12
| | | | | | seen. llvm-svn: 131242
* enable __has_feature(is_standard_layout)Howard Hinnant2011-05-121-0/+5
| | | | llvm-svn: 131240
* Use DW_AT_APPLE_objc_class_extension attribute to identify interfaces that ↵Devang Patel2011-05-122-0/+29
| | | | | | | | represent class extension. Radar 9423077. llvm-svn: 131239
* LLVM doesn't always optimize away the four loads from this:Bill Wendling2011-05-121-0/+2
| | | | | | | | | | (__m128){ p[0], p[1], p[2], p[3] } which produces really bad code. This could be done in instcombine, but it's probably better to do it in the front-end instead. <rdar://problem/9424836> llvm-svn: 131237
* PR9899: handle pseudo-destructors correctly in noexcept() expressions.Eli Friedman2011-05-121-0/+3
| | | | llvm-svn: 131220
* Fix PR9902: correctly substitute alias templates within the template in ↵Richard Smith2011-05-121-0/+28
| | | | | | which they are defined: provide an empty list of arguments for each containing template context during substitution. llvm-svn: 131211
* Implement CWG1170, which makes access-control errors into templateDouglas Gregor2011-05-111-0/+41
| | | | | | | argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. llvm-svn: 131209
* When checking for the necessary 'template<>' headers based on theDouglas Gregor2011-05-113-0/+46
| | | | | | | | | | nested of an out-of-line declaration, only require a 'template<>' header for each enclosing class template that hasn't been previously specialized; previously, we were requiring 'template<>' for enclosing class templates and members of class templates that hadn't been previously specialized. Fixes <rdar://problem/9422013>. llvm-svn: 131207
* Add a Microsoft C test following r131201.Francois Pichet2011-05-111-0/+8
| | | | llvm-svn: 131202
* In Microsoft mode, allow conversion from pointer to integral type no matter ↵Francois Pichet2011-05-111-0/+8
| | | | | | | | | | | what size the integral type is. Necessary to parse MFC code. Example: void f(char *ptr) { char var = (char)ptr; } llvm-svn: 131201
* Clean up consequences of cut and paste.Fariborz Jahanian2011-05-111-69/+69
| | | | llvm-svn: 131190
* Implenment #pack pragma and ms_struct attribute layout.Fariborz Jahanian2011-05-111-20/+111
| | | | | | Concludes // radar://8823265. llvm-svn: 131188
* Teach CFG building how to deal with CXXMemberCallExprs and BoundMemberTy,John McCall2011-05-111-0/+17
| | | | | | | then teach -Wreturn-type to handle the same. Net effect: we now correctly handle noreturn attributes on member calls in the CFG. llvm-svn: 131178
* PR9882: Fix noexcept to deal with dependent new, delete, calls, andEli Friedman2011-05-111-0/+10
| | | | | | dynamic_cast correctly. llvm-svn: 131177
* In Microsoft mode, allow pure specifier (=0) on inline functions declared at ↵Francois Pichet2011-05-111-0/+5
| | | | | | | | | | | | | class scope. This removes 2 errors when parsing MFC code with clang Example: class A { virtual void f() = 0 { } } llvm-svn: 131175
* Use a heralded conversion to bool in inline-asm constraints.John McCall2011-05-101-0/+8
| | | | llvm-svn: 131170
* Fix crash in -Wuninitialized when using switch statments whose condition is ↵Ted Kremenek2011-05-101-0/+13
| | | | | | a logical operation. llvm-svn: 131158
* Tweak the diagnostics for the C++0x extensions to friend types to noteDouglas Gregor2011-05-103-6/+6
| | | | | | | | that they are C++0x extensions, and put them in the appropriate group. We already support most of the semantics. Addresses <rdar://problem/9407525>. llvm-svn: 131153
* Change magic string "abc" to better magic string "qux".Matt Beaumont-Gay2011-05-101-6/+2
| | | | | | | | | | | | | Wait, what? So, we run Clang (and LLVM) tests in an environment where the md5sum of the input files becomes a component of the path. When testing the preprocessor, the path becomes part of the output (in line directives). In this test, we were grepping for the absence of "abc" in the output. When the stars aligned properly, the md5sum component of the path contained "abc" and the test failed. Oops. llvm-svn: 131147
* Re-do R131114 without breaking code.Alexis Hunt2011-05-102-4/+4
| | | | | | | | | I've edited one diagnostic which would print "copy constructor" for copy constructors and "constructor" for any other constructor. If anyone is extremely enamored with this, it can be reinstated with a simple boolean flag rather than calling getSpecialMember, which is inappropriate. llvm-svn: 131143
* Support pack pragma and ms_struct attributes. // rdar://8823265Fariborz Jahanian2011-05-101-0/+34
| | | | llvm-svn: 131142
* Elide __label__ declarations from the CFG. This resolves a crash in ↵Ted Kremenek2011-05-101-0/+11
| | | | | | CFGRecStmtDeclVisitor (crash in static analyzer). llvm-svn: 131141
* Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based onDouglas Gregor2011-05-102-3/+169
| | | | | | | | | | | | | | | | | | the semantic context referenced by the nested-name-specifier rather than the syntactic form of the nested-name-specifier. The previous incarnation was based on my complete misunderstanding of C++ [temp.expl.spec]. The latest C++0x working draft clarifies the requirements here, and this rewrite is intended to follow that. Along the way, improve source location information in the diagnostics. For example, if we report that a specific type needs or doesn't need a 'template<>' header, we dig out that type in the nested-name-specifier and highlight its range. Fixes: PR5907, PR9421, PR8277, PR8708, PR9482, PR9668, PR9877, and <rdar://problem/9135379>. llvm-svn: 131138
* Add test for PR9884.Rafael Espindola2011-05-101-0/+17
| | | | llvm-svn: 131127
* Add a __uuidof test where the uuid attribute is on the second declaration. Francois Pichet2011-05-101-7/+17
| | | | | | Also some -fdelayed-template-parsing test refactoring. llvm-svn: 131113
* Ignore const/volatile/restrict qualifiers on anonymous structs andDouglas Gregor2011-05-091-4/+26
| | | | | | unions. Fixes PR8326. llvm-svn: 131109
* 'long long' requires special treatment in ms_structFariborz Jahanian2011-05-091-1/+11
| | | | | | structs (impacts 32-bit only though). llvm-svn: 131103
* Extend the tag-ambiguity hack I committed in r130810 for tagDouglas Gregor2011-05-091-0/+11
| | | | | | definitions to also include tag declarations. Fixes PR8151. llvm-svn: 131102
* Clean up trivial default constructors now.Alexis Hunt2011-05-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | hasTrivialDefaultConstructor() really really means it now. Also implement a fun standards bug regarding aggregates. Doug, if you'd like, I can un-implement that bug if you think it is truly a defect. The bug is that non-special-member constructors are never considered user-provided, so the following is an aggregate: struct foo { foo(int); }; It's kind of bad, but the solution isn't obvious - should struct foo { foo (int) = delete; }; be an aggregate or not? Lastly, add a missing initialization to FunctionDecl. llvm-svn: 131101
* When determining whether we need to instantiate a function type,Douglas Gregor2011-05-091-0/+22
| | | | | | | also consider whether any of the parameter types (as written, prior to decay) are dependent. Fixes PR9880 and <rdar://problem/9408413>. llvm-svn: 131099
* Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barfDaniel Dunbar2011-05-091-2/+2
| | | | | | | when POSIXLY_COMPLIANT is set. - Patch by Dave Vasilevsky! llvm-svn: 131084
* __builtin_va_list is void* on ARM, not char*.John McCall2011-05-091-0/+5
| | | | | | 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-081-1/+11
| | | | | | Necessary to parse MFC code. llvm-svn: 131076
* Don't emit complete constructors for abstract classes. Also, don't emitAnders Carlsson2011-05-081-0/+16
| | | | | | | complete destructors for abstract classes unless the destructor is virtual and thus needs to be in the vtable. llvm-svn: 131068
* Relax the conversion rules for Objective-C GC qualifiers aDouglas Gregor2011-05-083-2/+46
| | | | | | | | | | | | | | | | | | | | | | 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-071-0/+10
| | | | | | | 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-071-20/+0
| | | | llvm-svn: 131057
* Temporary preprocessor hack to get around the Microsoft __identifier(x) ↵Francois Pichet2011-05-071-0/+3
| | | | | | | | | | | 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-071-6/+16
| | | | llvm-svn: 131050
* Patch for PR 7409 - only error on definition of invalid typedefs. Suppress ↵Richard Trieu2011-05-071-0/+31
| | | | | | errors for additional uses of this invalid typedef. llvm-svn: 131043
* When checking for a prior declaration of the name of a namespace, skipDouglas Gregor2011-05-061-0/+14
| | | | | | | | 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
OpenPOWER on IntegriCloud