summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix Incorrect CHECK message [0-31]+ in test case.Kevin Qin2013-12-122-501/+501
| | | | | | | In regular expression, [0-31]+ equals to [0-3]+, not the number from 0 to 31. So change it to [0-9]+. llvm-svn: 197112
* Revert r197076: "[objcmt] When emitting a remap file, use a json formatHans Wennborg2013-12-126-60/+0
| | | | | | | | | | | | | | | | | | with the edit entries, instead of applying the changes" (And also revert the follow-up r197086.) This seems to have broken Linux builds, which were failing with the following: /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::ObjCMethodDecl const*)' /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::FunctionDecl const*)' collect2: error: ld returned 1 exit status llvm-svn: 197111
* Added a Subjects clause to the section attribute and made its diagnostics ↵Aaron Ballman2013-12-121-1/+3
| | | | | | more consistent with other attributes. llvm-svn: 197104
* PR18217: Rewrite JumpDiagnostics' handling of temporaries, to correctly handleRichard Smith2013-12-121-2/+116
| | | | | | | | | declarations that might lifetime-extend multiple temporaries. In passing, fix a crasher (PR18217) if an initializer was dependent and exactly the wrong shape, and remove a bogus function (Expr::findMaterializedTemporary) now its last use is gone. llvm-svn: 197103
* Objective-C migrator: when inferring 'readonly' property of anFariborz Jahanian2013-12-123-3/+3
| | | | | | | Objective-C object conforming to 'NSCopying' protocol, infer a 'copy' property, instead of 'strong'. // rdar://15525937 llvm-svn: 197102
* Add CFG tests for switch's involving "extended" enum.Ted Kremenek2013-12-111-1/+129
| | | | llvm-svn: 197094
* Change semantics of regex expectations in the diagnostic verifierHans Wennborg2013-12-1121-49/+49
| | | | | | | | | | | | | | | | | | | | | | | Previously, a line like // expected-error-re {{foo}} treats the entirety of foo as a regex. This is inconvenient when matching type names containing regex characters. For example, to match "void *(class test8::A::*)(void)" inside such a regex, one would have to type "void \*\(class test8::A::\*\)\(void\)". This patch changes the semantics of expected-error-re to only treat the parts of the directive wrapped in double curly braces as regexes. This avoids the escaping problem and leads to nicer patterns for those cases; see e.g. the change to test/Sema/format-strings-scanf.c. (The balanced search for closing }} of a directive also makes us handle the full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.) Differential Revision: http://llvm-reviews.chandlerc.com/D2388 llvm-svn: 197092
* No longer accepting attribute spellings with prefix and suffix underscores ↵Aaron Ballman2013-12-112-0/+5
| | | | | | except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes. llvm-svn: 197082
* [objcmt] When emitting a remap file, use a json format with the edit ↵Argyrios Kyrtzidis2013-12-116-0/+60
| | | | | | | | | | | entries, instead of applying the changes to a temp file directly. This allows to combine the edits when they can be different based on whether you saw the implementation or not, e.g. with the designated initializer migration. llvm-svn: 197076
* [objcmt] When whitelisting the headers we want to modify, allow changing theArgyrios Kyrtzidis2013-12-115-2/+40
| | | | | | | | | | the ObjC implementation declarations, just don't change implementations for classes that are not in the whitelisted headers. For example, if we change a method to return 'instancetype' we should also update the method definition in the implementation. llvm-svn: 197075
* [ms-cxxabi] Fix linkage of dtor thunks for anonymous classesReid Kleckner2013-12-111-0/+15
| | | | | | | | | | We were mistakengly giving linkonce_odr linkage instead of internal linkage to the deleting and complete destructor thunks for classes in anonymous namespaces. Fixes PR17273. llvm-svn: 197060
* Better diagnostic for static override when methods are thiscall by defaultHans Wennborg2013-12-111-1/+2
| | | | | | | | | | | | | | | | | | Methods are thiscall by default in the MS ABI, and also in MinGW targetting GCC 4.7 or later. This changes the diagnostic from the technically correct but hard to understand: virtual function 'foo' has different calling convention attributes ('void ()') than the function it overrides (which has calling convention 'void () __attribute__((thiscall))') to the more intuitive and also correct: 'static' member function 'foo' overrides a virtual function We already have a test for this. Let's just run it in both ABI modes. Differential Revision: http://llvm-reviews.chandlerc.com/D2375 llvm-svn: 197055
* Add file missing from r197034.Daniel Jasper2013-12-111-0/+1
| | | | llvm-svn: 197035
* Modules: Let -fmodules-decluse ignore headers that aren't in a moduleDaniel Jasper2013-12-111-1/+2
| | | | | | | | | | | Includes might always pull in arbitrary header or data files outside of modules. Among others, this includes builtin includes, which do not have a module (story) yet. Also cleanup implementation of ModuleMap::findModuleForHeader() to be non-recursive. llvm-svn: 197034
* Turning IAS on by default on ARM/ThumbRenato Golin2013-12-111-2/+2
| | | | | | | | | | | | This is an experimental feature, where -integrated-as will be on by default on ARM/Thumb. We aim to detect the missing features so that the next release is stable. Updating the ReleaseNotes, too. Also moving the AArch64 into the same place. llvm-svn: 197024
* Change layering warning tests to not actually build modules.Daniel Jasper2013-12-113-3/+5
| | | | | | | | | | | | | Specifically, we want to warn only for direct layering violations for the modules we are calling clang on. This temporarily unblocks http://llvm-reviews.chandlerc.com/D2374 Once that is in, we'll also want to investigate whether to check the layering in the build step of modules that we build transitively. llvm-svn: 197021
* When performing a delayed access check, use the surrounding lexical context forRichard Smith2013-12-111-0/+22
| | | | | | any local extern declaration, not just a local extern function. llvm-svn: 197000
* [ms-abi] Makes Virtual Base Alignment Look at All Virtual BasesWarren Hunt2013-12-111-1/+26
| | | | | | | | Prior to this patch, the alignment imposed by virtual bases only included direct virtual bases. This patch fixes it to look at all virtual bases. llvm-svn: 196997
* When performing an array new of a multidimensional array with an initializerRichard Smith2013-12-111-0/+106
| | | | | | | | list, each element of the initializer list may provide more than one of the base elements of the array. Be sure to initialize the right type and bump the array pointer by the right amount. llvm-svn: 196995
* ObjectiveC. Fixes a bug where an 'unused property ivar'Fariborz Jahanian2013-12-111-0/+17
| | | | | | | warning is coming out incorrectly too early becuase of unrelated scope pop. // rdar://15630719 llvm-svn: 196989
* ObjectiveC. Provide a property-dot syntax for fixitFariborz Jahanian2013-12-101-0/+23
| | | | | | | when selector in objc_bridge_related attribute names a property. // rdar://15517899 llvm-svn: 196984
* darwin asm driver: suppress -Q for -no-integrated-as on darwin<11David Fang2013-12-101-2/+8
| | | | llvm-svn: 196981
* Objective-C. Minor change to a diagnostic.Fariborz Jahanian2013-12-102-10/+10
| | | | | | // rdar://15499111 llvm-svn: 196977
* Parse: Avoid crashing on unterminated top-level asm stringsJustin Bogner2013-12-101-0/+13
| | | | | | | | | | | When parsing invalid top-level asm statements, we were ignoring the return code of the SkipUntil we used for recovery. This led to crashes when we hit the end of file and tried to continue parsing anyway. This fixes the crash and adds a couple of tests for parsing related problems. llvm-svn: 196961
* Rename attribute 'objc_suppress_protocol_methods' to ↵Ted Kremenek2013-12-101-61/+19
| | | | | | | | | | | | | | | 'objc_protocol_requires_explicit_implementation'. That's a mouthful, and not necessarily the final name. This also reflects a semantic change where this attribute is now on the protocol itself instead of a class. This attribute will require that a protocol, when adopted by a class, is explicitly implemented by the class itself (instead of walking the super class chain). Note that this attribute is not "done". This should be considered a WIP. llvm-svn: 196955
* Add a triple to this IRgen test to unbreak the ARM bots.Richard Smith2013-12-101-1/+1
| | | | llvm-svn: 196953
* Improve on an objc_bridge_related diagnostic.Fariborz Jahanian2013-12-102-10/+10
| | | | | | // rdar://15499111 llvm-svn: 196950
* [objcmt] Add a modernization option to infer and suggest designated ↵Argyrios Kyrtzidis2013-12-102-0/+88
| | | | | | | | initializers. rdar://15509284 llvm-svn: 196943
* Update clang MS inline asm tests for r196939Reid Kleckner2013-12-102-8/+9
| | | | llvm-svn: 196940
* [analyzer] Extend IdenticalExprChecker to check ternary operator results.Jordan Rose2013-12-101-0/+218
| | | | | | | | | | Warn if both result expressions of a ternary operator (? :) are the same. Because only one of them will be executed, this warning will fire even if the expressions have side effects. Patch by Anders Rönnholm and Per Viberg! llvm-svn: 196937
* Objective-C. Provide fixit's for objc_bride_relatedFariborz Jahanian2013-12-101-0/+35
| | | | | | | attributed CF to ObjC type conversions. // rdar://15499111 llvm-svn: 196935
* Darwin: update clang test to new iOS default version (5.0)Tim Northover2013-12-101-4/+4
| | | | llvm-svn: 196913
* [mips][msa] Correct sld and sldi builtins.Daniel Sanders2013-12-101-9/+9
| | | | | | | | | | | | | Summary: The result register of these instructions is also the first operand. Reviewers: jacksprat, dsanders Reviewed By: dsanders Differential Revision: http://llvm-reviews.chandlerc.com/D2362 Differential Revision: http://llvm-reviews.chandlerc.com/D2363 llvm-svn: 196910
* Implement DR1460: fix handling of default initializers in unions; don't allowRichard Smith2013-12-104-10/+243
| | | | | | | | | more than one such initializer in a union, make mem-initializers override default initializers for other union members, handle anonymous unions with anonymous struct members better. Fix a couple of semi-related bugs exposed by the tests for same. llvm-svn: 196892
* [AArch64 NEON] Support poly128_t and implement relevant intrinsic.Kevin Qin2013-12-101-0/+203
| | | | llvm-svn: 196888
* Try to fix the test for Windows paths after r196859Dmitri Gribenko2013-12-101-3/+3
| | | | llvm-svn: 196862
* [ms-abi] 64-bit fixes for r196549Warren Hunt2013-12-102-4/+30
| | | | | | | | In order to address latent bugs that were easier to expose in 64-bit mode, we move the application of __declspec(align) to before the layout of vbases rather than after. llvm-svn: 196861
* Take into consideration calling convention when processing specializations.Rafael Espindola2013-12-101-0/+26
| | | | | | This fixes pr18141. llvm-svn: 196855
* Fix via-file-asm test failure on windowsDavid Peixotto2013-12-101-6/+2
| | | | | | | | | | | | The windows target does not support using an external assembler so the test case was failing with this error: error: there is no external assembler that can be used on this platform The test was updated to always explicitly pass a target that has both an interal and external assembler. llvm-svn: 196854
* Sema: Enforce C++11 pointer-to-member template arguments should rulesDavid Majnemer2013-12-101-1/+8
| | | | | | | | | | | | The standard is pretty clear on what it allows inside of template arguments for non-type template parameters of pointer-to-member. They must be of the form &qualified-id and cannot come from sources like constexpr VarDecls or things of that nature. This fixes PR18192. llvm-svn: 196852
* Objective-C: Improve on various diagnostics related toFariborz Jahanian2013-12-094-63/+33
| | | | | | use of objc_bridge_related attribute. // rdar://15499111 llvm-svn: 196828
* clang/test/lit.cfg: Remove get_llc_props. check-clang itself no longer ↵NAKAMURA Takumi2013-12-091-32/+0
| | | | | | | | invokes llc. Only a few tests depend on llc yet. llvm-svn: 196797
* Output destructors and constructors in a more natural order.Rafael Espindola2013-12-0917-83/+83
| | | | | | | | | | | | | | | | With this patch we output the in the order C2 C1 D2 D1 D0 Which means that a destructor or constructor that call another is output after the callee. This is a bit easier to read IHMO and a tiny bit more efficient as we don't put a decl in DeferredDeclsToEmit. llvm-svn: 196784
* Make the -Wkeyword-compat diag message more accurateAlp Toker2013-12-092-3/+3
| | | | | | | | | | | | | | | | Changed from: keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit To: keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit This is a more accurate description of clang's keyword compatibility feature, given that some of the keywords are turned into context-sensitive keywords (e.g. REVERTIBLE_TYPE_TRAIT) rather than being fully disabled. llvm-svn: 196776
* [-cxx-abi microsoft] Mangle large integral constants correctlyDavid Majnemer2013-12-091-0/+38
| | | | | | | | | | | | | | | | | | | Testing has revealed that large integral constants (i.e. > INT64_MAX) are always mangled as-if they are negative, even in places where it would not make sense for them to be negative (like non-type template parameters of type unsigned long long). To address this, we change the way we model number mangling: always mangle as-if our number is an int64_t. This should result in correct results when we have large unsigned numbers. N.B. Bizarrely, things that are 32-bit displacements like vbptr offsets are mangled as-if they are unsigned 32-bit numbers. This is a pretty egregious waste of space, it would be a 4x savings if we could mangle it like a signed 32-bit number. Instead, we explicitly cast these displacements to uint32_t and let the mangler proceed. llvm-svn: 196771
* Avoid extra error messages if method definition is inside function.Serge Pavlov2013-12-091-0/+10
| | | | llvm-svn: 196757
* [-cxx-abi microsoft] Properly mangle enumsDavid Majnemer2013-12-091-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing our ability to mangle large constants (PR18175), I incidentally discovered that we did not properly mangle enums correctly. Previously, we would append the width of the enum in bytes after the type-tag differentiator. This would mean "enum : short" would be mangled as 'W2' while "enum : char" would be mangled as 'W1'. Upon testing this with several versions of MSVC, I found that this did not match their behavior: they always use 'W4'. N.B. Quick testing uncovered that undname allows different numbers to follow the 'W' in the following way: 'W0' -> "enum char" 'W1' -> "enum unsigned char" 'W2' -> "enum short" 'W3' -> "enum unsigned short" 'W4' -> "enum" 'W5' -> "enum unsigned int" 'W6' -> "enum long" 'W7' -> "enum unsigned long" However this scheme appears abandoned, I cannot get MSVC to trigger it. Furthermore, it's incomplete: it doesn't handle "bool" or "long long". llvm-svn: 196752
* [AArch64]Add missing pair intrinsics such as:Hao Liu2013-12-091-0/+48
| | | | | | | int32_t vminv_s32(int32x2_t a) which should be compiled into SMINP Vd.2S,Vn.2S,Vm.2S llvm-svn: 196750
* Remove an old stdio.h include from the invalid-array testAlp Toker2013-12-081-3/+1
| | | | | | | This should get it up and running on win and other builders without system headers. llvm-svn: 196738
* Fix three tests that weren't checking anythingAlp Toker2013-12-084-6/+7
| | | | | | | | Add -verify and update the test directives to match current expectations. Also add a FIXME to an ObjC test that has expected-* directives but no -verify. llvm-svn: 196737
OpenPOWER on IntegriCloud