Tomi Valkeinen
16ccc38221
CppParser: fix compilation warnings
...
Fix the compilation warnings with gcc:
../../../src/CppParser/Parser.cpp: In member function ‘CppSharp::CppParser::AST::DeclarationContext*
CppSharp::CppParser::Parser::GetNamespace(clang::Decl*, clang::DeclContext*)’:
../../../src/CppParser/Parser.cpp:1119:68: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘llvm::StringRef’ [-Wformat=]
printf("Unhandled declaration context kind: %s\n", Kind);
^
../../../src/CppParser/Parser.cpp: In member function ‘CppSharp::CppParser::AST::Declaration* CppSharp::CppParser::Parser::WalkDeclaration(clang::Decl*, bool, bool)’:
../../../src/CppParser/Parser.cpp:2430:51: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘llvm::StringRef’ [-Wformat=]
Debug(" %s (line %u)\n", FileName, LineNo);
^
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
11 years ago
triton
b03a73efa8
Added a cast to get rid of a warning.
11 years ago
João Matos
0212376b90
Merge pull request #245 from azeno/parser-fixes
...
Parser fixes
11 years ago
Elias Holzer
d3fb9289cf
Synced new and old parser.
...
* Implemented missing parts in regards to class templates.
* Fixed couple of class member initialization issues in C++ AST classes.
* Make code more look alike so it's easier to compare them.
* All tests pass now with old and new parser. Especially the nasty STL one with the ostream typedef.
11 years ago
Elias Holzer
3f813bc3ee
Fixed line endings.
11 years ago
João Matos
8658a6b731
Merge pull request #229 from azeno/unnamed-enum-support
...
Unnamed enum support
11 years ago
João Matos
4c9a1f5998
Merge pull request #233 from azeno/property-improvements
...
Improved support for indexed properties
11 years ago
João Matos
b2f419f350
Merge pull request #244 from esdrubal/internal-fields
...
Internal fields
11 years ago
triton
8c75289033
Check for defines before defining to get rid of some warnings.
11 years ago
triton
eb2bbba883
Added better support for nullptr_t types.
11 years ago
triton
6edcb8dd44
Added support for decltype types.
11 years ago
marcos henrich
3e3e605a26
Declaration.IsInternal is no longer true when Declaration.GenerationKind is Generate.
11 years ago
marcos henrich
b5fc658888
CheckIgnoreField now properly handles internal fields.
11 years ago
marcos henrich
20b9f5df52
Replaced some IsGenerated by IsInternal.
11 years ago
João Matos
e95863c2ae
Merge pull request #241 from esdrubal/TryGetClass
...
Separated IsTagDecl into TryGetClass and TryGetEnum, added IsClass() and...
11 years ago
João Matos
02081e5952
Merge pull request #239 from vovkasm/fix_crash_with_va_list_tag
...
Fix crash with parsing stdarg.h (or around this on Mac).
11 years ago
marcos henrich
de764599fa
Separated IsTagDecl into TryGetClass and TryGetEnum, added IsClass() and IsEnum().
11 years ago
Vladimir Timofeev
1a458765ac
Fix crash with parsing stdarg.h (or around this on Mac). Simple skip fake va_list_tag_name declaration as in clang repo in lib/Sema/SemaLookup.cpp
11 years ago
Elias Holzer
bd0ec409e9
Fixed adding of enum items in ASTConverter.
11 years ago
Elias Holzer
d1a3141f5b
The unique name set by the CleanInvalidDeclNames pass will now truly be unique across translation units.
11 years ago
Elias Holzer
6fa7077dbd
Moved unnamed enums test to generator tests.
11 years ago
Elias Holzer
24cd3840b5
Added support for unnamed enums to new parser.
11 years ago
Elias Holzer
502b9e1637
Added test case for unnamed enums - should pass with old parser, but fail with new one.
11 years ago
Elias Holzer
23a0fc2339
Fixed a null pointer exception when parsing files with unnamed enums.
11 years ago
Elias Holzer
c2bfdcc1a6
Helper method FindEnumWithItem will look into namespaces and classes too now.
11 years ago
Elias Holzer
521845be81
Fixed parser to include enumerations which don't have an identifier set.
11 years ago
Elias Holzer
b83b5029b0
Added extension method SetPropertyAsReadOnly to ASTContext.
...
The Property.HasGetter and HasSetter method will take the GenerationKind flag of the field/method pair into account.
11 years ago
Elias Holzer
f9ef513d5f
Removed obsolete code.
11 years ago
Elias Holzer
755861492a
Fixed the getter/setter to property passes to not include synthesized methods.
11 years ago
Elias Holzer
0c260bd223
Improved support for indexed properties.
...
More types and types with different qualifiers are supported now - in both backends. See test cases for details.
11 years ago
Elias Holzer
7478c5329e
Cleaned up tests regarding indexed properties.
11 years ago
triton
44172d2239
Do not check for duplicates when handling preprocessed entities.
...
Even though they share the same original ptr to clang's PreprocessedEntity, they can still have different locations so we need to duplicate them when converting the AST.
11 years ago
triton
55f4b849c7
Explicitly construct the parser and keep it in ParserResult.
...
This fixes some non-deterministic behavior in the new parser but it means we are keeping around all the memory for parsing until the end of the process. This is a bit messy right now but at least we keep the API compatible between parsers. After all the new parser bugs are squashed, this will be reworked.
11 years ago
triton
5a449eaafb
Removed duplicate preprocessed entity add in the new parser.
11 years ago
triton
8eece168db
Added some better logging for macro ignored declarations.
11 years ago
triton
dc6d975487
Ignore TypeAliasTemplate declarations to get rid of some parser warnings.
11 years ago
triton
5c3ffc0e24
Fixed EnumModifiers to define proper power of two values.
11 years ago
triton
8184de63dc
Added SetupLLVMIncludes in build files.
11 years ago
triton
acef972a55
Added support for a "dry run" option that does not write anything to disk.
11 years ago
triton
012efc0948
Minor formatting fixes.
11 years ago
triton
8dbc5b96b8
Remove outdated documentation.
11 years ago
triton
06178f8499
Re-generated the OSX parser bindings.
11 years ago
João Matos
d79d5e7a2d
Merge pull request #237 from azeno/minor-improvements
...
Minor improvements
11 years ago
Elias Holzer
6145bf600b
Do not generate the destructor/finalizer pair if the destructor of the native class is protected.
...
Had to fix line endings (LF) in the CLI* files.
11 years ago
Elias Holzer
b432daab9b
Added missing Visit override to Method class.
11 years ago
Elias Holzer
61a5ceb5c3
Added copy constructors to Class, Parameter and DeclarationContext.
11 years ago
Elias Holzer
c670148493
The FindTypedef method supports full type names now.
11 years ago
Elias Holzer
487189ebad
Fixed the FindOperator method for classes.
...
Added AST test case and fixed line endings (LF).
11 years ago
Elias Holzer
749e5a399e
Added new property Parameter.Index.
...
Also added test which checks whether both parsers assign the AST parameter properties properly.
11 years ago
João Matos
20bd612ced
Merge pull request #236 from azeno/stl-typemaps
...
STL type maps
11 years ago