summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't give # and ## special treatment when in -traditional-cpp mode. Patch byRichard Smith2013-07-092-0/+29
| | | | | | Austin Seipp! llvm-svn: 185896
* Generalize hack allowing 'const' in __has_attribute (etc) to allow any tokenRichard Smith2013-07-092-3/+5
| | | | | | | with identifier info. This covers most identifier-like entities (other than the ISO646 keywords). llvm-svn: 185895
* Fix crash typo-correcting dependent member func.Eli Friedman2013-07-082-1/+5
| | | | | | PR16561. llvm-svn: 185887
* ObjC migration: more test for migration toFariborz Jahanian2013-07-082-0/+38
| | | | | | properties. llvm-svn: 185884
* Attempt typo correction for function calls with the wrong number of arguments.Kaelyn Uhrain2013-07-086-7/+157
| | | | | | | | | | | | | | | Combined with typo correction's new ability to apply global/absolute nested name specifiers to possible corrections, cases such as in PR12287 where the desired function is being shadowed by a lexically closer function with the same name but a different number of parameters will now include a FixIt. On a side note, since the test for this change caused test/SemaCXX/typo-correction.cpp to exceed the typo correction limit for a single file, I've included a test case for exceeding the limit and added some comments to both the original and part two of typo-correction.cpp warning future editors of the files about the limit. llvm-svn: 185881
* Make a couple of useful typo correction callbacks more widely available.Kaelyn Uhrain2013-07-083-64/+72
| | | | llvm-svn: 185880
* ObjC migration: Skip over setter/getter with attributesFariborz Jahanian2013-07-083-1/+26
| | | | | | for now. llvm-svn: 185879
* [Objective-C migrator] replace candidate user setter/getter withFariborz Jahanian2013-07-086-3/+78
| | | | | | their equivalent property declaration. wip. llvm-svn: 185873
* Fix Sema for compares with _Atomic vars.Eli Friedman2013-07-083-41/+38
| | | | | | | | | | | | | | | | Use UsualArithmeticConversions unconditionally in analysis of comparisons and conditional operators: the method performs the usual arithmetic conversions if both sides are arithmetic, and usual unary conversions if they are not. This is just a cleanup for conditional operators; for comparisons, it fixes the issue that we would try to check isArithmetic() on an atomic type. Also, fix GetExprRange() in SemaChecking.cpp so it deals with variables of atomic type correctly. Fixes PR15537. llvm-svn: 185857
* Fix incorrect incorrect cast identification in clang-format.Daniel Jasper2013-07-082-0/+2
| | | | | | | | | | | This fixes llvm.org/PR16534. Before: aaaaa& operator+(const aaaaa&)LLVM_DELETED_FUNCTION; After: aaaaa& operator+(const aaaaa&) LLVM_DELETED_FUNCTION; llvm-svn: 185828
* Fixed testcase failing under MS by adding "-fno-delayed-template-parsing",Enea Zaffanella2013-07-082-10/+18
| | | | | | | as suggested by Takumi. To this end, added a MatchVerifier::match() overload accepting a vector of invocation arguments. llvm-svn: 185827
* Reformat clang-format's source files after r185822 and others.Daniel Jasper2013-07-089-59/+51
| | | | llvm-svn: 185823
* Prefer similar line breaks.Daniel Jasper2013-07-082-20/+33
| | | | | | | | | | | | | | | | | | | | | | | This adds a penalty for clang-format for each break that occurs in a set of parentheses (including fake parenthesis that determine the range of certain operator precendences) that have not yet been broken. Thereby, clang-format prefers similar line breaks. This fixes llvm.org/PR15506. Before: const int kTrackingOptions = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways; After: const int kTrackingOptions = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways; Also removed ParenState::ForFakeParenthesis which has become unused. llvm-svn: 185822
* Fix use of invalidated iterator bug in AST match finder.Manuel Klimek2013-07-081-4/+6
| | | | | | | | Pulled out the cache clearing in the case of descendant matching, too, for consistency, also it is not technically needed there. FIXME: Make cache size configurable and add unit test. llvm-svn: 185820
* Fix for corner cases in code handling leading "* " decorations in block commentsAlexander Kornienko2013-07-083-30/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes problems that lead to incorrect formatting of these and similar snippets: /* ** */ /* **/ /* * */ /* *test */ Clang-format used to think that all the cases above use "* " decoration, and failed to calculate insertion position properly. It also used to remove leading "* " in the last line. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1113 llvm-svn: 185818
* clang/include/clang/AST/ExprCXX.h:260:5: Fix a warning -- unknown command ↵NAKAMURA Takumi2013-07-081-1/+1
| | | | | | tag name 'cc'; did you mean 'c'? [-Wdocumentation] llvm-svn: 185810
* clang/test/Index/comment-custom-block-command.cpp: This has not been failing ↵NAKAMURA Takumi2013-07-081-1/+1
| | | | | | | | since r175892 on valgrind. That said, it fails with --vg-leak. Mark it as XFAIL: vg_leak instead. llvm-svn: 185809
* Documentation cleanup for include/clang/AST/ExprCXX.h.James Dennett2013-07-081-161/+184
| | | | | | | This is mostly Doxygen formatting, but also updates some C++0x references to C++11 and clarifies some wording. llvm-svn: 185798
* clang/test/Misc/permissions.cpp: Suppress this on MSYS with the feature ↵NAKAMURA Takumi2013-07-081-0/+4
| | | | | | | 'shell-preserves-root'. FIXME: Could we introduce another feature for it? llvm-svn: 185797
* clang/test/CodeGen/2008-01-25-ByValReadNone.c: Add explicit -triple ↵NAKAMURA Takumi2013-07-081-1/+2
| | | | | | | | | | | x86_64-unknown-unknown. It would emit @llvm.memcpy with "-triple x86_64-(mingw32|win32)" and had been failing since Nick's r185735. ; Function Attrs: nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1 llvm-svn: 185796
* AST/SourceLocationTest.cpp: Appease MS hosts to suppress ↵NAKAMURA Takumi2013-07-081-0/+5
| | | | | | | CXXUnresolvedConstructExpr.SourceRange, for now. FIXME: It could pass if MS-compatible mode were disabled with Args.push_back("-fno-delayed-template-parsing"). llvm-svn: 185795
* Simplify code. No functional change.Craig Topper2013-07-081-3/+1
| | | | llvm-svn: 185792
* Introduce a typedef for the type of NewlyDeducedPacks to avoid repeating the ↵Craig Topper2013-07-081-20/+19
| | | | | | small size of the inner SmallVector. llvm-svn: 185789
* Remove 'else' after 'return'Craig Topper2013-07-081-1/+1
| | | | llvm-svn: 185787
* Function argument formatting fixes. No functional change.Craig Topper2013-07-081-6/+6
| | | | llvm-svn: 185786
* Function argument formatting fixes.Craig Topper2013-07-081-17/+19
| | | | llvm-svn: 185785
* Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-086-9/+9
| | | | | | specifying the vector size. llvm-svn: 185784
* Sema: Do not merge new decls with invalid, old declsDavid Majnemer2013-07-075-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sema::MergeFunctionDecl attempts merging two decls even if the old decl is invalid. This can lead to interesting circumstances where we successfully merge the decls but the result makes no sense. Take the following for example: template <typename T> int main(void); int main(void); Sema will not consider these to be overloads of the same name because main can't be overloaded, which means that this must be a redeclaration. In this case the templated decl is compatible with the non-templated decl allowing the Sema::CheckFunctionDeclaration machinery to move on and do bizarre things like setting the previous decl of a non-templated decl to a templated decl! The way I see it, we should just bail from MergeFunctionDecl if the old decl is invalid. This fixes PR16531. llvm-svn: 185779
* Fixed source range for functional cast and unresolved construct expr nodes.Enea Zaffanella2013-07-074-3/+45
| | | | | | Added testcases. llvm-svn: 185773
* Rename test to match C++1y paragraph number per N3690, and add additional testRichard Smith2013-07-072-3/+13
| | | | | | case inspired by a stackoverflow question. llvm-svn: 185772
* Documentation cleanup for include/clang/AST/DeclCXX.h, no substantive changes.James Dennett2013-07-071-61/+70
| | | | | | | | | * Fix up \brief documentation; * Update C++0x references to C++11; * Doxygen formatting: bulleted lists start with a single hyphen, not two; * Fix a typo, "assosiate" -> "associate". llvm-svn: 185771
* Fixed source location info for UnaryTransformTypeLoc nodes.Enea Zaffanella2013-07-063-0/+32
| | | | llvm-svn: 185765
* Objective-C: Warn when fast enumeration variable isn't used.Fariborz Jahanian2013-07-062-6/+3
| | | | | | // rdar://14182680. llvm-svn: 185762
* Remove some useless declarations (found by scan-build)Sylvestre Ledru2013-07-062-3/+1
| | | | llvm-svn: 185752
* Sema: Fix a crash when main is redeclared as a function-template.David Majnemer2013-07-062-8/+17
| | | | | | | | | | 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
* [comment parsing]: Removes an unsafe API whoseFariborz Jahanian2013-07-052-6/+2
| | | | | | | use can cause crash. No test is available. It is uncovered by code browsing. // rdar://14348205 llvm-svn: 185732
* Use llvm::sys::fs::createUniqueFile.Rafael Espindola2013-07-056-12/+20
| | | | | | | Include a test that clang now produces output files with permissions matching the umask. llvm-svn: 185727
* [libclang] Add the new function to libclang.exportsArgyrios Kyrtzidis2013-07-051-0/+1
| | | | llvm-svn: 185725
* [objc migrator]: More knobs to do migration toFariborz Jahanian2013-07-053-8/+15
| | | | | | use of objc's properties. llvm-svn: 185724
* [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the ↵Argyrios Kyrtzidis2013-07-054-1/+47
| | | | | | | | declaration was affected by "@optional" rdar://14348525. llvm-svn: 185722
* Don't use mangleCXXRTTIName in TBAA for C code.Eli Friedman2013-07-052-14/+7
| | | | | | | | | | | | | | This changes the TBAA code so it doesn't use mangleCXXRTTIName in C, because it doesn't really make sense there. Also, as sort of a defense-in-depth change, fix the mangler so it handles C RecordDecls correctly. No tests because I don't know the TBAA code well enough to write a test, and I don't know how else to trigger mangling a local struct in C. Fixes a crash with r185450 reported by Joerg Sonnenberger. llvm-svn: 185721
* Use llvm::sys::fs::createTemporaryFile.Rafael Espindola2013-07-059-23/+16
| | | | llvm-svn: 185717
* Use SmallVectorImpl& for function arguments instead of SmallVector.Craig Topper2013-07-0521-55/+53
| | | | llvm-svn: 185715
* Fix regression from r185450.Eli Friedman2013-07-052-4/+14
| | | | | | | | 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-054-2/+14
| | | | | | abstract class type. // rdar://14261999 llvm-svn: 185710
* Add a test case for r185707/PR16547.Benjamin Kramer2013-07-051-0/+8
| | | | llvm-svn: 185708
* Fix PR16547.Rafael Espindola2013-07-051-2/+3
| | | | | | | | | | | We should not be asking unique_file to prepend the system temporary directory when creating the html report. Unfortunately I don't think we can test this with the current infrastructure since unique_file ignores MakeAbsolute if the directory is already absolute and the paths provided by lit are. I will take a quick look at making this api a bit less error prone. llvm-svn: 185707
* We don't need to check for windows' error codes in here.Rafael Espindola2013-07-051-3/+1
| | | | | | | The operator== calls equivalent which calls default_error_condition which handles windows to posix conversion. llvm-svn: 185702
OpenPOWER on IntegriCloud