summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add _mm_stream_si64 intrinsic.Eli Friedman2013-09-232-1/+23
| | | | | | | | | While I'm here, also fix the alignment computation for the whole family of intrinsics. PR17298. llvm-svn: 191243
* Add tests on how clang currently handles some unknown options.Rafael Espindola2013-09-231-0/+7
| | | | | | | This is not to say this is the desired behavior, but it makes sure we notice if it changes. llvm-svn: 191242
* ObjectiveC migrator. When migrating to property declarationFariborz Jahanian2013-09-231-12/+12
| | | | | | | use Cocoa's naming convention for properties of ObjC object type. // rdar://15045005 llvm-svn: 191240
* ObjectiveC migrator: Infer NS_OPTIONS when if there is atFariborz Jahanian2013-09-232-0/+116
| | | | | | | | least one hex enumerator, all others are also hex enumerator (0 enumerator is excepted). // rdar://15044304 llvm-svn: 191222
* Enable -fsanitize=use-after-return by default under -fsanitize=addressKostya Serebryany2013-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: We enable ASAN's use-after-return instrumentation at compile-time, but still keep it disabled at run-time. This enables the users to flip the flag at run-time using environment variable ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build. If UAR detection is disabled at run-time, this extra compile-time instrumentation costs very small slowdown. On SPEC 2006 14 tests are not affected at all, 4 tests get ~ 1% slowdown and 453.povray gets 4%. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1741 llvm-svn: 191186
* PR16529: Don't forget to add the CXXFunctionalCastExpr type sugar to anRichard Smith2013-09-231-0/+8
| | | | | | | InitListExpr for a C++11-style T{...} construction, if initialization registered a destructor for it. llvm-svn: 191182
* Parse: Don't crash during parsing if we lack a simple-type-specifierDavid Majnemer2013-09-221-0/+8
| | | | | | | | | | | | | | | | | Summary: Parsing cast expressions during error recovery can put us in a bad state. Check to see if the token for a simple-type-specifier makes sense before further parsing. Fixes PR17255. Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1696 llvm-svn: 191159
* ObjectiveC: ObjC declarations, including forward classFariborz Jahanian2013-09-221-4/+4
| | | | | | and protocols can be at global scope only. llvm-svn: 191155
* PR17295: Do not allow explicit conversion functions to be used in cases whereRichard Smith2013-09-211-7/+74
| | | | | | | | | | an additional conversion (other than a qualification conversion) would be required after the explicit conversion. Conversely, do allow explicit conversion functions to be used when initializing a temporary for a reference binding in direct-list-initialization. llvm-svn: 191150
* [Mips] Allocate NaClTargetInfo for MIPSEL NaClPetar Jovanovic2013-09-211-0/+45
| | | | | | | | A patch to AllocateTarget function to recognize llvm::Triple::NaCl for MIPSEL and return NaClTargetInfo. Additional test has been added to check if the expected macros get defined. llvm-svn: 191124
* Fix return type of _mm_extract_epi8 etc.Eli Friedman2013-09-211-0/+7
| | | | | | PR17300. llvm-svn: 191120
* Switch tests in test/Headers to use %clang_cc1 rather than %clang. ThereChandler Carruth2013-09-208-14/+16
| | | | | | | | is no need to go through the driver indirection here, and it clutters things up as dependencies can sneak in for specific things the driver is doing. llvm-svn: 191107
* Use -fms-compatibility to trigger lookup into dep. basesReid Kleckner2013-09-201-1/+1
| | | | | | | Update the docs for -fms-extensions and -fms-compatibility to try to clarify the difference between the two. llvm-svn: 191095
* [ASan] Fix darwin-sanitizer-ld.c to test for the new order of linker flags ↵Alexander Potapenko2013-09-201-5/+2
| | | | | | introduced by r191076. llvm-svn: 191077
* Modify the uninitialized field visitor to detect uninitialized use across theRichard Trieu2013-09-206-7/+114
| | | | | | | | | | | | | | | | | | fields in the class. This allows a better checking of member intiailizers and in class initializers in regards to initialization ordering. For instance, this code will now produce warnings: class A { int x; int y; A() : x(y) {} // y is initialized after x, warn here A(int): y(x) {} // default initialization of leaves x uninitialized, warn here }; Several test cases were updated with -Wno-uninitialized to silence this warning. llvm-svn: 191068
* Testcase I forgot to svn add in r191057.Richard Smith2013-09-201-0/+25
| | | | llvm-svn: 191067
* Switch the semantic DeclContext for a block-scope declaration of a function orRichard Smith2013-09-2011-37/+204
| | | | | | | | | | | | | | variable from being the function to being the enclosing namespace scope (in C++) or the TU (in C). This allows us to fix a selection of related issues where we would build incorrect redeclaration chains for such declarations, and fail to notice type mismatches. Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern, which is only found when searching scopes, and not found when searching DeclContexts. Such a declaration is only made visible in its DeclContext if there are no non-LocalExtern declarations. llvm-svn: 191064
* clang-cl: implement /fallback modeHans Wennborg2013-09-191-0/+22
| | | | | | | | | | | | | When this flag is enabled, clang-cl falls back to cl.exe if it cannot compile the code itself for some reason. The idea is to use this to help build projects that almost compile with clang-cl, except for some files that can then be built with the fallback mechanism. Differential Revision: http://llvm-reviews.chandlerc.com/D1711 llvm-svn: 191034
* Refinement to my previous patch forFariborz Jahanian2013-09-191-0/+2
| | | | | | objc_returns_inner_pointer on properties. // rdar://14990439 llvm-svn: 191016
* ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation Fariborz Jahanian2013-09-192-2/+50
| | | | | | | | | | of ObjectiveC properties to mean annotation of NS_RETURNS_INNER_POINTER on its synthesized getter. This also facilitates more migration to properties when methods are annotated with NS_RETURNS_INNER_POINTER. // rdar://14990439 llvm-svn: 191009
* Fix ifdef macro missed in previous commitBen Langmuir2013-09-191-2/+2
| | | | llvm-svn: 191003
* [ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.Amara Emerson2013-09-191-0/+5
| | | | llvm-svn: 191001
* Add C intrinsics for Intel SHA ExtensionsBen Langmuir2013-09-193-0/+60
| | | | | | | | | Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is enabled. SHA implies SSE2, which is needed for the __m128i type. Also add the -msha/-mno-sha option. llvm-svn: 190999
* Use -ffreestanding in ms-intrin.cpp and define size_t manually.Reid Kleckner2013-09-191-5/+5
| | | | llvm-svn: 190985
* Fix crash with cast of value-dependent expr.Eli Friedman2013-09-191-0/+7
| | | | | | | | | We don't really need to perform semantic analysis on the dependent expression anyway, so just call the cast dependent. <rdar://problem/15012610> llvm-svn: 190981
* Make Preprocessor::Lex non-recursive.Eli Friedman2013-09-193-6/+26
| | | | | | | | | | | | | | | Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> llvm-svn: 190980
* Avoid including <stdlib.h> in the intrin.h testReid Kleckner2013-09-191-0/+5
| | | | llvm-svn: 190979
* Fix ifdef ordering at the end of Intrin.h from r190965Reid Kleckner2013-09-191-0/+6
| | | | | | Test that intrin.h at least parses in C++ TUs. llvm-svn: 190978
* Disabling sse2 should disable aes and pclmul support.Craig Topper2013-09-191-0/+24
| | | | llvm-svn: 190977
* Add specific warning flags for GNU ext in Sema.Eli Friedman2013-09-184-17/+179
| | | | | | | | | | | | | | | | | | | This patch adds the following, more specific warning flags: gnu-anonymous-struct gnu-compound-literal-initializer gnu-empty-struct gnu-flexible-array-initializer gnu-flexible-array-union-member gnu-folding-constant redeclared-class-member gnu-redeclared-enum gnu-union-cast gnu-variable-sized-type-not-at-end Patch by Peter Lewis. llvm-svn: 190972
* Remove a bogus diagnostic preventing static data member templates from beingRichard Smith2013-09-181-6/+5
| | | | | | defined with no initializer. llvm-svn: 190970
* clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.Hans Wennborg2013-09-182-3/+0
| | | | | | | | | | | | | | | | I put in the warnings because MSVC has them, but I don't think they're very useful. Clang does not warn about overriding flags in general, e.g. it's perfectly fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer. We should focus on warning where things get confusing, such as with the /TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not realize that the /TP flag will apply to both files, and we warn about that. Differential Revision: http://llvm-reviews.chandlerc.com/D1718 llvm-svn: 190964
* Debug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.Adrian Prantl2013-09-181-1/+1
| | | | | | | This allows us to get rid of an ugly hack in the backend. Paired commit with LLVM. llvm-svn: 190960
* ObjectiveC migrator: For consistency, also inferFariborz Jahanian2013-09-182-23/+23
| | | | | | | | 'instancetype' for known family of methods with related result type; such as 'init' methods. // rdar://14987948 llvm-svn: 190956
* [analyzer] Don't even try to convert floats to booleans for now.Jordan Rose2013-09-181-0/+12
| | | | | | | | | | | We now have symbols with floating-point type to make sure that (double)x == (double)x comes out true, but we still can't do much with these. For now, don't even bother trying to create a floating-point zero value; just give up on conversion to bool. PR14634, C++ edition. llvm-svn: 190953
* ObjectiveC migrator: Infer property in the presenseFariborz Jahanian2013-09-182-2/+66
| | | | | | | of methods annotated with attributes. // rdar://14987909 llvm-svn: 190947
* [ARMv8] Add builtins for CRC instructions.Joey Gouly2013-09-182-0/+74
| | | | | | Patch by Bradley Smith! llvm-svn: 190931
* Recommited:Stepan Dyatkovskiy2013-09-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Fix for PR16752. Second commit. PR16752: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width. 2. Fix handleModeAttr according to new methods in TargetInfo. Fixes: 1st Commit (Done): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function. Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines. llvm-svn: 190926
* Add support for poly16 vtst and vtstqAmaury de la Vieuville2013-09-182-0/+24
| | | | | | | vtst and vtstq currently support poly8 types, but they should also work on poly16. llvm-svn: 190925
* Add new libm LIBBUILTIN definitions, synchronizing with __builtin_*Hal Finkel2013-09-181-99/+479
| | | | | | | | | | | | For all libm __builtin_* functions that are defined, this adds the corresponding LIBBUILTIN definitions (tagged, as necessary, with "e" instead of "c" when the function may set errno). Note that this changes the current definitions for lrint and fma (unfortunately). The Linux man page documents that these don't set errno, but the POSIX standard says that they should. llvm-svn: 190922
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-184-0/+136
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* Fix accepts-invalid if a variable template explicit instantiation is missing anRichard Smith2013-09-182-2/+5
| | | | | | argument list, but could be instantiated with argument list of <>. llvm-svn: 190913
* Fix ObjC @encode for C++ classes w/virtual bases.Eli Friedman2013-09-181-0/+10
| | | | | | PR17142. llvm-svn: 190912
* If a variable template specialization with an incomplete array type isRichard Smith2013-09-181-3/+33
| | | | | | referenced, try to instantiate its definition in order to complete the type. llvm-svn: 190910
* Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""David Majnemer2013-09-171-0/+29
| | | | | | This reverts commit r190895 which reverted r190892. llvm-svn: 190904
* ObjectiveC migrator. infer NS_OPTIONS correctly in theFariborz Jahanian2013-09-172-0/+40
| | | | | | presense of parenthesized enumerator initializers. llvm-svn: 190901
* clang-cl: ignore ths /GS- flagHans Wennborg2013-09-171-1/+1
| | | | | | | | The /GS- flag is used to turn off run-time buffer security checks (/GS). Since no such checks are enabled in the first place, I think we should just ignore this flag. llvm-svn: 190900
* Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"David Majnemer2013-09-171-29/+0
| | | | | | This reverts commit r190892. llvm-svn: 190895
* [-cxx-abi microsoft] Mangle local TagDecls appropriatelyDavid Majnemer2013-09-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: When selecting a mangling for an anonymous tag type: - We should first try it's typedef'd name. - If that doesn't work, we should mangle in the name of the declarator that specified it as a declaration specifier. - If that doesn't work, fall back to a static mangling of <unnamed-type>. This should make our anonymous type mangling compatible. This partially fixes PR16994; we would need to have an implementation of scope numbering to get it right (a separate issue). Reviewers: rnk, rsmith, rjmccall, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1540 llvm-svn: 190892
* ObjectiveC migrator. Ignore migrating 'deprecated'Fariborz Jahanian2013-09-177-10/+78
| | | | | | entities. // rdar://14989365 llvm-svn: 190890
OpenPOWER on IntegriCloud