summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Frontend: Add basic -H support.Daniel Dunbar2010-08-245-0/+12
| | | | | | | - I didn't implement the GCC "multiple include guard" detection parts, because it doesn't seem useful or obvious. llvm-svn: 111983
* Revert r110440, the fix for PR4897. Chris claims to have a better way.Douglas Gregor2010-08-081-11/+0
| | | | llvm-svn: 110544
* Fix the #include search path when reading from stdin, from Jon Simons!Douglas Gregor2010-08-061-0/+11
| | | | | | Fixes PR4897. llvm-svn: 110440
* Driver/Darwin: Resolve deployment target defaulting to be more predictable;Daniel Dunbar2010-07-151-0/+3
| | | | | | assume we are targetting OS X unless an explicit option is given. llvm-svn: 108426
* tests: Update Frontend config to actually run ir-support tests.Daniel Dunbar2010-06-161-0/+1
| | | | llvm-svn: 106144
* add a testcase, from Michael SpencerChris Lattner2010-06-151-0/+5
| | | | llvm-svn: 106026
* Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.Daniel Dunbar2010-06-111-0/+4
| | | | llvm-svn: 105830
* Frontend: Add CodeGenAction support for handling LLVM IR.Daniel Dunbar2010-06-072-0/+16
| | | | | | | | | | | | | | | | | - This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality. For example, 'llvm-as' is: $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc and 'llvm-dis' is: $ clang -cc1 -emit-llvm FOO.bc -o - and 'opt' is, e.g.: $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll and 'llc' is, e.g.: $ clang -cc1 -S -o - FOO.ll The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options). llvm-svn: 105583
* Fix PR5982, a refacto in checking for '=' in a -D argument.Daniel Dunbar2010-01-101-0/+4
| | | | llvm-svn: 93088
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-155-18/+18
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-153-3/+3
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Use '-FOO' 'BAR' instead of '-FOO=BAR' in tests.Daniel Dunbar2009-11-301-1/+1
| | | | llvm-svn: 90122
* Fix refactoro, clang-cc wasn't properly reporting errors when opening an ↵Daniel Dunbar2009-11-201-0/+4
| | | | | | output file failed. llvm-svn: 89502
* Remove RUN: true lines.Daniel Dunbar2009-11-083-3/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-087-43/+43
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Don't run anything other than the compiler in these tests.Daniel Dunbar2009-11-051-2/+2
| | | | llvm-svn: 86134
* Fix tests to not depend on /dev/null existing.Daniel Dunbar2009-11-031-4/+5
| | | | llvm-svn: 85908
* Remove clang-cc code for handling -mmacosx-version-min andDaniel Dunbar2009-10-301-10/+10
| | | | | | -miphoneos-version-min. llvm-svn: 85601
OpenPOWER on IntegriCloud