summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* rewrite-includes: Rewrite __has_include(_next) to get rid of a host dependency.Benjamin Kramer2013-04-163-0/+41
| | | | | | | | | | | | | | This broke e.g. compiling a crash report from a glibc system on Darwin. Sadly, the implementation had to game the lexer a lot as we're not using a real preprocessor here. It also doesn't handle special cases like arbitrary macros in __has_include, but since this macro isn't common outside of clang's headers we can get away with that. Fixes PR14422. Differential Revision: http://llvm-reviews.chandlerc.com/D594 llvm-svn: 179616
* Follow Jordan's advice and use {{^}} and {{$}} for this testReid Kleckner2013-04-111-4/+4
| | | | | | | This is a better way of ensuring that we match the output of the rewriter and not the CHECK line. llvm-svn: 179308
* FileCheck-ify some clang grep tests that use double quotesReid Kleckner2013-04-101-5/+9
| | | | | | | The escaping interaction between Python and grep doesn't work on my system. This change fixes the tests for me. llvm-svn: 179214
* [frontend] -frewrite-includes: turn implicit module imports into @imports.Argyrios Kyrtzidis2013-04-101-0/+20
| | | | | | rdar://13610250 llvm-svn: 179145
* [frontend] -frewrite-includes: if there was no inclusion, don't add lineinfo ↵Argyrios Kyrtzidis2013-04-101-1/+1
| | | | | | that indicates return from another file. llvm-svn: 179143
* Escape # and $ in dependency files.Benjamin Kramer2013-04-021-0/+17
| | | | | | Fixes PR15642. llvm-svn: 178540
* Delayed template parsing is not supported by the AST serialization system ↵Aaron Ballman2013-03-211-1/+1
| | | | | | yet, so turning it off. This fixes a test breakage caused by r177336. llvm-svn: 177655
* [frontend] Initialize the diagnostic client before loading an ast file.Argyrios Kyrtzidis2013-03-181-0/+22
| | | | | | | Issue reported by Tom Honermann! http://llvm.org/bugs/show_bug.cgi?id=15377 llvm-svn: 177336
* [driver] Warnings for warning options are handled by the frontend. The ↵Chad Rosier2013-01-151-0/+5
| | | | | | | | | | driver needs to process the warning options to setup diagnostic state, but should not be emitting warnings as these would be rudndant with what the frontend emits. rdar://13001556 llvm-svn: 172497
* hexagon-target-basic.c test: add REQUIRES line for hexagon targetDmitri Gribenko2013-01-021-0/+1
| | | | llvm-svn: 171422
* Correct Hexagon DataLayout string. Fixes bug 14744.Anshuman Dasgupta2013-01-021-0/+8
| | | | | | Patch by Krzysztof Parzyszek! llvm-svn: 171415
* A number of test cases assume that an "int" parameter or return valueUlrich Weigand2012-10-241-2/+2
| | | | | | | | | | | | will be represented in the IR as a plain "i32" type. This causes the tests to spuriously fail on platforms where int is not a 32-bit type, or where the ABI requires attributes like "signext" or "zeroext" to be used. This patch adds -triple or -target parameters to force those tests to use the i386-unknown-unknown target. llvm-svn: 166551
* Change VerifyDiagnosticConsumer so that it *must* contain at least one ↵Andy Gibbs2012-10-193-5/+48
| | | | | | | | | | "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive. This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file. Patch reviewed by David Blaikie. llvm-svn: 166281
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-195-0/+5
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-191-1/+1
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* -iframework should allow separate arguments.Douglas Gregor2012-09-251-1/+1
| | | | llvm-svn: 164607
* don't warn about unused values when the unused value is a statement ↵Chris Lattner2012-08-311-0/+8
| | | | | | expression expanded from a macro. This is of dubious utility in general, but is specifically a major issue for the linux kernel. This resolves PR13747. llvm-svn: 163034
* Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose2012-08-103-0/+39
| | | | | | | | | | | | | | | | | | | | The old behavior was to re-scan any files (like modules) where we may have directives but won't actually be parsing during the -verify invocation. Now, we keep the old behavior in Debug builds as a sanity check (though modules are a known entity), and expect all legitimate directives to come from comments seen by the preprocessor. This also affects the ARC migration tool, which captures diagnostics in order to filter some out. This change adds an explicit cleanup to CaptureDiagnosticsConsumer in order to let its sub-consumer handle the real end of diagnostics. This was originally split into four patches, but the tests do not run cleanly without all four, so I've combined them into one commit. Patches by Andy Gibbs, with slight modifications from me. llvm-svn: 161650
* Allow -verify directives to be filtered by preprocessing.Jordan Rose2012-07-113-0/+124
| | | | | | | | | | | | | | | | | | | | | This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler, which then only reads the -verify directives that are actually in live blocks of code. It also makes it simpler to handle -verify directives that appear in header files, though we still have to manually reparse some files depending on how they are generated. This requires some test changes. In particular, all PCH tests now have their -verify directives outside the "header" portion of the file, using the @line syntax added in r159978. Other tests have been modified mostly to make it clear what is being tested, and to prevent polluting the expected output with the directives themselves. Patch by Andy Gibbs! (with slight modifications) The new Frontend/verify-* tests exercise the functionality of this commit, as well as r159978, r159979, and r160053 (Andy's other -verify enhancements). llvm-svn: 160068
* Remove absolute path form include test.David Blaikie2012-06-141-1/+1
| | | | | | Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC). llvm-svn: 158464
* Fix crash on missing header in -rewrite-includes.David Blaikie2012-06-141-0/+7
| | | | llvm-svn: 158459
* Rename -rewrite-includes to -frewrite-includes.David Blaikie2012-06-141-46/+46
| | | | llvm-svn: 158458
* Add -isystem-prefix and -ino-system-prefix arguments, which can be used toRichard Smith2012-06-137-0/+25
| | | | | | | | | | override whether headers are system headers by checking for prefixes of the header name specified in the #include directive. This allows warnings to be disabled for third-party code which is found in specific subdirectories of include paths. llvm-svn: 158418
* test/Frontend/rewrite-includes.c: Tweak for win32's pathsep.NAKAMURA Takumi2012-06-071-9/+9
| | | | llvm-svn: 158149
* Add a -rewrite-includes option, which is similar to -rewrite-macros, but ↵David Blaikie2012-06-068-0/+158
| | | | | | | | | only expands #include directives. Patch contributed by Lubos Lunak (l.lunax@suse.cz). Review by Matt Beaumont-Gay (matthewbg@google.com). llvm-svn: 158093
* Escape % in diagnostic message when compiling LLVM IR.Benjamin Kramer2012-03-161-2/+2
| | | | | | | % is a common character in IR so we'd crash on almost any malformed IR. The diagnostic formatter expects a formatting directive when it sees an unescaped %. llvm-svn: 152956
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-5/+0
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.Ted Kremenek2012-02-021-1/+1
| | | | llvm-svn: 149566
* Add test for -Wno-everything.Argyrios Kyrtzidis2012-01-271-0/+7
| | | | llvm-svn: 149123
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-10/+10
| | | | llvm-svn: 148582
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-10/+10
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-10/+10
| | | | llvm-svn: 148138
* test/Frontend/dependency-gen.c: Relax expressions for Win32 host (mingw msys).NAKAMURA Takumi2011-11-171-4/+4
| | | | llvm-svn: 144887
* Frontend: Support -iframework.Daniel Dunbar2011-10-182-0/+4
| | | | llvm-svn: 142418
* Basic/Diagnostics: Apparently, #pragma ... diagnostic is intended to overrideDaniel Dunbar2011-10-041-0/+9
| | | | | | | | the command line options (at least according to GCC's documentation). GCC 4.2 didn't appear to actually do this, but it seems like that has been fixed in later release, so we will follow the docs. llvm-svn: 141119
* Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to ↵Daniel Dunbar2011-09-293-6/+6
| | | | | | | | be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings. - This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. llvm-svn: 140770
* tests: Add some more tests for warning mappings.Daniel Dunbar2011-09-294-0/+36
| | | | llvm-svn: 140764
* Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch ↵Daniel Dunbar2011-09-291-0/+8
| | | | | | | | TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker. - The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though. llvm-svn: 140752
* Revert r134898, "test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to ↵NAKAMURA Takumi2011-07-111-4/+0
| | | | | | | | PR10331. to appease mingw-target (and non-mingw-host) builds. PR10331 is still alive I suppose. llvm-svn: 134931
* test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to PR10331.NAKAMURA Takumi2011-07-111-0/+4
| | | | llvm-svn: 134898
* Fix up dependency file name printing to more closely match that of gcc, ↵Eli Friedman2011-07-081-13/+21
| | | | | | | | including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./". rdar://problem/9734352 llvm-svn: 134728
* The macros defined by the language standard are still available even when theNick Lewycky2011-06-071-0/+4
| | | | | | | -undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't ask.) llvm-svn: 132708
* These tests require particular registered targets. Declared as such.Galina Kistanova2011-06-041-0/+1
| | | | llvm-svn: 132623
* Stop leaving a.out files around.John McCall2011-05-161-2/+2
| | | | llvm-svn: 131396
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-151-0/+5
| | | | | | Monrocq llvm-svn: 129614
* Fixes a crash when generating dependency file stuffFariborz Jahanian2011-04-151-0/+4
| | | | | | and output file is not writable. // rdar://9286457. llvm-svn: 129587
* test: Add the feature "shell". Frontend/dependency-gen.c would be executable ↵NAKAMURA Takumi2011-02-281-1/+2
| | | | | | | | with shell. The feature "shell" is implemented in llvm/test. llvm-svn: 126646
* Tweak this test a bit further to make it easier on grep. Who knows whatChandler Carruth2011-02-241-4/+5
| | | | | | characters get dropped into the regular expression from %t. llvm-svn: 126361
* Clean up the CMake test execution by nuking this directory before we tryChandler Carruth2011-02-231-0/+2
| | | | | | | | | | | | to create it. Lit doesn't apparently clean up test directories effectively, and so this broke randomly on subsequent runs. Also XFAIL the test on windows, as there's not much hope for these commands doing the right thing there. Paired with Nick Lewycky. llvm-svn: 126344
* Preserve what the user passed to -include when emitting .d files. Fixes PR8974!Nick Lewycky2011-02-231-0/+7
| | | | llvm-svn: 126334
OpenPOWER on IntegriCloud