summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-12/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Use simpler version of fs::create_directory.Rafael Espindola2014-02-131-2/+1
| | | | llvm-svn: 201293
* Enforce safe usage of DiagnosticsEngine::getCustomDiagID()Alp Toker2014-01-262-15/+7
| | | | | | | | | | | | | | | | Replace the last incorrect uses and templatize the function to require a compile-time constant string preventing further misuse. The diagnostic formatter expects well-formed input and has undefined behaviour with arbitrary input or crafted user strings in source files. Accepting user input would also have caused unbounded generation of new diagnostic IDs which can be problematic in long-running sessions or language bindings. This completes the work to fix several incorrect callers that passed user input or raw messages to the diagnostics engine where a constant format string was expected. llvm-svn: 200132
* Identify two more unsafe uses of getCustomDiagID()Alp Toker2014-01-261-0/+4
| | | | llvm-svn: 200126
* ARCMigrate: Introduce proper diagnostics for TransformActionsAlp Toker2014-01-265-68/+38
| | | | | | | | | | | | | | | This starts to switch ARCMT to use proper diagnostic messages. The old use was based on incorrect example code from the documentation. The logic of the previous report() functions has been retained to support any external consumers that might be intercepting diagnostic messages through the old interface. Note that the change in test/Misc/warning-flags.c isn't a new warning without a flag, rather one that was previously invisible to the test. Adding a flag might be a good idea though. llvm-svn: 200124
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-16/+15
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* PlistSupport: Eliminate duplicated EmitLocation() and EmitRange() functionsAlp Toker2014-01-251-0/+1
| | | | llvm-svn: 200077
* PlistSupport: Unify ARCMigrate / StaticAnalyzer plist writersAlp Toker2014-01-251-81/+2
| | | | | | | | Reduces the ARCMT migrator plist writer down to a single function, arcmt::writeARCDiagsToPlist() which shares supporting functions with the analyzer plist writer. llvm-svn: 200075
* Use the simpler version of llvm::sys::fs::remove when possible.Rafael Espindola2014-01-101-2/+1
| | | | llvm-svn: 198957
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-2/+2
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Replacing calls to getAttr with calls to hasAttr for clarity. No functional ↵Aaron Ballman2013-12-193-20/+20
| | | | | | change intended -- this only replaces Boolean uses of getAttr. llvm-svn: 197648
* ObjectiveC migrator. Fixes a bug when protocolFariborz Jahanian2013-12-171-1/+3
| | | | | | conformance is inferred. // rdar://15515206 llvm-svn: 197448
* Re-apply r197076 and r197086; the build was fixed by chapuni in r197114.Hans Wennborg2013-12-122-38/+340
| | | | llvm-svn: 197116
* Revert r197076: "[objcmt] When emitting a remap file, use a json formatHans Wennborg2013-12-122-340/+38
| | | | | | | | | | | | | | | | | | with the edit entries, instead of applying the changes" (And also revert the follow-up r197086.) This seems to have broken Linux builds, which were failing with the following: /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::ObjCMethodDecl const*)' /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::FunctionDecl const*)' collect2: error: ld returned 1 exit status llvm-svn: 197111
* Objective-C migrator: when inferring 'readonly' property of anFariborz Jahanian2013-12-121-1/+3
| | | | | | | Objective-C object conforming to 'NSCopying' protocol, infer a 'copy' property, instead of 'strong'. // rdar://15525937 llvm-svn: 197102
* Remove extra qualification to fix build with g++ after r197076Alp Toker2013-12-111-1/+1
| | | | llvm-svn: 197086
* [objcmt] When emitting a remap file, use a json format with the edit ↵Argyrios Kyrtzidis2013-12-112-38/+340
| | | | | | | | | | | entries, instead of applying the changes to a temp file directly. This allows to combine the edits when they can be different based on whether you saw the implementation or not, e.g. with the designated initializer migration. llvm-svn: 197076
* [objcmt] When whitelisting the headers we want to modify, allow changing theArgyrios Kyrtzidis2013-12-111-9/+43
| | | | | | | | | | the ObjC implementation declarations, just don't change implementations for classes that are not in the whitelisted headers. For example, if we change a method to return 'instancetype' we should also update the method definition in the implementation. llvm-svn: 197075
* [objcmt] Add a modernization option to infer and suggest designated ↵Argyrios Kyrtzidis2013-12-101-0/+59
| | | | | | | | initializers. rdar://15509284 llvm-svn: 196943
* [CMake] clang/lib: Prune redundant dependencies.NAKAMURA Takumi2013-12-101-2/+0
| | | | llvm-svn: 196864
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-2/+11
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-5/+5
| | | | llvm-svn: 196510
* ObjectiveC migrator. delegate property must be Fariborz Jahanian2013-11-211-7/+7
| | | | | | | inferred as 'assign', not 'assign' and 'strong'. // rdar://15509831 llvm-svn: 195368
* ObjectiveC migrator. use strong instead of Fariborz Jahanian2013-11-211-2/+2
| | | | | | | retain attribute for inferred properties. // rdar://15519923 llvm-svn: 195292
* ObjectiveC migrator. Do not migrate categories withFariborz Jahanian2013-11-191-39/+11
| | | | | | 'Deprecated' name suffix. llvm-svn: 195137
* ObjectiveC migrator: This patch sets access propertyFariborz Jahanian2013-11-141-27/+29
| | | | | | attributes on 'readonly' properties. // rdar://15460787 llvm-svn: 194718
* [objcmt] Introduce "objcmt-white-list-dir-path=" option.Argyrios Kyrtzidis2013-11-141-4/+46
| | | | | | | This options accepts a path to a directory, collects the filenames of the files it contains, and the migrator will only modify files with the same filename. llvm-svn: 194710
* [objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are ↵Argyrios Kyrtzidis2013-11-141-3/+7
| | | | | | | | companion flags. Ignore them when determining if some transformation was enabled. llvm-svn: 194709
* [objcmt] If no objcmt options were specified, default to enable ↵Argyrios Kyrtzidis2013-11-131-1/+8
| | | | | | literals+subscripting. llvm-svn: 194629
* [objcmt] Transfer the objcmt flags from the driver to cc1 invocation andArgyrios Kyrtzidis2013-11-131-1/+1
| | | | | | instantiate ObjCMigrateASTConsumer with the specific options that were enabled. llvm-svn: 194628
* [objcmt] Use FileIDs directly instead of their hash value.Argyrios Kyrtzidis2013-11-131-15/+15
| | | | | | No functionality change. llvm-svn: 194590
* ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLYFariborz Jahanian2013-11-131-2/+7
| | | | | | | | on inferred property attribute under -objcmt-ns-nonatomic-iosonly option. // rdar://15442742 llvm-svn: 194532
* ObjectiveC migrator. Another alternative toFariborz Jahanian2013-11-121-1/+4
| | | | | | | | "atomic" or "nonatomic" for properties is NS_NONATOMIC_IOSONLY. Use it if available. // rdar://15442742 llvm-svn: 194503
* ObjectiveC migrator. Added a dropped check in myFariborz Jahanian2013-11-081-1/+2
| | | | | | last patch. llvm-svn: 194238
* ObjectiveC migrator. Fixes an obscure bug whereFariborz Jahanian2013-11-081-2/+6
| | | | | | | | NS_RETURNS_INNER_POINTER ends up unintentionally on the @property under -objcmt-migrate-all // rdar://15396636 llvm-svn: 194233
* ObjectiveC migrator. Please annotation of properties with Fariborz Jahanian2013-11-051-0/+3
| | | | | | | | NS_RETURNS_INNER_POINTER under -objcmt-returns-innerpointer-property flag (off by default), as older compilers do not support such annotations. // rdar://15396636 llvm-svn: 194100
* ObjectiveC migrator. When inferring readwrite property,Fariborz Jahanian2013-11-011-14/+65
| | | | | | | | | | do not remove the setter if its availability differs from availability of the getter (which is now turned into a property). Otherwise, synthesized setter will inherit availability of the property (which is incorrect). // rdar://15300059 llvm-svn: 193837
* ObjectiveC migrator. Change naming hueristic forFariborz Jahanian2013-10-311-4/+4
| | | | | | | deprecated categories, fixes a typo reported by Jordan. llvm-svn: 193759
* ObjectiveC migrator: annotate all protocols/methods inFariborz Jahanian2013-10-311-3/+40
| | | | | | | a category with NSxxxDeprecated name with deprecated annotation. // rdar://15337661 llvm-svn: 193726
* ObjectiveC migrator. Minor clean up of my last patch.Fariborz Jahanian2013-10-171-17/+17
| | | | | | No functional change. llvm-svn: 192933
* ObjectiveC migrator. In infering NS_ENUM/NS_OPTIONSFariborz Jahanian2013-10-171-0/+10
| | | | | | | | macros, prefer the typedef immediately following the enum declaration to the one preceeding it. // rdar://15200915 llvm-svn: 192927
* ObjectiveC migrator. Remove blank linesFariborz Jahanian2013-10-161-3/+6
| | | | | | | when inferring property from setter/getter methods. // rdar://15200949 llvm-svn: 192853
* ObjectiveC migrator. Don't add 'assign' forFariborz Jahanian2013-10-161-2/+5
| | | | | | | inferred properties when type is scalar and assumed to be 'assign. // rdar://15231241 llvm-svn: 192841
* ObjectiveC migrator. 'atomic' is the default attribute.Fariborz Jahanian2013-10-161-14/+37
| | | | | | Don't add it to inferred property. // rdar://14988132 llvm-svn: 192834
* ObjectiveC migrator. Use 'assign' for 'delegate'Fariborz Jahanian2013-10-161-3/+3
| | | | | | properties. // rdar://15231860 llvm-svn: 192826
* ObjectiveC migrator: Support for more possibility ofFariborz Jahanian2013-10-151-28/+84
| | | | | | | | migration to NS_ENUM/NS_OPTIONS macros; when typedef'ed to NSInteger/NSUInteger preceeds well before of the enum declaration. // rdar://15201056 llvm-svn: 192645
* ObjectiveC migrator. also support migration toFariborz Jahanian2013-10-111-10/+24
| | | | | | | NS_ENUM/NS_OPTIONS macros when typedef declaration precedes enum declaration. // rdar://15200915 llvm-svn: 192506
* ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONSFariborz Jahanian2013-10-113-8/+17
| | | | | | | migration, the typedef has annotations. // rdar://15200602 llvm-svn: 192468
* ObjectiveC migrator. When migrating to NS_ENUM/NS_OPTIONS,Fariborz Jahanian2013-10-101-1/+5
| | | | | | | don't leave a blank line behind replacing the typedef decl. // rdar://15200949 llvm-svn: 192407
* ObjectiveC migrator: For 'default' and 'shared' family ofFariborz Jahanian2013-10-101-2/+30
| | | | | | | methods, infer their self's type as their result type. // rdar://15145218 llvm-svn: 192377
OpenPOWER on IntegriCloud