summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Sema: Fix a crash when main is redeclared as a function-template.David Majnemer2013-07-061-0/+9
| | | | | | | | | | This boils down to us sending invalid function decls to CheckFunctionDeclaration becauswe we did not consider that CheckMain could cause the decl to be invalid. Instead, interogate the new decl's main-validity and *then* send it over to get CheckFunctionDeclaration'd if it was still valid after calling CheckMain. llvm-svn: 185745
* Update test for change in r185735.Nick Lewycky2013-07-061-1/+1
| | | | llvm-svn: 185736
* Remove referece type onproperty of abstractFariborz Jahanian2013-07-051-1/+1
| | | | | | class type. // rdar://14261999 llvm-svn: 185734
* Use llvm::sys::fs::createUniqueFile.Rafael Espindola2013-07-051-0/+11
| | | | | | | Include a test that clang now produces output files with permissions matching the umask. llvm-svn: 185727
* [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the ↵Argyrios Kyrtzidis2013-07-051-0/+24
| | | | | | | | declaration was affected by "@optional" rdar://14348525. llvm-svn: 185722
* Fix regression from r185450.Eli Friedman2013-07-051-0/+9
| | | | | | | | As it turns out, the NoFunction bit for local class mangling needed to be propagated into more places. r185450 turned what used to be an incorrect mangling into an assertion. llvm-svn: 185713
* Objective-C: diagnose when synthesizing an ivar ofFariborz Jahanian2013-07-051-0/+4
| | | | | | abstract class type. // rdar://14261999 llvm-svn: 185710
* Add a test case for r185707/PR16547.Benjamin Kramer2013-07-051-0/+8
| | | | llvm-svn: 185708
* Use the new --crash option in commands that are expected to crash.Rafael Espindola2013-07-052-2/+2
| | | | llvm-svn: 185679
* Add test for r185584.Roman Divacky2013-07-041-0/+1
| | | | llvm-svn: 185668
* Require a shell for this test.Rafael Espindola2013-07-041-0/+3
| | | | | | | Some versions of python will expand the glob used in the test, others wont, causing the test to fail when run with LIT_USE_INTERNAL_SHELL=1. llvm-svn: 185653
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-04133-262/+262
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Looks like {{.*}} doesn't match the empty string. Fix test.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185650
* Relax pattern to accept a signext on ppc64.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185649
* Replace 'grep foo | count 0' with 'not grep foo'.Rafael Espindola2013-07-0418-31/+31
| | | | | | This avoids depending on pipefail not being used. llvm-svn: 185648
* Remove test for the old debug format which was XFAILed since 2009.Rafael Espindola2013-07-041-18/+0
| | | | llvm-svn: 185647
* Convert test to FileCheck.Rafael Espindola2013-07-041-27/+27
| | | | llvm-svn: 185645
* Add missing expected-warning.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185644
* Remove more unused uses of -verify.Rafael Espindola2013-07-042-3/+3
| | | | llvm-svn: 185643
* Remove unused -verify.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185641
* clang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.Rafael Espindola2013-07-041-2/+1
| | | | llvm-svn: 185639
* Use a clang -cc1 option instead of -m32 and remove tcl quotes.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185637
* Remove tcl quotes.Rafael Espindola2013-07-041-1/+1
| | | | llvm-svn: 185636
* Convert test to FileCheck.Rafael Espindola2013-07-041-3/+5
| | | | llvm-svn: 185635
* Replace void with int to make this a valid C++ file.Rafael Espindola2013-07-041-4/+4
| | | | | | | | The test was passing because clang would still print the ast before exiting with an error. Since that didn't seem to be the intent of the test, I change the test instead of adding 'not' to the command line. llvm-svn: 185634
* Remove old test.Rafael Espindola2013-07-041-55/+0
| | | | | | | It was trivially passing because of the tcl quotes and we have better datalayout tests. llvm-svn: 185630
* Remove old test.Rafael Espindola2013-07-041-10/+0
| | | | | | | It was not clear what was being tested and the test was trivially passing by getting grep confused with tcl quotes. llvm-svn: 185629
* Clang has no nested function support. Delete this test.Rafael Espindola2013-07-041-3/+0
| | | | llvm-svn: 185628
* Add test for PR4997. This has been fixed for a while.Richard Smith2013-07-041-0/+1
| | | | llvm-svn: 185614
* Testcase for PR14130, which was probably fixed by r183859.Richard Smith2013-07-041-0/+8
| | | | llvm-svn: 185613
* [analyzer] Suppress reports reported in std::listAnna Zaks2013-07-042-0/+23
| | | | | | | | | | | The motivation is to suppresses false use-after-free reports that occur when calling std::list::pop_front() or std::list::pop_back() twice. The analyzer does not reason about the internal invariants of the list implementation, so just do not report any of warnings in std::list. Fixes radar://14317928. llvm-svn: 185609
* [analyzer] Make sure that inlined defensive checks work on div by zero.Anna Zaks2013-07-042-0/+37
| | | | | | | This suppresses a false positive in std::hash_map. Fixes radar://14255587. llvm-svn: 185608
* Part of PR15673: If a function template has a default argument in whichRichard Smith2013-07-041-0/+45
| | | | | | | | | substitution failed, report that as a substitution failure rather than pretending that there was no default argument. The test cases in PR15673 have exposed some pre-existing poor diagnostics here. llvm-svn: 185604
* Improve -Wlogical-not-parentheses to catch when the not is applied to an enum.Richard Trieu2013-07-041-0/+67
| | | | llvm-svn: 185602
* PR16480: Reimplement token-caching for constructor initializer lists. ThisRichard Smith2013-07-041-3/+69
| | | | | | | | | | | | | | | previously didn't work if a mem-initializer-id had a template argument which contained parentheses or braces. We now implement a simple rule: just look for a ') {' or '} {' that is not nested. The '{' is assumed to start the function-body. There are still two cases which we misparse, where the ') {' comes from a compound literal or from a lambda. The former case is not valid C++, and the latter will probably not be valid C++ once DR1607 is resolved, so these seem to be of low value, and we do not regress on them with this change. EDG and g++ also misparse both of these cases. llvm-svn: 185598
* "bool" should be a context-sensitive keyword in Altivec mode.Bill Schmidt2013-07-031-0/+14
| | | | | | | | | | | | | | | | | PR16456 reported that Clang implements a hybrid between AltiVec's "Keyword and Predefine Method" and its "Context Sensitive Keyword Method," where "bool" is always a keyword, but "vector" and "pixel" are context-sensitive keywords. This isn't permitted by the AltiVec spec. For consistency with gcc, this patch implements the Context Sensitive Keyword Method for bool, and stops treating true and false as keywords in Altivec mode. The patch removes KEYALTIVEC as a trigger for defining these keywords in include/clang/Basic/TokenKinds.def, and adds logic for "vector bool" that mirrors the existing logic for "vector pixel." The test case is taken from the bug report. llvm-svn: 185580
* Add support for TF/TC modes available on eg. PowerPC64.Roman Divacky2013-07-031-0/+9
| | | | llvm-svn: 185578
* Update testing cases to check dwarf-2 for Darwin.Manman Ren2013-07-032-14/+49
| | | | llvm-svn: 185577
* Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.Roman Divacky2013-07-031-0/+2
| | | | | | It's not the case on ie. FreeBSD. llvm-svn: 185572
* Add target hook CodeGen queries when generating builtin pow*.Eli Bendersky2013-07-031-0/+21
| | | | | | | | | | | Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics when it sees pow*(). This may not be suitable for all targets (for example le32/PNaCl), so the attached patch adds a target hook that CodeGen queries. The target can state its preference for having or not having the intrinsic generated. Non-PNaCl behavior remains unchanged; PNaCl-specific test added. llvm-svn: 185568
* Enable -ffreestanding for this test, to avoid #include_next'ing the system'sRichard Smith2013-07-031-2/+2
| | | | | | <stdint.h> (which might not exist or might not work). llvm-svn: 185565
* Provide test case for commit r185544.Bill Schmidt2013-07-031-0/+3
| | | | | | Verify that assembling an empty file does not auto-include altivec.h. llvm-svn: 185563
* Test case for PR7887 - failed with asm("")Serge Pavlov2013-07-031-0/+12
| | | | llvm-svn: 185543
* [analyzer] Improve handling of noreturn destructorsPavel Labath2013-07-031-0/+16
| | | | | | | | | | | | | | | | Summary: The analyzer incorrectly handled noreturn destructors which were hidden inside function calls. This happened because NoReturnFunctionChecker only listened for PostStmt events, which are not executed for destructor calls. I've changed it to listen to PostCall events, which should catch both cases. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1056 llvm-svn: 185522
* Fixed test options.Serge Pavlov2013-07-031-1/+1
| | | | llvm-svn: 185493
* Allow typo correction to try removing nested name specifiers.Kaelyn Uhrain2013-07-024-12/+10
| | | | | | | | | | | | | | | | | The removal is tried by retrying the failed lookup of a correction candidate with either the MemberContext or SS (CXXScopeSpecifier) or both set to NULL if they weren't already. If the candidate identifier is then looked up successfully, make a note in the candidate that the SourceRange should include any existing nested name specifier even if the candidate isn't adding a different one (i.e. the candidate has a NULL NestedNameSpecifier). Also tweak the diagnostic messages to differentiate between a suggestion that just replaces the identifer but leaves the existing nested name specifier intact and one that replaces the entire qualified identifier, in cases where the suggested replacement is unqualified. llvm-svn: 185487
* Look for corrections in enclosing namespaces that require a global ↵Kaelyn Uhrain2013-07-023-4/+19
| | | | | | | | | | | | | | NestedNameSpecifier. CorrectTypo will now see and consider those corrections that are effectively shadowed by other declarations in a closer context when resolved via an unqualified lookup. This involves adding any parent namespaces to the set of namespaces as fully-qualified name specifiers, and also adding potential corrections that passed name lookup but were rejected by the given CorrectionCandidateCallback into the set of failed corrections that should be tried with the set of namespace specifiers. llvm-svn: 185486
* Debug Info: set default to gdwarf-2 for Darwin.Manman Ren2013-07-023-3/+9
| | | | | | | | | | | | Darwin systems currently do not support dwarf version 3 or above. When we are ready, we can bump the default to gdwarf-4 for Darwin. For other systems, the default is dwarf version 3, if everything goes smoothly, we can bump the version to 4. rdar://13591116 llvm-svn: 185483
* Redirect the output of a test to a temporary file to prevent messing upRichard Trieu2013-07-021-1/+1
| | | | | | the test environment. llvm-svn: 185470
* [ms-cxxabi] Mangle variadic template parameter packsReid Kleckner2013-07-021-0/+23
| | | | | | | | | | | | | | Unlike Itanium, there is no code to indicate the beginning of a parameter pack. I tested this with MSVC 2013, which is the only version that implements variadic templates so far. This is needed to compile APInt.cpp for the MS C++ ABI. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D1077 llvm-svn: 185454
OpenPOWER on IntegriCloud