summaryrefslogtreecommitdiff
path: root/test/Misc
Commit message (Collapse)AuthorAge
* Fix/Improve SourceRange of explicitly defaulted membersDaniel Jasper2014-06-20
| | | | | | | | | | | | | | | | When adding the implicit compound statement (required for Codegen?), the end location was previously overridden by the start location, probably based on the assumptions: * The location of the compound statement should be the member's location * The compound statement if present is the last element of a FunctionDecl This patch changes the location of the compound statement to the member's end location. Code review: http://reviews.llvm.org/D4175 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211344 91177308-0d34-0410-b5e6-96231b3b80d8
* Sema: Static redeclaration after extern declarations is a Microsoft ExtensionDavid Majnemer2014-06-18
| | | | | | | | | | | CL permits static redeclarations to follow extern declarations. The storage specifier on the latter declaration has no effect. This fixes PR20034. Differential Revision: http://reviews.llvm.org/D4149 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211238 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a Pragma spelling for attributes to tablegen and makes use of it for loopTyler Nowicki2014-06-13
| | | | | | | | | | hint attributes. Includes tests for pragma printing and for attribute order which is incorrectly reversed by ParsedAttributes. Reviewed by Aaron Ballman git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210925 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' ↵Richard Smith2014-06-13
| | | | | | flag in the right place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210872 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dev/null redirect and x86 backend requirement from new test.Bob Wilson2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210699 91177308-0d34-0410-b5e6-96231b3b80d8
* Run new test with -fsyntax-only.Bob Wilson2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210693 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure test/Misc/win32-macho.c doesn't try to write to the source treeDavid Blaikie2014-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210618 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix clang-hexagon-elf failure by requiring x86 support for this test.Bob Wilson2014-06-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210586 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>Bob Wilson2014-06-10
| | | | | | | | The changes in r204978 broke win32-macho targets. There were checks added for MSVC and Itanium environments as special cases, and win32-macho needs to be treated the same way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210584 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't suppress backend diagnostics in system headersAlp Toker2014-06-10
| | | | | | | Doing so would be inconsistent with the common fallback case where backend diagnostics without source locations are emitted unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210515 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve specificity in the diag-mapping2.c testAlp Toker2014-06-10
| | | | | | | Make sure grep catches the correct diagnostic, otherwise this test fails to detect broken functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210510 91177308-0d34-0410-b5e6-96231b3b80d8
* Make '-Werror=frame-larger-than=' and associated diagnostic pragmas ↵Alp Toker2014-06-09
| | | | | | | | | | | GCC-compatible It turns out the trailing '=' really is part of the option name spelling and treating it as such gets us compatible with GCC's -Werror= and pragmas. (GCC doesn't appear to support any -Wno- form for this diagnostic but we do.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210503 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-05
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210293 91177308-0d34-0410-b5e6-96231b3b80d8
* AST Dump: print the Inherited flag on attributesHans Wennborg2014-05-31
| | | | | | | | | Also move the attribute-specific dumping to after dumping this and the Implicit flag. Differential Revision: http://reviews.llvm.org/D3971 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209965 91177308-0d34-0410-b5e6-96231b3b80d8
* Retain isImplicit flag for local variable declarations when instantiatingAlexander Kornienko2014-05-27
| | | | | | | | | | | | | | templates. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3924 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209686 91177308-0d34-0410-b5e6-96231b3b80d8
* ARCMT/GC-check-warn-nsalloc.m: don't provide a diag groupAlp Toker2014-05-19
| | | | | | | This diagnostic is now controlled solely by -no-ns-alloc-error thus matching the original intended behaviour. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209184 91177308-0d34-0410-b5e6-96231b3b80d8
* Add speculative clang-interpreter testAlp Toker2014-05-05
| | | | | | | | | | | Let's see how far this gets on the build servers. The application requires native JIT and uses the C standard library, but hopefully we can get this tested on at least some configurations. Taking a lead from the clang-format tests, we'll just expect the executable to get picked up from the build output path for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207950 91177308-0d34-0410-b5e6-96231b3b80d8
* Split out header integration testsAlp Toker2014-05-04
| | | | | | | | | | | | These are somewhat arbitrary tests that check if "thing goes fine" when processing various platform-specific headers. Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure tests live. File moves only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207936 91177308-0d34-0410-b5e6-96231b3b80d8
* When sorting overload candidates, sort arity mismatches in ascendingKaelyn Takata2014-05-01
| | | | | | | | order by the number of missing or extra parameters. This is useful if there are more than a few overload candidates with arity mismatches, particularly in the presence of -fshow-overloads=best. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207796 91177308-0d34-0410-b5e6-96231b3b80d8
* Put macro redefinition warnings under -Wmacro-redefinedReid Kleckner2014-04-04
| | | | | | | | | | | This is consistent with -Wbuiltin-macro-redefined, and puts this common extension warning under a flag. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D3283 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205591 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the location of Decls to ast dump.David Blaikie2014-04-02
| | | | | | | | | While investigating some debug info issues, Eric and I came across a particular template case where the location of a decl was quite different from the range of the same decl. It might've been rather helpful if the dumper had actually showed us this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205396 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently dump default template arguments for template parameters as ↵Richard Smith2014-03-23
| | | | | | 'TemplateArgument's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204572 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment parsing: fix a crash when dumping comment ast for a function templateDmitri Gribenko2014-03-19
| | | | | | | | | with variadic parameters Patch by Joe Ranieri. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204236 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two missing entries to the C++11 support page. Bump one relevant diagnosticRichard Smith2014-03-14
| | | | | | | | | (for an integer too large for any signed type) from Warning to ExtWarn -- it's ill-formed in C++11 and C99 onwards, and UB during translation in C89 and C++98. Add diagnostic groups for two relevant diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203974 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow GNU-style attributes on lambda expressions.Aaron Ballman2014-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203628 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: Add -Wswitch-bool to control warn_bool_switch_conditionDavid Majnemer2014-03-11
| | | | | | | | | This warning was missing a flag, add one. test/Misc/warning-flags.c has one fewer entry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203522 91177308-0d34-0410-b5e6-96231b3b80d8
* The Visual Studio IDE changed behavior in VS2012. It used to be the case thatYunzhong Gao2014-03-07
| | | | | | | | | | | | | | | | | | the clang diagnostic has to report a column number one less than the correct value in order for the IDE to move the cursor to the expected location. This behavior is changed in VS2012 and VS2013 so that the IDE is now expecting the column number to match the actual source location. Before: source(line, column-1): type: message After: source(line, column): type: message This patch changes -fdiagnostics-format=msvc to match the new VS2012 and VS2013 when fmsc-version is 1700 or greater. Differential Revision: http://llvm-reviews.chandlerc.com/D2949 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203183 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the color of comment nodes from bright yellow to blue. Bright yellow onRichard Trieu2014-03-06
| | | | | | | | a white background is difficult to read. Also include a chart showing which colors are used by which elements in the AST dump. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203050 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests for DR370-380.Richard Smith2014-03-05
| | | | | | | | Also promote a couple of Warnings on ill-formed code found by this testing to ExtWarns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203021 91177308-0d34-0410-b5e6-96231b3b80d8
* Updating this test case to appease build bots which support ANSI escape ↵Aaron Ballman2014-03-05
| | | | | | sequences (unlike my dev box). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203014 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-fix previous commit.Jordan Rose2014-03-03
| | | | | | Always run the test again, even for a trivial change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202747 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove absolute path from r202733.Jordan Rose2014-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202746 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialized diagnostic severity levels should be stable.Jordan Rose2014-03-03
| | | | | | | | | Serialized diagnostics were accidentally using the AST diagnostic level values rather than a dedicated stable enum, so the addition of "remark" broke the reading of existing serialized diagnostics files. I've added a .dia file generated from Xcode 5's Clang to make sure we don't break this in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202733 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding a test case to ensure that type attributes applied to the ↵Aaron Ballman2014-02-28
| | | | | | decl-specifier are applied across all declarations in a group. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202501 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempting to fix the build bot due to some missing text in the ast dump.Aaron Ballman2014-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201590 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed updating this test case with r201585 -- the lockable attribute is now ↵Aaron Ballman2014-02-18
| | | | | | internally represented by CapabilityAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201587 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken CHECK linesNico Rieck2014-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201477 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: Clean up malformed pragma diagnosticsDavid Majnemer2014-02-10
| | | | | | | | Create a new diagnostic, -Wignored-pragmas and use it to handle any case where a pragma would have a side effect but is ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201102 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing onRichard Trieu2014-02-06
| | | | | | | certain receiver types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200953 91177308-0d34-0410-b5e6-96231b3b80d8
* ARCMigrate: Introduce proper diagnostics for TransformActionsAlp Toker2014-01-26
| | | | | | | | | | | | | | | This starts to switch ARCMT to use proper diagnostic messages. The old use was based on incorrect example code from the documentation. The logic of the previous report() functions has been retained to support any external consumers that might be intercepting diagnostic messages through the old interface. Note that the change in test/Misc/warning-flags.c isn't a new warning without a flag, rather one that was previously invisible to the test. Adding a flag might be a good idea though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200124 91177308-0d34-0410-b5e6-96231b3b80d8
* If an attribute has a semantically meaningful spelling (such as ↵Aaron Ballman2014-01-22
| | | | | | ArgumentWithTypeTagAttr or MSInheritanceAttr), display the spelling used for the attribute as part of the AST dump. This should ease debugging the AST for these attributes. Attributes without semantically meaningful spelling variations are not affected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199834 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak test run line for readabilityAlp Toker2014-01-17
| | | | | | | Matching up the argument order in r199455's two RUN lines better demonstrates what's going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199456 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -verify a -cc1 NoDriverOptionAlp Toker2014-01-17
| | | | | | | | | '%clang -verify' will now issue an error instead of succeeding without verification. This should catch flawed tests like r199347. Followup to r199451. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199455 91177308-0d34-0410-b5e6-96231b3b80d8
* Distinguish between attributes explicitly written at the request of the ↵Aaron Ballman2014-01-16
| | | | | | | | user, and attributes implicitly generated to assist in bookkeeping by the compiler. This is done so by table generating a CreateImplicit method for each attribute. Additionally, remove the optional nature of the spelling list index when creating attributes. This is supported by table generating a Spelling enumeration when the spellings for an attribute are distinct enough to warrant it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ast-dump-color.cpp test following r198883Alp Toker2014-01-09
| | | | | | The commit added a source location that used to be missing from the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198892 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Variables in the constant address space must be initialized.Joey Gouly2014-01-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198417 91177308-0d34-0410-b5e6-96231b3b80d8
* This diagnostic did not accept arguments, and did not have any test ↵Aaron Ballman2013-12-26
| | | | | | | | coverage. Parameterized the diagnostic, and made it more consistent with other attribute diagnostic wordings. Added test coverage. Since this warning was generalized, it was also given a sensible warning group flag and the corresponding test was updated to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198053 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing the alloc_size attribute. The attribute was semantically handled, ↵Aaron Ballman2013-12-21
| | | | | | but silently ignored. Most of this feature was already reverted in June 2012 (r159016), this just cleans up the pieces left over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197866 91177308-0d34-0410-b5e6-96231b3b80d8
* Wordsmith "maybe" into "may be" in diagnostic, and move warning under flag.Ted Kremenek2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197736 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow target-specific attributes to share a spelling between different ↵Aaron Ballman2013-12-15
| | | | | | | | | | attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses. This new functionality is used to implement the ARM and MSP430 interrupt attribute. Patch reviewed by Richard Smith over IRC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197343 91177308-0d34-0410-b5e6-96231b3b80d8