summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Delete support for AuroraUX.Rafael Espindola2014-08-141-2/+2
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* ARM: Add mappings for ACLE prefetch intrinsicsYi Kong2014-08-131-0/+7
| | | | | | | Implement __pld, __pldx, __pli and __plix builtin intrinsics as specified in ARM ACLE 2.0. llvm-svn: 215599
* AArch64: Prefetch intrinsicYi Kong2014-08-131-0/+7
| | | | llvm-svn: 215569
* ARM: Prefetch intrinsicsYi Kong2014-08-131-0/+5
| | | | llvm-svn: 215568
* Sema: Properly perform lookup when acting on fields for desig initsDavid Majnemer2014-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | Clang used a custom implementation of lookup when handling designated initializers. The custom code was not particularly optimized and relied on standard lookup for typo-correction anyway. This custom code has to go, it doesn't properly support MSVC-style anonymous structs embedded inside other records; replace it with the typo-correction path. This has the side effect of speeding up semantic handling of the fields for a designated initializer while simplifying the code at the same time. This fixes PR20573. Differential Revision: http://reviews.llvm.org/D4839 llvm-svn: 215372
* Sema: Handle declspecs without declarators in records properly in C modeDavid Majnemer2014-08-112-1/+16
| | | | | | | | | | | | | | | | | | | | | We had two bugs: - We wouldn't properly warn when a struct/union/enum was mentioned inside of a record definition if no declarator was provided. We should have mentioned that this declaration declares nothing. - We didn't properly support Microsoft's extension where certain declspecs without declarators would act as anonymous structs/unions. * We completely ignored the case where such a declspec could be a union. * We didn't properly handle the case where a record was defined inside another record: struct X { int a; struct Y { int b; }; }; llvm-svn: 215347
* MachO: set sizeof result type to what embedded headers expect.Tim Northover2014-08-051-0/+1
| | | | | | | | | Embedded systems seem to have inherited Darwin's choise of "unsigned long" for size_t (via a bunch of headers), so we should respect that. rdar://problem/17872787 llvm-svn: 214854
* clang/test/Sema/struct-packed-align.c: Add the case in MS mode that ↵NAKAMURA Takumi2014-08-041-4/+6
| | | | | | | | | | alignment doesn't affect packing. Also, revert a couple of suppressions. r214298, "Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64." r214301, "Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating." llvm-svn: 214794
* Trailing linefeed.NAKAMURA Takumi2014-08-041-4/+0
| | | | llvm-svn: 214793
* Thread Safety Analysis: add a -Wthread-safety-negative flag that warns wheneverDeLesley Hutchins2014-08-041-3/+3
| | | | | | | a mutex is acquired, but corresponding mutex is not provably not-held. This is based on the earlier negative requirements patch. llvm-svn: 214789
* [x32] Add __int128 supportPavel Chupin2014-08-041-0/+2
| | | | | | | | | | | | | | | | Summary: Adding __int128 support explicitly for x86_64 because currently it's on only when pointer size >= 64 which is not the case for x32. Test Plan: One of the tests using __int128 is updated Reviewers: atanasyan, chandlerc Subscribers: cfe-commits, rob.khasanov, zinovy.nis, dschuff Differential Revision: http://reviews.llvm.org/D4755 llvm-svn: 214710
* Fix tests Clang::Sema/statements.c and ↵Keith Walker2014-08-041-1/+1
| | | | | | | | Clang::SemaTemplate/instantiate-expr-1.cpp when AArch64 is the default target. Commit r213935 added additional validation of register constants/size for AArch64 and because these tests which contain Intel assembler the new validation caused these tests to fail when the default target is changed to an AArch64 target. llvm-svn: 214706
* PR11778: Fix the rejects-valid half of this bug. We still produce the sameRichard Smith2014-08-041-1/+11
| | | | | | | poorly-worded warning for a case value that is not a possible value of the switched-on expression. llvm-svn: 214678
* [Mips] Add the `mips64-linux-gnu` target to the test case to check `in128`Simon Atanasyan2014-08-031-0/+1
| | | | | | type handling. llvm-svn: 214662
* MS inline asm: Add tests for LLVM r214468Reid Kleckner2014-08-011-0/+4
| | | | | | This used to assert. llvm-svn: 214551
* The GNU-style aligned attribute has an optional expression, but the ↵Aaron Ballman2014-08-011-0/+3
| | | | | | | | generated pretty printing logic was unaware of this. Fixed the pretty printing logic, and added a test to ensure it no longer asserts. Added a FIXME to the code about eliding the parenthesis when pretty printing such a construct. llvm-svn: 214513
* Implemented a diagnostic to handle multiple, distinct ownership_return ↵Aaron Ballman2014-07-311-0/+5
| | | | | | attributes on the same declaration. This removes a FIXME from the code. llvm-svn: 214436
* Local extern redeclarations of dllimport variables stay dllimport even if ↵Hans Wennborg2014-07-311-0/+4
| | | | | | they don't specify the attribute llvm-svn: 214425
* Delay check for prototype on __fastcall functions until after MergeFunctionDecl.Nico Weber2014-07-311-0/+9
| | | | | | | In C, it is only known after merging decls if a function with 0 arguments has a prototype. Fixes PR20386, see that for more notes. llvm-svn: 214408
* Automate attribute argument count semantic checking when there are variadic ↵Aaron Ballman2014-07-311-0/+7
| | | | | | | | or optional arguments present. With this, the only time you should have to manually check attribute argument counts is when HasCustomParsing is set to true, or when you have variadic arguments that aren't really variadic (like ownership_holds and friends). Updating the diagnostics in the launch_bounds test since they have been improved in that case. Adding a test for nonnull since it has little test coverage, but has truly variadic arguments. llvm-svn: 214407
* Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating.NAKAMURA Takumi2014-07-301-0/+3
| | | | | | FIXME: This test is incompatible to MS compat mode. FIXME: Don't suppress this also on mingw. :-p llvm-svn: 214301
* Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64.NAKAMURA Takumi2014-07-301-0/+1
| | | | llvm-svn: 214298
* Revert part of r206963James Molloy2014-07-252-3/+2
| | | | | | | | Specifically the part where we removed a warning to be compatible with GCC, which has been widely regarded as a bad idea. I'm not quite happy with how obtuse this warning is, especially in the fairly common case of a 32-bit integer literal, so I've got another patch awaiting review that adds a fixit to reduce confusion. llvm-svn: 213935
* clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari2014-07-251-13/+13
| | | | | | | | | | | | | | | | | Summary: This patch extends the __asm parser to make it keep parsing input tokens as inline assembly if a single-line __asm line is followed by another line starting with __asm too. It also makes sure that we correctly keep matching braces in such situations by separating the notions of how many braces we are matching and whether we are in single-line asm block mode. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4598 llvm-svn: 213916
* Improving the "integer constant too large" diagnostics based on post-commit ↵Aaron Ballman2014-07-242-3/+3
| | | | | | feedback from Richard Smith. Amends r213657. llvm-svn: 213865
* AArch64: use aarch64_be instead of arm64_be in all tests.Tim Northover2014-07-232-2/+2
| | | | | | | | arm64_be doesn't really exist; it was useful for testing while AArch64 and ARM64 were separate, but now the only real way to refer to the system is aarch64_be. llvm-svn: 213747
* test: add an explicit target tripleSaleem Abdulrasool2014-07-231-1/+1
| | | | | | | Now that we support WoA, this test fails on ARM build bots as __va_start has a different signature on different architectures. llvm-svn: 213714
* Improve the checkUInt32Argument() helper function so that it diagnoses ↵Aaron Ballman2014-07-221-0/+1
| | | | | | integer constants larger than 32-bits. llvm-svn: 213658
* Provide extra information in the "integer constant is too large" diagnostic. ↵Aaron Ballman2014-07-221-2/+2
| | | | | | This will be used to improve other diagnostics. llvm-svn: 213657
* Sema: Handle C11 atomics when diagnosing out of range comparisonsJustin Bogner2014-07-212-0/+24
| | | | | | | | This fixes a couple of asserts when analyzing comparisons involving C11 atomics that were uncovered by r205608 when we extended the applicability of -Wtautological-constant-out-of-range-compare. llvm-svn: 213573
* TypePrinter should not ignore IndexTypeCVRQualifiers on constant-sized arraysHal Finkel2014-07-191-0/+10
| | | | | | | | | | C99 array parameters can have index-type CVR qualifiers, and the TypePrinter should print them when present (and we were not for constant-sized arrays). Otherwise, we'd drop the restrict in: int foo(int a[restrict static 3]) { ... } llvm-svn: 213445
* PR20356: Fix all Sema warnings with mismatched ext_/warn_ versusRichard Smith2014-07-194-9/+9
| | | | | | | | ExtWarn/Warnings. Mostly the name of the warning was changed to match the semantics, but in the PR20356 cases, the warning was about valid code, so the diagnostic was changed from ExtWarn to Warning instead. llvm-svn: 213443
* [X86 inline-asm] Error out on inline-asm constraint "=f".Akira Hatanaka2014-07-181-0/+6
| | | | | | <rdar://problem/17476689> llvm-svn: 213428
* TypePrinter should not omit the static keyword in array parameter declaratorsHal Finkel2014-07-181-0/+11
| | | | | | | | | | | In C99, an array parameter declarator might have the form: direct-declarator '[' 'static' type-qual-list[opt] assign-expr ']' and when the size of the array is a constant, don't omit the static keyword when printing the type. Also, in the VLA case, put a space after the static keyword (some assignment expression must follow it). llvm-svn: 213424
* ARM: Add test for ACLE memory barrier intrinsicsYi Kong2014-07-181-0/+16
| | | | | | | Add an additional test to ensure that someone doesn't accidentally change the definitions such that they can take a non-constant value. llvm-svn: 213364
* Fix parsing certain kinds of strings in the MS section pragmasReid Kleckner2014-07-181-0/+2
| | | | | | | | | We were crashing on the relevant test case inputs. Also, refactor this code a bit so we can report failure and slurp the pragma tokens without returning a diagnostic id. This is more consistent with the rest of the parser and sema code. llvm-svn: 213337
* Handle __assume in the VoidExprEvaluatorHal Finkel2014-07-171-0/+3
| | | | | | | | This is a follow-up to an IRC conversation with Richard last night; __assume does not evaluate its argument, and so the argument should not contribute to whether (__assume(e), constant) can be used where a constant is required. llvm-svn: 213267
* Add an __assume side-effects warningHal Finkel2014-07-171-0/+8
| | | | | | | | | | | | In MS-compatibility mode, we support the __assume builtin. The __assume builtin does not evaluate its arguments, and we should issue a warning if __assume is provided with an argument with side effects (because these effects will be discarded). This is similar in spirit to the warnings issued by other compilers (Intel Diagnostic 2261, MS Compiler Warning C4557). llvm-svn: 213266
* Port memory barriers intrinsics to AArch64Yi Kong2014-07-171-0/+6
| | | | | | | | | | | | | Memory barrier __builtin_arm_[dmb, dsb, isb] intrinsics are required to implement their corresponding ACLE and MSVC intrinsics. This patch ports ARM dmb, dsb, isb intrinsic to AArch64. Requires LLVM r213247. Differential Revision: http://reviews.llvm.org/D4521 llvm-svn: 213250
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-165-5/+0
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.NAKAMURA Takumi2014-07-165-0/+5
| | | | llvm-svn: 213148
* clang/test/Sema/warn-documentation-almost-trailing.c: Rewrite checks with @LINE.NAKAMURA Takumi2014-07-161-3/+2
| | | | llvm-svn: 213139
* Consolidate header inclusion diagnosticsAlp Toker2014-07-113-3/+3
| | | | | | | Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
* The returns_nonnull attribute does not require a function prototype because ↵Aaron Ballman2014-07-111-1/+2
| | | | | | it affects only the return value, not any arguments. In turn, asking for a function or method result type should not require a function prototype either, so getFunctionOrMethodResultType has been relaxed. llvm-svn: 212827
* Sema: Allow aliases to have incomplete typeDavid Majnemer2014-07-091-0/+3
| | | | | | | | | | | | gcc supports this behavior and it is pervasively used inside the Linux kernel. Note that both gcc and clang will reject code that attempts to do this in a C++ language mode. This fixes PR17998. llvm-svn: 212631
* Handle __builtin_clzs and __builtin_ctzs in the constant expression evaluator.Anders Carlsson2014-07-071-43/+47
| | | | llvm-svn: 212464
* Add an AST node for __leave statements, hook it up.Nico Weber2014-07-071-7/+4
| | | | | | | Codegen is still missing (and I won't work on that), but __leave is now as implemented as __try and friends. llvm-svn: 212425
* Sema: Check that __leave is contained in a __try block.Nico Weber2014-07-061-8/+5
| | | | | | | | | Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema walk the scope chain to find the SEHTry parent on __leave statements. (They are rare enough that it seems better to do the walk instead of giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.) llvm-svn: 212422
* Add parser support for __leave (sema and onward still missing).Nico Weber2014-07-061-0/+25
| | | | llvm-svn: 212421
* Fix up the test that expects the failure fixed in r212352Ehsan Akhgari2014-07-041-2/+0
| | | | llvm-svn: 212353
OpenPOWER on IntegriCloud