summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* do not hide clang stderr output during a testLubos Lunak2014-05-011-2/+2
| | | | | | I don't know why this fails on the buildbot. llvm-svn: 207808
* use 'diff' rather than 'cmp -s' in a testLubos Lunak2014-05-011-1/+1
| | | | | | That's what all tests use, no idea where I got the latter from. llvm-svn: 207797
* write a line marker right before adding included fileLubos Lunak2014-05-015-0/+25
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207795
* do not use "1" for line marker for the predefines "file" eitherLubos Lunak2014-05-011-0/+9
| | | | | | Similar to r207764. llvm-svn: 207794
* Support 'remark' in VerifyDiagnosticConsumerTobias Grosser2014-05-011-4/+3
| | | | | | | After Diego added support for -Rpass=inliner we have now in-tree remarks which we can use to properly test this feature. llvm-svn: 207765
* do not use "1" for line marker for the main fileLubos Lunak2014-05-011-0/+1
| | | | | | | | | | "1" means entering a new file (from a different one), but the main file is not included from anything (and this would e.g. confuse -Wunused-macros to not report unused macros in the main file, see pr15610, or also see pr18948). The line marker is still useful e.g. if the resulting file is renamed or used via a pipe. llvm-svn: 207764
* revert r207756Lubos Lunak2014-05-015-25/+0
| | | | | | | | There's nothing wrong with the change itself, but test/Frontend/rewrite-includes-messages.c fails without another not-yet-committed fix. llvm-svn: 207762
* write a line marker right before adding included fileLubos Lunak2014-05-015-0/+25
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207756
* Simplify test. No functional change intended.Andrea Di Biagio2014-04-301-1/+1
| | | | llvm-svn: 207623
* Add test case for revision 207575 to verify that on Windows, clang doesn'tAndrea Di Biagio2014-04-291-0/+8
| | | | | | | | | crash with an assertion failure when 'nul' is passed in input. Modified clang/test/lit.py to add feature 'system-windows' if `platform.system()` returns 'Windows'. llvm-svn: 207576
* Allow adding a value to a flag in diagnostics.Diego Novillo2014-04-211-1/+1
| | | | | | | | | | | | | | | | | Summary: This allows callers of Diags.Report() to append a value to the name of the flag associated with the diagnostic. This is useful in cases like the -Rpass flag, where we want the diagnostic to show the name of the pass that matched the pattern. Instead of showing "... [-Rpass]", this allows us to show "... [-Rpass=passname]". Reviewers: rsmith CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3441 llvm-svn: 206826
* Fix check failure on hexagon targets.Diego Novillo2014-04-161-2/+2
| | | | | | | | | | | This test was failing because there is no assembler for hexagon-elf on this buildbot: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/10470 Fixed by adding -S to the driver invocation. llvm-svn: 206412
* Add support for optimization reports.Diego Novillo2014-04-161-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 llvm-svn: 206401
* Move the -i[no-]system-prefix options from CC1Options.td to Options.td.Alexander Kornienko2014-03-261-1/+2
| | | | | | | | | | | | | | | | Summary: This allows them to be used without -cc1 the same way as -I and -isystem. Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3185 llvm-svn: 204775
* Accept -no-integrated-as in -cc1 and forward it to llvm.Rafael Espindola2014-02-211-4/+4
| | | | llvm-svn: 201837
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Changes since review (and last commit attempt): - Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others). - Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll) - mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots) - Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots) Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201333
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-121-4/+4
| | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. llvm-svn: 201241
* Arcanist failed to commit the two clang test corrections that should have ↵Daniel Sanders2014-02-121-4/+4
| | | | | | been in r201237. llvm-svn: 201238
* Wired-up the new LLVM diagnostic system into clang diagnostic system.Quentin Colombet2014-02-061-0/+34
| | | | | | | | | The approach is similar to the existing inline-asm reporting, just more general. <rdar://problem/15886278> llvm-svn: 200931
* Fix r195149. Triple should correctly reflect that target. If it contains ios,Evan Cheng2014-01-261-1/+1
| | | | | | | | | e.g. thumbv7m-apple-ios3.0.0-eabi, then it should mean it's an iOS target. For embedded targets, the OS should be unknown, e.g. thumbv7m-apple-unknown-macho. Since Tim has recently fixed the triple, r195149 is no longer needed. rdar://15911035 llvm-svn: 200164
* Add tests for clang pluginsAlp Toker2014-01-081-0/+5
| | | | | | | | | | | | | | | Somehow the entire plugin infrastructure went wholly untested until now. The only plugins available for use in testing are the examples, so plugin tests will only be run if CLANG_BUILD_EXAMPLES is enabled in the build. (The examples should really be enabled by default, not just to aid testing but also to prevent bitrot in some key user-facing code. I'll propose that shortly.) Requires supporting changes in LLVM r198746. llvm-svn: 198747
* Override the datalayout in a module with -triple.Rafael Espindola2013-12-201-1/+7
| | | | | | | | | This matches llc's behavior. Before this patch clang would create a TargetInfo base on -triple but a llvm CodeGen based on the triple in the module. llvm-svn: 197837
* Fix raw lex crash and -frewrite-includes noeol-at-eof failureAlp Toker2013-12-131-0/+4
| | | | | | Raw lexers don't have a preprocessor so we need to null check. llvm-svn: 197245
* Try to fix the test for Windows paths after r196859Dmitri Gribenko2013-12-101-3/+3
| | | | llvm-svn: 196862
* clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/NAKAMURA Takumi2013-12-041-1/+1
| | | | llvm-svn: 196350
* Fix test on WindowsAlp Toker2013-11-281-2/+2
| | | | | | | | | | | | | 'not' on Windows tries and fails to convert the argument to UTF-16 and back for some reason: Error: Unable to convert command-line to UTF-16 Let's try replacing it with !. (There was no obvious way to do these with FileCheck) llvm-svn: 195907
* Ensure that the output BOM test check is runAlp Toker2013-11-281-1/+3
| | | | | | The first command's output was only reaching one of the two checks previously. llvm-svn: 195904
* One last portability fix attempt for r195886Alp Toker2013-11-271-2/+3
| | | | llvm-svn: 195891
* Attempt to make test from r195886 portable with different shellsAlp Toker2013-11-271-2/+2
| | | | | | | Windows and Hexagon complained. It's not clear which command is failing, so will back out the changes if this doesn't do the trick. llvm-svn: 195889
* Improve BOM test from r195877Alp Toker2013-11-271-1/+2
| | | | | | | | 1) Use %clang_cc1 instead of the driver 2) Validate that the input contains a BOM 3) Validate that the BOM has been stripped from the output llvm-svn: 195886
* strip UTF-8 BOM in -frewrite-includes (PR#15664)Lubos Lunak2013-11-272-0/+5
| | | | llvm-svn: 195877
* ARM: embedded v7 'darwin' doesn't get min-version defines.Jim Grosbach2013-11-191-3/+4
| | | | | | | | | Make sure armv7 doesn't get the iOS deployment version definitions when it's being used for non-iOS. rdar://15497681 llvm-svn: 195149
* Remove period at end of "optimization level is unsupported" diagnosticHans Wennborg2013-11-181-1/+1
| | | | llvm-svn: 195048
* Make test/Driver/clang_f_opts.c not write to the test dirHans Wennborg2013-11-181-1/+1
| | | | | | | After r195009, the test would write a .o file to the test dir. Send that to /dev/null instead. Also fix the typo in test/Frontend/invalid-o-level.c. llvm-svn: 195047
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead. 1 warning generated. This matches the gcc behavior (with a warning added) Pass all tests: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 94.14s Expected Passes : 6721 Expected Failures : 20 Unsupported Tests : 17 (which was not the case of http://llvm-reviews.chandlerc.com/D2125) Differential Revision: http://llvm-reviews.chandlerc.com/D2212 llvm-svn: 195009
* Move remaining %clang_cc1 tests out of test/DriverAlp Toker2013-11-163-0/+60
| | | | | | | | | | | | | | clang -cc1 skips the driver so it never made sense to include these with the Driver tests. Basic type tests and flag tests generally both go in Frontend. Now that the final -cc1 tests have been moved out of test/Driver, add a local substitution to enforce and detect future mistakes. These miscategorized tests were probably the source of confusion in r194817. llvm-svn: 194919
* Ignore test Inputs globally and remove redundant lit.local.cfg filesAlp Toker2013-11-151-1/+0
| | | | | | | | | | By adding a default config.excludes pattern we can avoid individual suppressions in subdirectories. This matches LLVM's lit.cfg which also excludes a few other common non-test filenames for consistency. llvm-svn: 194814
* Fix test that was not being runAlp Toker2013-11-051-1/+1
| | | | llvm-svn: 194070
* Fix "existant" typosAlp Toker2013-10-291-2/+2
| | | | llvm-svn: 193578
* ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archsTim Northover2013-10-241-0/+6
| | | | | | | These arch arguments are used for embedded targets (obviously) which need a different calling convention to iOS. llvm-svn: 193328
* clang/test/Frontend/rewrite-includes.c: Tweak expressions for r'\\', not ↵NAKAMURA Takumi2013-08-291-14/+14
| | | | | | r'\', on win32. llvm-svn: 189591
* [tests] Use 'printf' instead of 'echo -e', which is not part of BSD echo.Daniel Dunbar2013-08-291-1/+1
| | | | llvm-svn: 189562
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-211-0/+43
| | | | | | | | | | | | | | | | | | | | | | | The original idea was to implement it all on the driver, but to do that the driver needs to know the sse level and to do that it has to know the default features of a cpu. Benjamin Kramer pointed out that if one day we decide to implement support for ' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to keep its knowledge of default features of a cpu. To avoid duplicating which part of clang handles default cpu features, it is probably better to handle -mfpmath in the frontend. For ARM this patch is just a small improvement. Instead of a cpu list, we check if neon is enabled, which allows us to reject things like -mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon For X86, since LLVM doesn't support an independent ssefp feature, we just make sure the selected -mfpmath matches the sse level. llvm-svn: 188939
* clang-cl: Support /showIncludesHans Wennborg2013-08-091-0/+7
| | | | | | | | | | This option prints information about #included files to stderr. Clang could already do it, this patch just teaches the existing code about the /showIncludes style and adds the flag. Differential Revision: http://llvm-reviews.chandlerc.com/D1333 llvm-svn: 188037
* Indicate success for simple options when clang called with -cc1.Rafael Espindola2013-08-071-0/+4
| | | | | | Patch by David Wiberg. llvm-svn: 187888
* [frontend] '-frewrite-includes' should not ignore headers included from ↵Argyrios Kyrtzidis2013-07-261-0/+7
| | | | | | | | command-line. rdar://14556182 llvm-svn: 187207
* avoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)Lubos Lunak2013-07-201-0/+4
| | | | llvm-svn: 186764
* fix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)Lubos Lunak2013-07-201-6/+15
| | | | | | | | Every #include is surrounded by #if 0 in order to comment it out, which adds lines. That is fixed up right after, but that all can be inside #if part that is not processed, so fix up also after every end of a conditional part. llvm-svn: 186763
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-047-17/+17
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Replace 'grep foo | count 0' with 'not grep foo'.Rafael Espindola2013-07-041-5/+5
| | | | | | This avoids depending on pipefail not being used. llvm-svn: 185648
OpenPOWER on IntegriCloud