summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.Richard Smith2012-01-021-2/+4
| | | | | | | Add a test that such characters don't make it through to StringLiteral objects in error recovery. llvm-svn: 147438
* Diagnose cases where the definition of a particular type is required,Douglas Gregor2012-01-022-3/+23
| | | | | | | is known (to Clang), but is not visible because the module has not yet been imported. llvm-svn: 147436
* Fix PR11685 by implementing -ffast-math and its various friends in theChandler Carruth2012-01-021-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | Clang driver. This involves a bunch of silly option parsing code to try to carefully emulate GCC's options. Currently, this takes a conservative approach, and unless all of the unsafe optimizations are enabled, none of them are. The fine grained control doesn't seem particularly useful. If it ever becomes useful, we can add that to LLVM first, and then expose it here. This also fixes a few tiny bugs in the flag management around -fhonor-infinities and -fhonor-nans; the flags now form proper sets both for enabling and disabling, with the last flag winning. I've also implemented a moderately terrifying GCC feature where a language change is also provided by the '-ffast-math' flag by defining the __FAST_MATH__ preprocessor macro. This feature is tracked and serialized in the frontend but it isn't used yet. A subsequent patch will add the preprocessor macro and tests for it. I've manually tested that codegen appears to respect this, but I've not dug in enough to see if there is an easy way to test codegen options w/o relying on the particulars of LLVM's optimizations. llvm-svn: 147434
* Small cosmetic cleanups in code I will change anyway.Rafael Espindola2012-01-021-1/+1
| | | | llvm-svn: 147424
* Implement declaration merging for Objective-C protocols acrossDouglas Gregor2012-01-014-0/+20
| | | | | | | multiple, disjoint modules. There is far too much duplicating with the ObjCInterfaceDecl case here, which I'll eliminate shortly. llvm-svn: 147417
* Wire up redeclaration chains for Objective-C protocols, so that bothDouglas Gregor2012-01-015-0/+29
| | | | | | | forward declarations and definitions of an Objective-C protocol are represented within a single chain of ObjCProtocolDecls. llvm-svn: 147412
* Consider visibility attributes in namespaces as being explicit. I.e., theyRafael Espindola2012-01-011-0/+12
| | | | | | take precedence over command line options. Fixes PR10113. llvm-svn: 147405
* Implement support for module requirements, which indicate the languageDouglas Gregor2011-12-314-0/+21
| | | | | | | | | features needed for a particular module to be available. This allows mixed-language modules, where certain headers only work under some language variants (e.g., in C++, std.tuple might only be available in C++11 mode). llvm-svn: 147387
* Split out clang/test/Driver/debug-options-as.c from debug-options.c, and ↵NAKAMURA Takumi2011-12-312-7/+10
| | | | | | | | mark it as XFAIL: mingw32. Mingw32 target has not supported integrated-as yet. llvm-svn: 147386
* Fix crash when trying to pretty-print unicode or wide string literals.Richard Smith2011-12-301-0/+14
| | | | llvm-svn: 147385
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-306-16/+57
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* Add FMA4 intrinsics.Craig Topper2011-12-301-0/+166
| | | | llvm-svn: 147372
* Add test for PRr11676.Rafael Espindola2011-12-301-0/+8
| | | | llvm-svn: 147363
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-306-57/+16
| | | | llvm-svn: 147362
* Change the diagnostics which said 'accepted as an extension' to instead sayRichard Smith2011-12-2918-50/+49
| | | | | | | 'is an extension'. The former is inappropriate and confusing when building with -Werror/-pedantic-errors. llvm-svn: 147357
* Add popcnt feature flag to match gcc. This flag is implied when sse42 is ↵Craig Topper2011-12-291-0/+16
| | | | | | enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc. llvm-svn: 147340
* Support for thread safety attributes on functionsDeLesley Hutchins2011-12-291-0/+22
| | | | llvm-svn: 147331
* Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer2011-12-281-2/+2
| | | | | | | | | with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". llvm-svn: 147311
* Support the 'a' scanf length modifier as an extension in C++.Hans Wennborg2011-12-282-0/+28
| | | | | | | It should not be supported in C++11, since that uses the C99 standard library, in which 'a' is a format specifier. llvm-svn: 147310
* Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor2011-12-275-5/+6
| | | | | | | covers both declarations (@class) and definitions (@interface) of an Objective-C class. llvm-svn: 147299
* Fix the visibility of methods of explicit template instantiation definitionRafael Espindola2011-12-271-0/+11
| | | | | | | | | when using -fvisibility-inlines-hidden. This matches gcc's behavior and documentation. Fixes PR11642. llvm-svn: 147295
* constexpr: support for evaluation and codegen of typeid constants.Richard Smith2011-12-273-3/+53
| | | | llvm-svn: 147290
* Delay checking of typedefs of dependent types. Fixes PR11630.Rafael Espindola2011-12-261-0/+34
| | | | llvm-svn: 147281
* Add BMI2 intrinsics.Craig Topper2011-12-261-0/+36
| | | | llvm-svn: 147275
* Fix constexpr handling to allow 'extern constexpr' variable declarations. We noRichard Smith2011-12-252-35/+10
| | | | | | | longer have access to the source locations we need to produce the 'replace constexpr with const' fixits, so they're gone for now. llvm-svn: 147273
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-256-16/+57
| | | | | | constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271
* Change LZCNT and BMI tests to check IR instead of X86 assembly.Craig Topper2011-12-252-18/+26
| | | | llvm-svn: 147267
* Add the rest of the BMI intrinsics.Craig Topper2011-12-251-6/+53
| | | | llvm-svn: 147265
* Add intrinsics for lzcnt and tzcnt instructions.Craig Topper2011-12-252-0/+48
| | | | llvm-svn: 147263
* Always implicitly declare move assignment operations for dynamic classes, inRichard Smith2011-12-241-0/+12
| | | | | | | case they override virtual functions from a base class. Also fix -print-stats counting of move assignment/construction. llvm-svn: 147258
* Add last of the AVX2 intrinsics except for gather.Craig Topper2011-12-241-0/+100
| | | | llvm-svn: 147253
* Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in ↵Craig Topper2011-12-241-1/+66
| | | | | | other intrinsic headers. llvm-svn: 147242
* Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.Craig Topper2011-12-241-0/+35
| | | | llvm-svn: 147240
* Intrinsics for AVX2 unpack instructions.Craig Topper2011-12-241-0/+40
| | | | llvm-svn: 147237
* More AVX2 intrinsics for shift, psign, some shuffles, and psadbw.Craig Topper2011-12-241-82/+207
| | | | llvm-svn: 147236
* Fix several issues related to specializations and explicit instantiations.Nico Weber2011-12-231-0/+128
| | | | | | | | | | | | | | | Explicit instantiations following specializations are no-ops and hence have no PointOfInstantiation. That was done correctly in most cases, but for a specialization -> instantiation decl -> instantiation definition chain, the definition didn't realize that it was a no-op. Fix that. Also, when printing diagnostics for these no-ops, get the diag location from the decl name location. Add many test cases, one of them not yet passing (but it failed the same way before this change). Fixes http://llvm.org/pr11558 and more. llvm-svn: 147225
* Add AVX2 multiply intrinsics.Craig Topper2011-12-231-0/+35
| | | | llvm-svn: 147219
* Pass context and access to Parser::ParseExplicitInstantiation() forArgyrios Kyrtzidis2011-12-231-0/+8
| | | | | | | | good parser error recovery and for not crashing. We still have a accepts-invalid-code bug. llvm-svn: 147216
* objective-c: Use class definition AST in several situations whenFariborz Jahanian2011-12-231-0/+13
| | | | | | | building related objc ASTs which require a class definition AST. These were uncovered when testing objc rewriter. llvm-svn: 147210
* When building a module with an umbrella header, warn about any headersDouglas Gregor2011-12-232-3/+7
| | | | | | | | found within that umbrella directory that were not actually included by the umbrella header. They should either be referenced in the module map or included by the umbrella header. llvm-svn: 147207
* Colorize and condense CFG pretty-printing.Ted Kremenek2011-12-224-1468/+1398
| | | | llvm-svn: 147203
* Add -Wdangling-else.Nico Weber2011-12-221-0/+55
| | | | | | | This works like described in http://drdobbs.com/blogs/cpp/231602010 Fixes http://llvm.org/PR11609 llvm-svn: 147202
* Serialize the AST reader's mapping from canonical declarations to theDouglas Gregor2011-12-223-1/+10
| | | | | | | | | | | | | | | | set of (previously-canonical) declaration IDs to the module file, so that future AST reader instances that load the module know which declarations are merged. This is important in the fairly tricky case where a declaration of an entity, e.g., @class X; occurs before the import of a module that also declares that entity. We merge the declarations, and record the fact that the declaration of X loaded from the module was merged into the (now canonical) declaration of X that we parsed. llvm-svn: 147181
* Add missing triple to darwin clang driver test.Kevin Enderby2011-12-221-1/+1
| | | | llvm-svn: 147179
* If we end up merging an Objective-C class with an existing Objective-CDouglas Gregor2011-12-225-0/+26
| | | | | | | class that comes from a different module file, make sure that we load all of the pending declarations for the original declaration. llvm-svn: 147168
* Last part of support for generating dwarf for assembly source files. This getsKevin Enderby2011-12-222-0/+11
| | | | | | the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 147167
* Overloading for initializer list construction.Sebastian Redl2011-12-221-5/+20
| | | | llvm-svn: 147156
* Fix a parser bug that prevented it from correctly parsing explicit construct ↵Sebastian Redl2011-12-221-1/+1
| | | | | | expressoins of the form T{args}. llvm-svn: 147155
* List-initialization via constructor part 1. Still needs: pretty-printing, ↵Sebastian Redl2011-12-223-28/+94
| | | | | | overloading, initializer_list. llvm-svn: 147145
* Add AVX2 intrinsics for max, min, sign extend, and zero extend.Craig Topper2011-12-221-0/+125
| | | | llvm-svn: 147141
OpenPOWER on IntegriCloud