aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/objectivec
Commit message (Collapse)AuthorAgeFilesLines
* Down-integrate from google3.Josh Haberman2018-09-042-45/+61
|
* Down-integrate from google3.Feng Xiao2018-08-081-4/+5
|
* Fixed a Visual Studio 2017 build error. (#4488)Ronny Krüger2018-04-162-6/+4
| | | | | | | | | | | | | | | | The current 15.6.x versions of Visual Studio 2017 contain a bug that prevent them from compiling the following construct under certain conditions: std::unique_ptr<std::unique_ptr<Foo> []> foos; This will fail to compile if Foo is an abstract class. To work-around the problem the whole construct was change into: std::vector<std::unique_ptr<Foo>> foos; This not only fixes the compiler error but is also more readable than previous version.
* Don't generate imports for the WKTs unless generating the WKTs.Thomas Van Lenten2018-04-024-8/+21
| | | | | Since the generated header import GPBProtocolBuffers.h, there is no need to generate imports for the WKTs as they will have already been imported.
* Trim imports for bundled generated protos.Thomas Van Lenten2018-04-022-12/+41
| | | | | | | | To avoid a cycle between headers, have the WKTs use minimal imports instead of using the helper to get everything from the library. Fixes https://github.com/google/protobuf/issues/4301 Fixes https://github.com/google/protobuf/issues/4403
* Deleted scoped_ptr.hAdam Cozzette2018-03-145-10/+10
| | | | | We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr.
* Remove stray indent on normal imports.Thomas Van Lenten2018-02-081-2/+2
|
* Fix to use "nil" instead of "NULL" for objc objects.Thomas Van Lenten2018-01-311-1/+1
|
* Removed using statements from common.hAdam Cozzette2018-01-269-68/+68
| | | | | | These statements pulled a bunch of symbols from the std namespace into the global namespace. This commit removes all of them except for std::string, which is a bit trickier to remove.
* Add an explicit import of stdatomic.h.Thomas Van Lenten2018-01-251-0/+35
| | | | | | | | | The generated code for enums needs atomics support, so generate the import instead of relying on it via transitive imports. This will make future changes to this likely likely to break generated code and runtime support are mixed. Followup to https://github.com/google/protobuf/pull/4184.
* Migrate away from deprecated OSAtomic APIs. (#4184)Jonathan Dierksen2018-01-221-2/+3
| | | | * Migrate away from deprecated OSAtomic APIs.
* Support win32 long path for cross compiled buildJisi Liu2017-11-101-6/+11
|
* Make win32_io only for MSVCJisi Liu2017-08-111-1/+1
| | | | | This excludes cygwin and mingw from using the self implemented functions.
* Merge from masterJisi Liu2017-07-251-3/+8
|
* Add std:: namespace prefix to set and map (#3332)tanderson-google2017-07-0916-40/+40
| | | * Remove using std::{set,map}
* Add initialized as a reserved keyword as that's the actual property nameSergio Campama2017-06-291-1/+1
|
* Remove "using namespace std" from stubs/common.hAdam Cozzette2017-04-264-42/+42
| | | | | | | | This prevents the contents of the std namespace from being effectively pulled into the top-level namespace in all translation units that include common.h. I left in individual using statements for a few common things like std::set and std::map, because it did not seem worth going through the churn of updating the whole codebase to fix those right now.
* Merge pull request #2227 from KindDragon/3.1.xFeng Xiao2016-12-161-36/+36
|\ | | | | Missed LIBPROTOC_EXPORT for GRPC added
| * LIBPROTOC_EXPORT added to others functions in csharp_names.h and ↵Arkadiy Shapkin2016-12-011-32/+32
| | | | | | | | objectivec_helpers.h
| * Missed LIBPROTOC_EXPORT for GRPC addedArkadiy Shapkin2016-12-011-4/+4
| |
* | Improve ObjC deprecated annotation support.Thomas Van Lenten2016-12-085-6/+37
|/ | | | | | | | | | | | | | - Check the parent file options for deprecation when deciding to tag Messages and Enums as deprecated. - Within the generated source push/pop the warning for implementing deprecated things around a deprecated class implementation. - Annotate the methods generated for extension fields as deprecated. - Add a testing .proto file that covers deprecated fields, messages, enums, enum values and compile it into the unittests to confirm things compile cleanly. - Add a testing .proto file that uses the file level option to make everything deprecated and compile it into the unittests to confirm things compile cleanly.
* Merge pull request #2112 from pherl/mergeJisi Liu2016-09-152-0/+6
|\ | | | | Merge 3.0.x into master
| * Merge remote-tracking branch 'origin/3.0.x' into mergeJisi Liu2016-09-142-0/+6
| |\
| | * Fixes extra whitespace on generated comments. (#1950)Sergio Campamá2016-08-171-2/+10
| | | | | | | | | | | | Fixes extra whitespace on generated comments.
| | * Adds support for appledoc in generated code. (#1928)Sergio Campamá2016-08-179-37/+74
| | | | | | | | | | | | | | | | | | Convert mapping of proto comments to appledoc format so they show up in Xcode and cocoadocs. Fixes https://github.com/google/protobuf/issues/1866
| | * Add and fix C++ runtime docsJisi Liu2016-08-022-0/+6
| | |
* | | Update the ObjC version checks to support a min and current version.Thomas Van Lenten2016-09-151-10/+14
|/ / | | | | | | | | | | | | | | | | - Capture the version used to generated. - Check at compile time and runtime that generated code isn't from a newer version, also check that the min version required is also supported. - Keep the old constants/macros/functions to special case the last version that was working so those generated sources still work until we decide otherwise.
* | Merge pull request #2090 from guoxiao/findFeng Xiao2016-09-091-0/+1
|\ \ | | | | | | include std::find()
| * | include std::find()Guo Xiao2016-09-081-0/+1
| | |
* | | Merge pull request #1970 from thomasvl/objc_any_helpersThomas Van Lenten2016-09-094-26/+62
|\ \ \ | | | | | | | | Objc any helpers
| * | | Add ObjC helpers for Any WKT.Thomas Van Lenten2016-09-084-26/+62
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Capture the ObjC prefix used when generating the the file. - Track the containing type on descriptors. - Mark descriptors where the message class name got a suffix added to it. - Expose a fullName property on Descriptors. - Add helpers for packing/unpacking Any messages. - Bump the ObjC runtime version number. Since we added methods and invoke them in the generated code, ensure the code is running against a matching version. Otherwise, someone could compile against headers, but run with a framework that is older and get unknown selector failures. This should trip clearer messaging. Fixes https://github.com/google/protobuf/issues/1674
* / / Support the -Wassign-enum compiler flag. (#2085)Sergio Campamá2016-09-086-8/+47
|/ / | | | | | | Support the -Wassign-enum compiler flag.
* | Make Root's +extensionRegistry generation smarter.Thomas Van Lenten2016-09-011-31/+158
| | | | | | | | | | | | | | At generation time, walk the file's dependencies to see what really contains extensions so we can generate more minimal code that only links together the roots that provided extensions. Gets a bunch of otherwise noop code out of the call flow when the roots are +initialized.
* | Speed up ObjC Generation with large dependency treesThomas Van Lenten2016-08-302-54/+14
| | | | | | | | | | | | | | | | | | Don't create FileGenerators for each dep. FileGenerators will deeply create all the message, enum, and field generators; but those aren't needed when doing the imports for dependencies. Instead directly generate the imports off the FileDescriptors so no extra objects are created. The only other use was when chaining together the *Roots for the file extension registry, but that also can be generate off the name of the FileDescriptor directly.
* | Support GenerateAll().Thomas Van Lenten2016-08-264-45/+85
| | | | | | | | | | - Expect calls on GenerateAll() and not Generate(). - Parse the prefix validation file once, and then check all the files.
* | Remove the compiler options from ImportWriter.Thomas Van Lenten2016-08-233-22/+42
| | | | | | | | | | | | | | | | Breaks the tie of the ImportWriter to the ObjC generation, allow grpc to use a different extension and to relay the values they need for these. - Pass in the two framework options to the ctor. - Pass in the header extension to AddFile.
* | Move the ImportWriter into the ObjC Helpers.Thomas Van Lenten2016-08-234-205/+202
| | | | | | | | | | grpc likely needs to provide the same sorta handling, so expose the class so the logic can be reused.
* | Adds better support for protos without packages (#1979)Sergio Campamá2016-08-191-17/+51
| | | | | | | | Adds better support for protos without packages and more warnings on possible improvements
* | Fixes extra whitespace on generated comments. (#1950)Sergio Campamá2016-08-121-2/+10
| | | | | | | | Fixes extra whitespace on generated comments.
* | Adds support for appledoc in generated code. (#1928)Sergio Campamá2016-08-099-37/+74
|/ | | | | | Convert mapping of proto comments to appledoc format so they show up in Xcode and cocoadocs. Fixes https://github.com/google/protobuf/issues/1866
* Correctly sets the generate_for_named_framework option after parsing.Sergio Campama2016-07-231-8/+17
| | | | - Also updates the documentation with a bit more information.
* Fixes the parsing of the proto-framework map file.Sergio Campama2016-07-222-2/+3
| | | | | - Fixes memory issue where the pointer to the StringPiece would be allocated on the stack, and would mangle the output. - Fixes length of the file name when parsing the comma separated files.
* Use public methods to fetch oneofs in generated code.Thomas Van Lenten2016-07-181-1/+1
| | | | | | | | When building into frameworks, the generated code doesn't always have direct access to the proto internals. Instead of opening up the access, just use the public method to fetch the correct oneof. Fixes https://github.com/google/protobuf/issues/1789
* Fix spelling in strings and commentsOtto Kekäläinen2016-07-031-1/+1
|
* Add new generation option for using proto sources from other frameworks.Thomas Van Lenten2016-06-174-127/+325
| | | | | | | | | | | | | | - Better docs in the generator for the different options that can be passed during an invoke of protoc. - Add named_framework_to_proto_path_mappings_path to pass the path to a file containing mappings of frameworks for different proto files. - Update the generation to use the mapping to change the #import directives it creates. Note: the changes in helpers is mostly moving code within the fine, and then a small change to expose the parsing so a passed on class can consume the line. Fixes https://github.com/google/protobuf/issues/1457
* Add support for generation sources into a framework.Thomas Van Lenten2016-06-154-8/+39
| | | | | | | | | | - Add a protoc objc option (generate_for_named_framework) to set the name of the framework all generated sources will be in. - Tweak some comments/naming to make it clear what is the Protobuf framework vs. the framework for generated code. - Update the objc README to document the new generation option to protoc. This is working towards https://github.com/google/protobuf/issues/1457.
* Add more warnings to for the ObjC runtime buildThomas Van Lenten2016-05-253-2/+45
| | | | | | | | | | | | | | Working on https://github.com/google/protobuf/issues/1599, specifically: - Turn on more warnings that the Xcode UI calls out with individual controls. - Manually add: -Wundef -Wswitch-enum - Manually add and then diable in the unittests because of XCTest's headers: -Wreserved-id-macro -Wdocumentation-unknown-command - Manually add -Wdirect-ivar-access, but disable it for the unittests and in the library code (via #pragmas to suppress it). This is done so proto users can enable the warning.
* Better support for using the proto library from a framework.Thomas Van Lenten2016-05-244-48/+199
| | | | | | | | | | | | | | - Add generator constant for the default framework name. - Add generator api for making the CPP symbol from the name. - Add generator api to see if it is a bundled proto file. - Output a CPP conditional and two imports for the core library headers. - Add helper for generating the #import for file headers to deal with the framework imports. - Add a reference from the unittests to a WKT to use that to inspect how imports generate. - Update the podspec to define the CPP symbol and require pods 1.0 (or later). Fixes https://github.com/google/protobuf/issues/1457
* Proper checking of enum with non zero defaultThomas Van Lenten2016-04-261-4/+5
| | | | | | | | | proto2 syntax allows the first enum to have a non zero value. This means any field using that default has a non zero default without having an explicit default being set. So when deciding what runtime info is needed, don't rely on an explicit default, always check that the values aren't zero. Fixes https://github.com/google/protobuf/issues/1453
* Added deprecated option handling for objective-c generatorOleg Vereshko2016-04-045-11/+41
|