summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Output: Generate Base element offset="" attributeBrad King2015-12-0317-19/+47
| | | | | | | | The gccxml output format had this attribute, defined by GCC as "The offset where this basetype appears in its containing type". This is well-defined only for non-virtual base classes. GitHub-Issue: 34
* Add predefined macros for versions of CastXML and internal ClangBrad King2015-12-038-2/+83
| | | | | | | Some translation units may need to know the real tool that is performing the preprocessing even when --castxml-cc-<id> switches predefined macros to those from another compiler. Provide dedicated version macros for both CastXML and the internal Clang against which it is built.
* test: Support absolute paths to expected result filesBrad King2015-12-032-4/+10
| | | | | | Teach test/run.cmake to accept absolute paths to files containing expected results. This will allow tests to compute the expected values at configuration time.
* RunClang: Refactor built-in predefines substitutionBrad King2015-12-031-13/+19
| | | | | | Always split the predefines string into a prefix, body of actual builtins, and suffix. Replace the body with builtins detected from --castxml-cc-<id>, if given.
* Utils: Add function to get version value encoded as an integerBrad King2015-12-032-0/+11
|
* Version: Add macros for individual version componentsBrad King2015-12-032-0/+15
|
* Version: Clarify name of version string macroBrad King2015-12-032-2/+2
|
* Respect LLVM/Clang options for exception handling and rttiBrad King2015-12-021-1/+7
| | | | | | | Add flags as needed to compile our sources consistently with those from LLVM/Clang against which we will link. GitHub-Issue: 40
* doc: Install documentation to a more-standard locationGert Wollny2015-11-301-1/+1
| | | | | | | | On many GNU/Linux distributions the default documentation directory is `<prefix>/share/doc/`. This is a reasonable default for other platforms too. GitHub-Issue: 35
* test: Tolerate warnings about unknown float abiMattias Ellert2015-09-241-0/+1
| | | | | | | | When running with an 'arm' target architecture, Clang warns: warning: unknown platform, assuming -mfloat-abi=soft Tolerate this warning in test output by removing it before matching.
* castxml: Link to LLVMSupport libraryBrad King2015-09-231-0/+1
| | | | | | | | We include LLVM support headers and use the APIs, so we should link to the corresponding library directly instead of depending on a transitive dependency through other libraries we use. GitHub-Issue: 30
* RunClang: Detect C and C++ std level from --castxml-cc-<id>Brad King2015-09-1833-15/+154
| | | | | | | | If no -std= option is explicitly given then parse the __cplusplus or __STDC_VERSION__ preprocessor definition from the compiler output and add the corresponding -std= flag. For MSVC we need to map _MSC_VER to -std= ourselves because the compiler does not define __cplusplus to standard values and each version hard-codes its C++ standard level.
* 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.