summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Documentation cleanup: Escaped backslashes in Doxygen comments.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158567
* Fix crash on missing header in -rewrite-includes.David Blaikie2012-06-141-1/+2
| | | | llvm-svn: 158459
* Rename -rewrite-includes to -frewrite-includes.David Blaikie2012-06-141-3/+3
| | | | llvm-svn: 158458
* PR13064: Store whether an in-class initializer uses direct or copyRichard Smith2012-06-102-15/+14
| | | | | | | initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
* Replace a char counting helper function with std::count.Benjamin Kramer2012-06-091-12/+2
| | | | | | No functionality change. llvm-svn: 158272
* Convert comments to proper Doxygen comments.Dmitri Gribenko2012-06-081-5/+5
| | | | llvm-svn: 158241
* Disable _Pragma during HTML macro rewriting to keep from crashing.Jordan Rose2012-06-081-1/+7
| | | | | | | | | | | | | | | | | | | The preprocessor's handling of diagnostic push/pops is stateful, so encountering pragmas during a re-parse causes problems. HTMLRewrite already filters out normal # directives including #pragma, so it's clear it's not expected to be interpreting pragmas in this mode. This fix adds a flag to Preprocessor to explicitly disable pragmas. The "right" fix might be to separate pragma lexing from pragma parsing so that we can throw away pragmas like we do preprocessor directives, but right now it's important to get the fix in. Note that this has nothing to do with the "hack" of re-using the input preprocessor in HTMLRewrite. Even if we someday copy the preprocessor instead of re-using it, the copy would (and should) include the diagnostic level tables and have the same problems. llvm-svn: 158214
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-062-19/+19
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Add a -rewrite-includes option, which is similar to -rewrite-macros, but ↵David Blaikie2012-06-063-0/+380
| | | | | | | | | only expands #include directives. Patch contributed by Lubos Lunak (l.lunax@suse.cz). Review by Matt Beaumont-Gay (matthewbg@google.com). llvm-svn: 158093
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-022-2/+2
| | | | llvm-svn: 157886
* clang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. ↵NAKAMURA Takumi2012-05-271-0/+4
| | | | | | Win32 doesn't allow rename/removing opened files. llvm-svn: 157528
* cleanup some code.Fariborz Jahanian2012-05-241-3/+2
| | | | llvm-svn: 157436
* modern objc translation: Add translation of @autoreleasepoolFariborz Jahanian2012-05-231-0/+25
| | | | | | statement. // rdar://11474836. llvm-svn: 157359
* Adds a method overwriteChangedFiles to the Rewriter. This is implemented byManuel Klimek2012-05-221-1/+69
| | | | | | | | | first writing the changed files to a temporary location and then overwriting the original files atomically. Also adds a RewriterTestContext to aid unit testing rewrting logic in general. llvm-svn: 157260
* Modern objective-c translation. Translating defaultFariborz Jahanian2012-05-081-19/+74
| | | | | | synthesis of property getter/setters. // rdar://11374235 llvm-svn: 156447
* modern objc translation. objc_getClass() and objc_getMetaClass()Fariborz Jahanian2012-05-081-17/+14
| | | | | | | prototypes should both return `struct objc_class *`. // rdar://11375495 llvm-svn: 156418
* Revert r156097, which appears to be causing some breakage.Douglas Gregor2012-05-071-2/+2
| | | | llvm-svn: 156304
* objc modern translator: fix up attribute for dynamic property in a category.Fariborz Jahanian2012-05-031-1/+1
| | | | | | // rdar://11095151 llvm-svn: 156127
* modern objc translator: support for default propertyFariborz Jahanian2012-05-031-15/+31
| | | | | | synthesis translation. // rdar://11374235 - wip. llvm-svn: 156125
* modern objc translator: used size_t in coupleFariborz Jahanian2012-05-031-2/+2
| | | | | | of places. // rdar://11375908 llvm-svn: 156106
* modern objc translation. objc_getClass() and objc_getMetaClass()Fariborz Jahanian2012-05-031-2/+2
| | | | | | | prototypes should both return `struct objc_class *`. // rdar://11375495 llvm-svn: 156097
* modern objective-c translator: Fix destructor def.Fariborz Jahanian2012-05-021-1/+1
| | | | | | for __NSContainer_literal. llvm-svn: 156035
* Modern objective-c translation: Fixing couple of bugsFariborz Jahanian2012-05-021-2/+14
| | | | | | | related to laying out ivar structs and accessing non-fragile-ivar in more compilated cases. // rdar://11323187 llvm-svn: 156004
* modern objective-c translation of private ivars.Fariborz Jahanian2012-05-011-24/+16
| | | | | | // rdar://11351299 llvm-svn: 155921
* modern objective-c translator. named aggregate typesFariborz Jahanian2012-04-301-13/+68
| | | | | | | | defined inside the objc class belong to class's decl. scope. This is to conform to objective-c rules. // rdar://11351299 llvm-svn: 155855
* minor refactoring of modern objc translator.Fariborz Jahanian2012-04-301-5/+17
| | | | llvm-svn: 155843
* modern objective-c translation: de-virtualize allFariborz Jahanian2012-04-301-9/+9
| | | | | | local rewriting functions. llvm-svn: 155826
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-302-35/+35
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
OpenPOWER on IntegriCloud