summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* castxml: Allow --castxml-cc-<id> to detect C language settingsBrad King2015-09-1816-15/+200
| | | | | | If the "<id>" is "gnu-c" or "msvc-c" then run the given compiler command line on a C source file instead of C++. This allows C language settings of the given compiler to be detected.
* RunClang: Exit with error if compiler invocation argument parsing failsBrad King2015-09-186-0/+9
| | | | | If an error occurs during CompilerInvocation::CreateFromArgs then exit with an error code immediately.
* test: Use more realistic macros in --castxml-cc-<id> casesBrad King2015-09-186-12/+18
| | | | | Define some of the compiler-identifying macros actually defined by GNU and MSVC compilers.
* test: Cover --castxml-cc-<id> with a bad commandBrad King2015-09-185-0/+10
|
* test: Rename cc detection tests for source file languageBrad King2015-09-179-8/+8
| | | | | | Add "-src" to the test names to indicate that they cover handling of an input source file of each language rather than detection of compiler settings for each language.
* castxml: Support -std=c++14 with --castxml-gccxmlBrad King2015-09-027-9/+114
| | | | | | | | Drop the rejection of -std=c++14 and --castxml-gccxml together. Extend the test suite to run all gccxml output format tests in -std=c++14 mode to verify the behavior of the mode is as close as possible to other modes. For the few tests that have c++11-specific expected output, use it for c++14 expected output too.
* Detect: Add more VS predefined macrosBrad King2015-08-251-0/+12
| | | | | Use the table at https://msdn.microsoft.com/en-us/library/b0084kay.aspx to add a few missing VS 2015 predefined macros to our detection table.
* Port to LLVM/Clang SVN r245954 (trunk)Brad King2015-08-252-2/+5
| | | | | Since LLVM r244854 there is no BumpPtrStringSaver, but StringSaver can be constructed with a BumpPtrAllocator.
* Output: Add overrides="" attribute to methodsJörg Wollenschläger2015-08-254-0/+63
| | | | The gccxml output format had this attribute.
* Output: Add annotate() to more declaration attributes=""Jörg Wollenschläger2015-08-2413-3/+92
| | | | | | | Extend the change from commit e73fba54 (Output: Add annotate() to function declaration attributes="", 2015-08-18) to support record, enum, field, variable, and typedef since gccxml also supported attributes in these.
* KWSys: Remove source "CTestCustom.cmake.in" not used by CastXMLBrad King2015-08-201-15/+0
|
* Merge branch 'upstream-kwsys'Brad King2015-08-2012-1359/+1395
|\ | | | | | | | | Resolve conflicts in files that we previously removed from our side by removing them again.
| * KWSys 2015-08-07 (b9df3e48)KWSys Robot2015-08-2031-1532/+2202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ b9df3e48 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 5843f590..b9df3e48 Ben Boeckel (1): 425fa73e Add missing malloc return value casts Brad King (24): dec9c30b SharedForward: Hard-code the ldpath buffer size to below VS 14 limit 9c3eacf8 Add CONTRIBUTING.rst file with instructions to contribute cc4046a8 Directory: Work around PGI problem with Linux Large File Support 5a15cb3b Base64: Use size_t for lenghts in API 57c3ef1d Suppress deprecation warnings for GetVersionEx on Intel compiler b33e7b96 FStream: Fix exception spec on our standard stream replacements d4e7f08e Directory: Check opendir return value before using it 4a698414 hashtable: Give prime number table functions internal linkage 20f50727 SystemInformation: Add missing 'break' in StacktraceSignalHandler 69bccf2e SystemTools: Teach Touch with !create to succeed on missing file 1ea01a46 Tell Git to export '.gitattributes' 4f39791b Glob: Add explicit assignment operator to Message member c2387a4b DynamicLoader: Fix CloseLibrary for failed OpenLibrary on HP-UX 8c8b2273 Process: Refactor child pipe creation 34fceb50 Process: Add option to merge stdout/stderr b1d560a0 CPU: MIPS is biendian 61e0419f SystemTools: Teach RemoveFile to tolerate missing file d217407c SystemTools: Fix preprocessor check WIN32 => _WIN32 1f19c187 CONTRIBUTING: Spell "offered" correctly 8504e845 Process: Simplify Windows command line construction d3ba91e1 System: Drop Shell_* APIs 86a24794 SystemTools: Fix GetActualCaseForPath drive letter case handling c9336bcf SystemTools: Optimize GetActualCaseForPath memoization 83b4a6b8 Process: Fix conversion warning in testProcess.c Domen Vrankar (5): 2b042ff6 SystemTools: Optionally report error from GetRealPath 7c9a970a Glob: Remove dead code 1b75ad3d Glob: Remove addition of extra '/' 5d6204e9 Glob: Handle symlink cycles in directory paths 4890f30c Glob: Add support for directory listing James Johnston (9): 4cd8846c Process: Remove trailing whitespace in ProcessUNIX.c b1c44c58 Process: Refactor sleeping code in testProcess.c. faff2ab0 Process: Wait for children to terminate on Ctrl+C. ef517b19 Process: Added initial support for process groups. 906c2cae Process: Added test cases for testing Ctrl+C and process groups. 52874e6a Process: Fix leaked file descriptor in ProcessUNIX f63febb7 Process: Fix error message for startup failure on Windows dad68c33 Encoding: Fix undefined behavior if out of memory. 0bca555e Process: Test running a process many times to discover resource leaks Jean-Christophe Fillion-Robin (4): c38ba638 SystemInformation: Improve Get(Available/Total)VirtualMemory for windows 58308145 SystemInformation: Improve comments in private implementation e5c23738 SystemTools: Fix DetectFileType failure on missing file 6d83c113 SystemTools: Fix DetectFileType failure on directory Matt McCormick (1): 9a6b7c3f cmake: Set CMP0056 to NEW Mattias Ellert (1): b9df3e48 Fix implementation of KWSYS_PROPERTIES_C Paul Martin (1): d2aa1afd SystemTools: Update CopyFileAlways stream library workarounds Sean McBride (3): 87c65319 SharedForward: Suppress clang -Wcast-qual warnings with conditional pragma 093eae34 SystemInformation: Fix -Wswitch-enum warnings 9367a33b testHashSTL: Fix warnings by marking private functions static Sebastian Schuberth (1): 4db8e69f SystemTools: Implement FileIsSymlink on Windows Simon Gomizelj (1): 2f0165f1 Terminal: Add xterm-termite to VT100 color support whitelist Stephen Kelly (3): e4fe1d1a SystemTools: Refactor selection of Windows directory APIs af86ac7d SystemTools: Fix build with SunCC/stlport. d30c9b03 Workaround SolarisStudio bug with libstdc++. Zack Galbreath (1): 8533a79b SystemInformation: Add GetLoadAverage() method
* | KWSys: Drop portions not used by CastXMLBrad King2015-08-2068-26348/+9
| | | | | | | | | | | | | | We have KWSys in CastXML only for the Process execution library, and will drop it if an alternative becomes available in LLVM. Add CastXML-specific conditions to src/kwsys/CMakeLists.txt to turn off the parts we do not use. Also drop the corresponding source files.
* | Include KWSys Configure.h instead of Configure.hxxBrad King2015-08-203-3/+3
| | | | | | | | We do not need any of the settings from the latter.
* | Do not build unused KWSys SystemToolsBrad King2015-08-201-2/+0
| | | | | | | | | | We have no uses of SystemTools, so do not tell KWSys to build it. This also leaves RegularExpression unused, so drop that too.
* | Utils: Avoid use of KWSys SystemToolsBrad King2015-08-201-11/+15
| | | | | | | | Use llvm::sys instead.
* | Utils: Avoid use of KWSys SystemTools::GetLineFromStreamBrad King2015-08-201-4/+4
| | | | | | | | Use std::getline instead.
* | RunClang: Avoid use of KWSys SystemToolsBrad King2015-08-201-4/+4
| | | | | | | | Use llvm::sys instead.
* | Detect: Avoid use of KWSys SystemTools::FileExistsBrad King2015-08-201-3/+2
| | | | | | | | Use llvm::sys::fs::exists instead.
* | Detect: Avoid use of KWSys SystemTools::SplitBrad King2015-08-201-6/+8
| | | | | | | | Use llvm::StringRef::split instead.
* | Detect: Avoid use of KWSys SystemTools::GetEnvBrad King2015-08-201-1/+2
| | | | | | | | Use std::getenv instead.
* | Detect: Avoid use of KWSys SystemTools::ConvertToUnixSlashesBrad King2015-08-201-2/+3
| | | | | | | | | | We do not need the full conversion performed by ConvertToUnixSlashes. Simply use std::replace to convert backslashes to forward slashes.
* | Output: Add annotate() to function argument attributes=""Michka Popoff2015-08-204-0/+15
| | | | | | | | | | | | Extend the change from commit e73fba54 (Output: Add annotate() to function declaration attributes="", 2015-08-18) to function arguments since gccxml also supported attributes there.
* | Output: Add annotate() to function declaration attributes=""Brad King2015-08-1819-0/+191
| | | | | | | | | | | | | | | | | | While CastXML cannot support the `gccxml()` attribute because Clang does not define it, we can support the `annotate()` attribute that Clang provides for arbitrary string annotations. This should fill the same use case as the `gccxml()` attribute did for clients. GitHub-Issue: 25
* | Output: Refactor attributes="" printing to use a helperBrad King2015-08-181-9/+35
| | | | | | | | | | Add a PrintAttributesAttribute helper and use it anywhere we currently print the attributes="" attribute.
* | test: Add tests for Constructor, Destructor, and Converter elementsBrad King2015-08-187-0/+65
| |
* | test: Fix message about GNU CXX compiler that we find for testingBrad King2015-08-181-2/+1
| | | | | | | | | | Remove a stray line and fix a typo introduced by commit 5c8a1e73 (test: Add infrastructure to run tests against real GNU compilers, 2015-02-24).
* | RunClang: Exit with error if compilation jobs fail to buildBrad King2015-08-075-0/+8
| | | | | | | | | | | | | | | | If an error occurs during Driver::BuildCompilation then exit with an error code immediately. This is important when an input file is missing, for example. GitHub-Issue: 23
* | Port to LLVM/Clang SVN r243888 (trunk) and 3.7Brad King2015-08-032-3/+4
| | | | | | | | Use `auto` to adapt to the Compilation::getJobs() return type.
* | test: Run __float128 tests only if GNU compiler supports itBrad King2015-07-201-12/+34
| | | | | | | | | | | | | | | | | | CastXML conditionally supports __float128 when asked to simulate a GNU compiler that supports it. The type is available only on certain architectures, so do not run the tests for __float128 if the GNU compiler does not support it for the current architecture. GitHub-Issue: 22
* | Port to LLVM/Clang SVN r240941 (trunk)Brad King2015-06-293-1/+24
| | | | | | | | | | | | | | Update use of the llvm::opt::OptTable::ParseArgs method and the llvm::cl::ExpandResponseFiles function to account for post-3.6 changes to the LLVM/Clang API. Use preprocessor conditions so that we can continue to build against LLVM/Clang 3.6 too.
* | Fix compilation with GNU tools on WindowsBrad King2015-06-291-1/+7
| | | | | | | | | | | | | | With MinGW and Cygwin tools, LLVM upstream uses -std=gnu++11 instead of -std=c++11 because the latter lacks things like "strdup". Do the same. GitHub-Issue: 19
* | Output: Further hide our __float128 struct from generated xmlBrad King2015-06-248-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give the our __float128 struct an internal '__castxml' name so that it can be identified during traversal of member lists. Do not report the struct as a member of the translation unit since the typedef will be generated as a FundamentalType directly. Also generate empty mangled="" attributes for mangled names involving our __float128 struct since the mangled names will not use the "g" that GCC would for the builtin type. Add test cases that do not use --castxml-start. Verify that no test case produces '__castxml' in its output to ensure we always hide such internal details from the generated output. GitHub-Issue: 18
* | Output: Add local variable to one case in AddDeclContextMembersBrad King2015-06-231-1/+3
| | | | | | | | | | Save the CXXRecordDecl downcast in a local variable so we can use it multiple times.
* | test: Add infrastructure to test without --castxml-start optionBrad King2015-06-231-1/+1
| |
* | Output: Generate a FundamentalType for our __float128 typedefBrad King2015-06-233-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | GNU compilers have a builtin __float128 type but Clang does not. Since commit fe1bb977ee (Detect: Provide __float128 when simulating GNU compilers, 2015-02-24) we define __float128 as a typedef in the preamble referencing a struct with the proper size and alignment. Avoid exposing this implementation detail to clients by generating a FundamentalType element as a special case when our typedef is encountered. This matches gccxml behavior when __float128 is encountered. GitHub-Issue: 18
* | castxml: Teach --castxml-start to support a comma-separated listMichka Popoff2015-06-085-6/+45
| | | | | | | | | | | | | | In gccxml one could input a comma-separated list for the starting declarations to parse. Add support for this with tests for cases were a comma-separated list is used, and for the case where --castxml-start is used multiple times.
* | test: Add infrastructure for custom test input and start optionsBrad King2015-06-081-2/+13
| |
* | test: Add case for nested namespacesBrad King2015-06-083-0/+25
| |
* | castxml: Allow -target option to override --castxml-cc-<id> detectionBrad King2015-05-287-2/+17
| | | | | | | | | | | | | | If the command line contains an explicit '-target' option then do not consider the target platform detected from any --castxml-cc-<id> option. Instead simply honor the explicitly requested target. This will be particularly helpful for targets that CastXML has not learned to detect.
* | test: Add cases covering --castxml-cc-<id> target triple detectionBrad King2015-05-2812-2/+54
| | | | | | | | | | Add test cases for the changes in commit 3c777ef360 (Detect: Improve target triple selection, 2015-04-16).
* | doc: Add CastXML homepage link to html documentation layoutBrad King2015-05-272-1/+10
| |
* | test: Fix xml output matching on i386-pc-windows-msvc targetsBrad King2015-05-271-0/+2
| | | | | | | | | | | | | | | | Class methods have an extra attributes="__thiscall__" xml attribute on this architecture that does not appear in our test expectation files. We already have an explicit test that this function type attribute is generated, so simply filter it out from test output before matching.
* | Output: Move function type attributes to end of element attribute listBrad King2015-05-272-4/+4
| | | | | | | | | | | | | | Function type attributes like attributes="__thiscall__" are specific to the architecture and so may need to be filtered during testing. Move them to be the last xml attribute in their element to make filtering easier.
* | Output: Generate throw="..." instead of throws="..."Michka Popoff2015-05-2135-151/+151
| | | | | | | | | | | | Original gccxml output used the singular name, so we should too for compatibility. Fix this typo left from commit defc576826 (Output: Generate Function and related elements, 2014-02-12).
* | Output: Place inline namespace members in containing namespaceBrad King2015-05-158-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An inline namespace affects the linkage of its members but for APIs the members are effectively in the containing namespace. Generate output as if they were really in the containing namespace and do not generate a Namespace element for an inline namespace. If --castxml-start names an inline namespace simply ignore it to avoid dumping a Namespace element for it. One can argue this is valid since the inline namespace should not normally be named in API usage. Set our printing policy to avoid showing the inline namespace component automatically. Note that expressions in the source code that hard-code the inline namespace name will still be preserved and show the inline namespace when printed (e.g. Variable init="" attribute expressions). Suggested-by: Michka Popoff <michkapopoff@gmail.com>
* | Output: Refactor Clang printing policy selectionBrad King2015-05-151-5/+10
| | | | | | | | Store our printing policy in a member up front.
* | Output: Do not generate name="" attribute on anonymous namespacesBrad King2015-05-154-1/+18
| | | | | | | | Be consistent with gccxml which did not generate the attribute.
* | Disallow LLVM/Clang build tree explicitly; require install treeBrad King2015-05-141-0/+10
| | | | | | | | | | | | | | | | CastXML builds and works correctly only against a LLVM/Clang install tree. This is specified in the README.rst, but we can also catch and fail early on attempts to use a build tree. GitHub-Issue: 12