summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ObjectiveC modern rewriter. Rewrite typedefsFariborz Jahanian2013-10-071-0/+15
| | | | | | | declared locally in ObjectiveC containers. // rdar://15143875 llvm-svn: 192127
* Revert my patch in r191155 to allow forwardFariborz Jahanian2013-09-241-9/+12
| | | | | | | | class/protocol decls in @implementation and fixup modern rewriter to handle that. // rdar://15066233 llvm-svn: 191311
* ObjectiveC modern translator: Provide proper cast ofFariborz Jahanian2013-09-171-1/+1
| | | | | | | the ObjectiveC object of an @synchronized statement. // rdar://14993814 llvm-svn: 190874
* Remove unused variable.Eli Friedman2013-09-101-1/+0
| | | | llvm-svn: 190445
* Modern ObjectiveC translator. Fix translation of Fariborz Jahanian2013-09-091-36/+26
| | | | | | | | message sent to aggregate-valued methods. Fix visibility of trampoline type used in translation of such expressions. // rdar://14932320 llvm-svn: 190341
* Fix constructor-related typos.Benjamin Kramer2013-09-091-14/+14
| | | | | | Noticed by Roman Divacky. llvm-svn: 190311
* ObjectiveC modern translator: fix up generated fast enumerationFariborz Jahanian2013-09-051-18/+23
| | | | | | | code to work for bit 32bit and 64bit APIs. // rdar://14913632 llvm-svn: 190072
* Split isFromMainFile into two functions.Eli Friedman2013-08-221-1/+1
| | | | | | | | | Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). llvm-svn: 188968
* Use SmallVectorImpl& for function arguments instead of SmallVector.Craig Topper2013-07-051-10/+10
| | | | llvm-svn: 185715
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-041-8/+8
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* Add 178663 back.Rafael Espindola2013-04-031-17/+17
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-17/+17
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Objective-C modern rewriter. Fixes a bugFariborz Jahanian2013-04-031-3/+9
| | | | | | | | rewriting typedef for a qualified object type and also when two declarations happen to be on the same line. // rdar://13562505 llvm-svn: 178680
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-17/+17
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* Add some assertions to appease the static analyzer.Jordan Rose2013-03-151-2/+1
| | | | | | No functionality change. llvm-svn: 177185
* ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType.Jordan Rose2013-03-081-34/+25
| | | | | | No (intended) functionality change. llvm-svn: 176726
* objective-C modern translator: Fixes a mistranslationFariborz Jahanian2013-02-111-1/+3
| | | | | | | of @throw statement by finding location of the ';' correctly. // rdar://13186010 llvm-svn: 174898
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-1/+2
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* objective-C modern translation: Fix another random translation bugFariborz Jahanian2013-02-081-0/+2
| | | | | | | involving property getter expressions on rhs of property setter. // rdar://13138459 llvm-svn: 174729
* objective-C modern translator. Fixes a trivialFariborz Jahanian2013-02-081-3/+3
| | | | | | | rewriting bug where #ifdef ended up on the same line as the attribute declaration. llvm-svn: 174719
* objective-C modern translator. Generate #lineFariborz Jahanian2013-02-081-7/+11
| | | | | | | info in the translated code under -g only. // rdar://13138170 llvm-svn: 174684
* objective-C modern translator. More fixups for Fariborz Jahanian2013-02-071-2/+23
| | | | | | | modern meta-data abi translation. Still wip. // rdar://13138459 llvm-svn: 174672
* objective-C modern translator. Fix up the translatedFariborz Jahanian2013-02-071-28/+265
| | | | | | | metadata to handle ivar bitfields. This is wip. // rdar://13138459 llvm-svn: 174573
* Rework the traversal of Objective-C categories and extensions toDouglas Gregor2013-01-161-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consider (sub)module visibility. The bulk of this change replaces myriad hand-rolled loops over the linked list of Objective-C categories/extensions attached to an interface declaration with loops using one of the four new category iterator kinds: visible_categories_iterator: Iterates over all visible categories and extensions, hiding any that have their "hidden" bit set. This is by far the most commonly used iterator. known_categories_iterator: Iterates over all categories and extensions, ignoring the "hidden" bit. This tends to be used for redeclaration-like traversals. visible_extensions_iterator: Iterates over all visible extensions, hiding any that have their "hidden" bit set. known_extensions_iterator: Iterates over all extensions, whether they are visible to normal name lookup or not. The effect of this change is that any uses of the visible_ iterators will respect module-import visibility. See the new tests for examples. Note that the old accessors for categories and extensions are gone; there are *Raw() forms for some of them, for those (few) areas of the compiler that have to manipulate the linked list of categories directly. This is generally discouraged. Part two of <rdar://problem/10634711>. llvm-svn: 172665
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-5/+5
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Fix indent and remove parameter with a matching default value.Chad Rosier2013-01-041-48/+38
| | | | llvm-svn: 171545
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-6/+6
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-6/+6
| | | | | | single attribute in the future. llvm-svn: 170500
* Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,Eli Friedman2012-12-131-5/+5
| | | | | | and make sure additional uses don't get introduced. <rdar://problem/12858424>. llvm-svn: 170081
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Don't include Type.h in DeclarationName.h.Benjamin Kramer2012-12-011-0/+1
| | | | | | Recursively prune some includes. llvm-svn: 169094
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-011-6/+7
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. llvm-svn: 169092
* objective-C blocks: Make sure that identical logic is usedFariborz Jahanian2012-11-281-1/+1
| | | | | | | | | | in deciding a copy/dispose field is needed in a byref structure and when generating the copy/dispose helpers. In certain cases, these fields were being added but no copy/dispose was being generated. This was uncovered in ARC, but not in MRR. // rdar://12759433 llvm-svn: 168825
* objective-C modern translator. Start the lineFariborz Jahanian2012-11-071-1/+1
| | | | | | directive on a new line. llvm-svn: 167542
* modern ObjC translator. Insert line number for @synchronized statements.Fariborz Jahanian2012-11-071-1/+3
| | | | llvm-svn: 167511
* objective-C modern rewriter. Insert line numbers inFariborz Jahanian2012-11-061-11/+44
| | | | | | | translated code where new code makes the lines be off. This is wip. llvm-svn: 167500
* RewriteModernObjC.cpp: Use Lexer::Stringify() on the file name of #line ↵NAKAMURA Takumi2012-11-061-1/+1
| | | | | | directive to escape Win32 path separator '\\'. llvm-svn: 167497
* Modern objective-C translator: Start adding line info to theFariborz Jahanian2012-11-061-0/+31
| | | | | | translated source where it is needed. wip. llvm-svn: 167469
* Add FP_CONTRACT support for clang.Lang Hames2012-10-021-2/+3
| | | | | | | | Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). llvm-svn: 164989
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163546
* Fixing the return type information for objc_sync_enter and objc_sync_exit. ↵Aaron Ballman2012-09-061-2/+2
| | | | | | Patch thanks to Joe Ranieri! llvm-svn: 163330
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-011-0/+7540
This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
OpenPOWER on IntegriCloud