summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
* Use trailing documentation comments properlyDmitri Gribenko2013-02-161-1/+1
| | | | | | Patch by Alexander Zinenko. llvm-svn: 175376
* 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-082-2/+4
| | | | | | | 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-082-8/+14
| | | | | | | 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-162-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-11/+10
| | | | | | 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-042-94/+74
| | | | llvm-svn: 171545
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170903
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-202-12/+12
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-192-12/+12
| | | | | | 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-049-23/+23
| | | | | | | | | | | | | 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
* Make helper classes anonymous. Make helper functions static instead of ↵Benjamin Kramer2012-12-011-0/+2
| | | | | | | | private members so the anonymous class doesn't leak out. No functionality change. llvm-svn: 169099
* Include pruning and general cleanup.Benjamin Kramer2012-12-011-1/+3
| | | | llvm-svn: 169095
* 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-012-12/+14
| | | | | | | | | 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-282-2/+2
| | | | | | | | | | 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
* Make libASTMatchers link its dependencies. libRewriteFrontend depends on ↵Benjamin Kramer2012-11-161-0/+1
| | | | | | | | libRewriteCore. LLVM_USED_LIBS does nothing here. llvm-svn: 168172
* 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
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-0/+1
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Remove pointless classof()'s.Sean Silva2012-10-112-7/+0
| | | | | | | Updates to llvm/Support/Casting.h have rendered these classof()'s irrelevant. llvm-svn: 165770
* Silencing an MSVC warning about */ being found outside of a comment.Aaron Ballman2012-10-021-1/+1
| | | | llvm-svn: 165007
* Add FP_CONTRACT support for clang.Lang Hames2012-10-022-3/+5
| | | | | | | | 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
* For PPCallbacks::InclusionDirective() add a parameter for the module, wheneverArgyrios Kyrtzidis2012-09-291-2/+4
| | | | | | | an inclusion directive was automatically turned into a module import, and PPCallbacks::moduleImport() for an explicit module import. llvm-svn: 164874
* Per discussion in ↵Argyrios Kyrtzidis2012-09-271-2/+2
| | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets. rdar://11113134 & http://llvm.org/PR13880 llvm-svn: 164743
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-102-2/+2
| | | | llvm-svn: 163546
* Fixing the return type information for objc_sync_enter and objc_sync_exit. ↵Aaron Ballman2012-09-062-4/+4
| | | | | | Patch thanks to Joe Ranieri! llvm-svn: 163330
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-0119-63/+116
| | | | | | | 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
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-242-42/+25
| | | | | | No functionality change. llvm-svn: 162552
* Modern objc translator: Fixes a crash in rewriter when rewriting the APIFariborz Jahanian2012-08-211-1/+8
| | | | | | for structure valued method messaging. // rdar://12142241 llvm-svn: 162303
* Store SourceManager pointer on PrintingPolicy in the case where we're dumping,Richard Smith2012-08-162-11/+8
| | | | | | | | | and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. llvm-svn: 162011
* [analyzer] Add Prev/Next links to the HTML output.Jordan Rose2012-08-021-1/+2
| | | | llvm-svn: 161153
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+3
| | | | llvm-svn: 160851
* objective-c modern translator. Provide declaration ofFariborz Jahanian2012-07-251-6/+3
| | | | | | | | "memset' lazily when is needed in translation of struct-valued methods which require checkinf of nil receivers outside their bodies. // rdar://11847319 llvm-svn: 160759
* modern objective-c translator: conditionally includeFariborz Jahanian2012-07-161-1/+5
| | | | | | <string.h>. // rdar://11847319 llvm-svn: 160287
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-061-0/+1
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* objective-c modern translator: synthesize argument typeFariborz Jahanian2012-06-291-6/+7
| | | | | | | correctly for blocks and function pointer arguments in the written constructor. // rdar://11359268 llvm-svn: 159456
* modern objc translator: string.h is unavailable on some non-OSXFariborz Jahanian2012-06-291-1/+1
| | | | | | platforms declare memset in rewritten code instead. llvm-svn: 159454
* objective-c modern translator: Translation into objc_msgSend_stretFariborz Jahanian2012-06-291-40/+115
| | | | | | | entry point which requires nil check before calling objc_msgSend_stret. // rdar://11359268 - wip. llvm-svn: 159445
* objective-c rewriter: refactoring of rewriting ofFariborz Jahanian2012-06-281-25/+45
| | | | | | objc_msgSend_stret() API. No functionality change. llvm-svn: 159379
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-3/+9
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Restructure how the driver communicates information about theJohn McCall2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
OpenPOWER on IntegriCloud