| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
CastXML cannot function correctly without Clang resources, so
fail with an error from CMake if they cannot be found.
GitHub-Issue: 12
|
| |
| |
| |
| |
| |
| | |
The gccxml output format includes mangled="" attributes on almost all
elements. Clang only defines mangling for function and variable
declarations. Add mangled attributes to castxml output where possible.
|
| |
| |
| |
| | |
This will allow use of non-const methods on it.
|
| |
| |
| |
| |
| | |
The NamedDecl overload of this method has only one caller. Just
inline the method overload there so that only one overload remains.
|
| |
| |
| |
| |
| | |
VS 2012 does not support 'explicit' conversion operators or
initialization of fields at their declaration.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Refactoring in the parent commit removed the need to consume a node
index when creating a CvQualifiedType element. That commit preserved
the behavior artificially in order to minimize differences in expected
test output. Now remove this behavior and update the expected test
output to account for the now-contiguous indexes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously our handling of cv-qualified types did not account for
multiple locally cv-qualified types encountered through multiple levels
of desugaring. This could lead to CvQualifiedType elements that
reference elements that are generated with a different id.
Refactor our internal representation of dump nodes to keep cv-qualifiers
in the node ids. Teach AddTypeDumpNode to collect cv-qualifiers from
each level of desugaring and compute their union. Once the desugared
unqualified type is found, generate one CvQualifiedType element for the
qualified type, if any.
Update the expected test output to account for the new ordering of
nodes. Mark the Class-template-constructor-template test case as no
longer broken because this approach fixes it. Add test cases covering
cv-qualifiers added at different layers of desugaring (via "T const"
where T is already a "const" type in a template instantiation).
GitHub-Issue: 10
|
| |
| |
| |
| |
| |
| |
| | |
If TEST_UPDATE is set in the environment and a test fails, transform the
actual xml output into the expected xml and overwrite the .xml.txt file
containing the latter. This will help make sweeping updates to the
expected test output when sweeping output format changes are made.
|
| |
| |
| |
| |
| |
| | |
No code needs the compiler to select an overload. We can simply
spell it out explicitly to make manual searching for calls of each
easier.
|
| |
| |
| |
| |
| |
| |
| | |
Also make the --help output more consistent with the wording
in the castxml(1) manual.
GitHub-Issue: 7
|
| |
| |
| |
| |
| |
| |
| | |
Use llvm::Triple to compute the triple string for us. Start with
the builtin default triple and modify its components based on what
we find in the detected preprocessor definitions. Then recompose
the final target triple.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This information is produced by gccxml, so add it to our output too.
Since we don't know the architecture that will be targeted during
testing, match any size and align values with "[0-9]+".
|
| |
| |
| |
| | |
This information is produced by gccxml, so add it to our output too.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A FunctionType may be either FunctionProtoType or FunctionNoProtoType.
Check that runtime downcasts to FunctionProtoType succeed before using
them. For FunctionNoProtoType we will simply output the type "int()",
which is compatible with gccxml format (gccxml never lacked prototypes
because it always operates in C++ mode). In CastXML we can encounter
functions with no prototype in C++ modes when traversing Clang buildins.
GitHub-Issue: 1
|
| |
| |
| |
| | |
This will make it easy to re-run the command by hand for debugging.
|
| | |
|
| |
| |
| |
| | |
We've made modifications in 2015.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Clang renamed clang::DeclContext::{lookup_const_result => lookup_result}.
Use "auto" to automatically match either of these.
Update test expected output to match the lack of throws="" on
destructors in C++98 mode.
|
| |
| |
| |
| | |
Use a range-based for loop instead of explicit iterators.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A namespace may be redeclared to add more members:
namespace ns { void f1(); }
namespace ns { void f2(); }
Fix our AST traversal to consider members from all redeclarations
of each namespace instead of only the canonical (first) one.
Previously we generated members from later redeclarations only
if they were referenced from other declarations we happened to
encounter.
Reported-by: Michka Popoff <michkapopoff@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Separate collection of the members of a given context from printing
of the attribute. This will allow the attribute to be printed with
members collected by other means.
|
| |
| |
| |
| |
| |
| |
| | |
GNU compilers provide a __float128 builtin type on Intel architectures.
When simulating such GNU compiler preprocessing, define a __float128
type with the expected size and alignment in case the translation unit
references it.
|
| | |
|
| |
| |
| |
| |
| | |
Find gcc and g++ tools on the local system to use for running
tests for simulating real compilers with --castxml-cc-gnu.
|
| | |
|
| |
| |
| |
| |
| | |
Fix the start() function in test/input/Function-template.cxx to
actually return a value from its implementation.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 8d8aacd6 (Detect: Use Clang builtin include dir even with
--castxml-cc-<id>, 2015-02-04) we added the Clang builtin include dir
to the beginning of the include path detected by --castxml-cc-msvc.
However, since we use only the detected predefined macros and not
those builtin to Clang, the Clang builtin headers cannot be included
safely. Revert that part of the commit for now.
|
| |
| |
| |
| |
| | |
These macros are builtin to Clang so we should not try to use any such
definitions detected from the compiler.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need implementation-provided headers to come from Clang to match what
is really built in to the parser. When not using --castxml-cc-<id>, the
Clang driver adds its builtin include directory in methods like
Linux::AddClangSystemIncludeArgs
MSVCToolChain::AddClangSystemIncludeArgs
CrossWindowsToolChain::AddClangSystemIncludeArgs
(see lib/Driver/*ToolChain*.cpp). When using --castxml-cc-<id>, we must
add the Clang builtin include dir in the appropriate place.
GNU-like compilers should have a builtin include directory too,
providing files like <emmintrin.h>. The Clang driver does not add this
directory from GCC toolchains and instead adds its own builtin include
directory. In this case, replace the detected compiler builtin include
directory with ours.
MSVC-like compilers have no separate builtin include directory. The
Clang driver simply places its own builtin include direcory before the
system include directory read from the INCLUDE environment variable. In
this case, do the same.
|
| |
| |
| |
| |
| |
| |
| | |
The '-c' option is required to use castxml with ccache to tell ccache
that we are compiling rather than linking. In castxml we already ignore
the option when used with --castxml-gccxml, so add a test case to ensure
the behavior is preserved in the future.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This helps make castxml usable with ccache. In its first pass, ccache
drops the -o and the output file from the command line and add the -E
option to get the preprocessed output. It does not now about
--castxml-gccxml, so castxml must not produce an error when the options
are used together. Instead make -E suppress --castxml-gccxml, much like
compilers do for -E and -c together.
Co-Author: Brad King <brad.king@kitware.com>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Teach AddDumpNode to optionally report back the actual QualType that it
selects after possibly unwrapping some layers of indirection in the
Clang AST. Use this in GetTypeIdRef so that we check this actual
QualType's cv qualifiers instead of the original QualType. Otherwise
we may generate a dangling reference to the id number that is replaced
by a CvQualifiedType id.
Fix the expected output of existing test cases that exhibit this problem
and add a new test case designed to cover the behavior explicitly.
|
| |
| |
| |
| | |
Reference the template parameter type as the typedef'd type.
|
| |
| |
| |
| |
| |
| | |
Only special members may be implicit, and only implicit members may
be left undeclared. Avoid spending the time to mark other members
referenced.
|
| |
| |
| |
| |
| |
| | |
When adding implicit members more classes may be completed. Use a
queue to follow this cleanly instead of allowing a vector to be
reallocated during range interation.
|
| |
| |
| |
| |
| |
| | |
If there are errors in the actual input translation unit, do not bother
trying to extend it with implicit members because we will not generate
output anyway.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use clang::Sema::PerformPendingInstantiations before we attempt to add
implicit member definitions so any real errors show up first. Then set
SuppressAllDiagnostics to suppress errors caused by the following.
Iterate over all members of one class at a time in order of completion
of class definition (bases before derived classes). Force definition of
each member using clang::Sema::MarkFunctionReferenced followed by
another call to clang::Sema::PerformPendingInstantiations to ensure that
members formed by implicitly instantiated templates are completed.
Clang will mark any failed declaration as invalid, allowing us to
exclude it from the output. This works both for implicit and explicit
members.
Update the test suite to mark test cases that are no longer 'broken'.
According to discussion on the Clang cfe-commits mailing list:
[PATCH] Add DiagnosticSuppressionScope RAII class
http://thread.gmane.org/gmane.comp.compilers.clang.scm/110832/focus=111112
this approach may depend on non-guaranteed behavior. By iterating over
members in order of class definition, we mark any bad special members
invalid in base classes so that when Clang processes those in derived
classes the invalid members are only one "step" away. Hopefully this
behavior will be easier to preserve if Clang changes in the future.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tell Clang to enable incremental processing so that it does not tear
down the parser when EOF is reached. In HandleTagDeclDefinition, queue
completed classes for later processing instead of adding class implicit
members immediately. Then add implicit members at the end and finally
call clang::Sema::ActOnEndOfTranslationUnit to tear down the parser when
we are done. This approach allows Clang to finish parsing the
translation unit without interference from our custom implicit member
behavior.
Fix the expected output of the Class-bases test in c++11 mode to match
the new order of the implicit members.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No changes needed. Simply record that we have tested with the newer
version. This version fixes problems with delayed template parsing,
incremental processing, and diagnostic suppression that we need to
fix some of our 'broken' test cases. In particular, we need these:
* r220400 - Fix late template parsing leak with incremental processing,
2014-10-22.
* r223525 - Make DiagnosticErrorTrap work even if SuppressAllDiagnostics
is enabled, 2014-12-05.
|
| |
| |
| |
| |
| |
| |
| | |
When testing CMAKE_CXX_COMPILER_ID, do not explicitly dereference
the variable. Instead let if() do it in an unquoted argument.
This avoids CMP0054 warnings on MSVC.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 5843f590 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 6aa1f800..5843f590
Ben Boeckel (12):
9bf03363 Avoid if() quoted auto-dereference
771e0f22 DynamicLoader: use strings for arguments
86e20d68 Directory: remove extra define
6cc24510 SystemTools: use strings in environment functions
bab5b1f2 SystemTools: add string overload for ReplaceString
f3fb01cf SystemTools: use strings for path-related APIs
0dfbe56d SystemTools: use strings for making C identifiers
4690fc8d SystemTools: use strings in registry function
1b762a41 SystemTools: search for characters
4a060347 SystemInformation: use %ls for WCHAR* format specifiers
d31f7b12 SystemTools: remove unused variable
5843f590 cmake: remove arguments to endfoo and else commands
Brad King (2):
29ffaf43 Suppress deprecation warnings for GetVersionEx
88c8cc7f Fix configure_file call to use COPYONLY, not COPY_ONLY
Clinton Stimpson (1):
5bf91dda SystemTools: Use extended length path for copying files.
Ådne Hovda (1):
2e4a0ff0 SystemInformation: Check for _SC_AIX_REALMEM before using it
Change-Id: Ib4f68d3391c502bc503bde4d6ad582c670392fb8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Traversal of the clang::driver::JobList entries must now use
a range-based for loop.
Update expected test output to add throws="" to implicit class members
in c++98 mode (which Clang previously missed). First run
sed -i 's/artificial="1"/&( throws="")?/' test/expect/*.xml.txt
Then split the c++98 and c++11 outputs that have too many throws=""
instances for the CMake regex paren limit into separate files. For
c++98 we expect throws="" on implicit members. For c++11 we do not.
|
| |
| |
| |
| |
| | |
Traversal of the clang::driver::JobList entries now must use 'const'
clang::driver::Command instances.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 6aa1f800 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 606d7d6f..6aa1f800
Adrien Destugues (1):
b1916e0a SystemInformation: Update CPU count code for Haiku
Ben Boeckel (26):
ef3bfa01 c_str: Don't use .c_str() when streaming strings
9c165368 Glob: Use string comparisons if you have them ready
53ba0bc6 containers: Use .empty() instead of .size() where possible
6cbb57ac strings: Use string methods instead of size calculations
e53596b7 RegularExpression: Add string overloads
aec9de6a CommandLineArguments: Push the string back, not its C string
1d531416 Glob: Accept a string in Glob::AddFile
81f5e0a8 Glob: Accept a string in Glob::AddExpression
d40c2706 SystemTools: Remove redundant if guards
c1296f4a SystemTools: Defer computing length until after a .empty() check
7ffb7106 SystemTools: Use the iterator constructor for strings
29e3b1d8 SystemTools: Use .rfind('/') rather than .find_last_of("/")
5eb3a65c SystemTools: Don't construct a string just for its length
b07b5fc1 SystemTools: Take a string in GetShortPath
153f6df7 SystemTools: Use strings in ComparePath
2c2f6604 SystemTools: Accept strings in IsSubDirectory
84db9ee5 SystemTools: Take strings in AddTranslationPath
4b409aa4 SystemTools: Take strings in SplitPath
d2dbff07 SystemTools: Take strings in CollapseFullPath
e9204f8f SystemTools: Take strings in AddKeepPath
3254681a SystemTools: Reserve memory in JoinPath
6074f33f SystemTools: Use static strings in SystemToolsAppendComponents
9927862c SystemTools: more string replacements
b3d598b0 strings: remove unnecessary c_str calls
ffe94132 SystemTools: use char instead of const char*
f29fec7c Directory: accept strings in methods
Bob E (1):
697b1401 SystemInformation: No SA_RESTART on QNX
Brad King (10):
9c653603 Process: Suppress IBM XL warning about infinite loop in test
88c5a768 Set policy CMP0025 to NEW within KWSys
39f98b5d Encoding: Add self-assignment check to CommandLineArguments
1979c02d hashtable: Poison operator= on internal node type
f3a36760 SystemInformation: Include backtrace APIs whenever we use them
2e00d252 SystemTools: Port cygwin path conversion to modern API
c282e64f Process: Workaround child kill trouble on Cygwin
4791701a SystemTools: Remove ConvertWindowsCommandLineToUnixArguments method
4d526097 Add assert() to quiet Clang scan-build warnings
80e852f6 kwsysPlatformTests: Use if(DEFINED) to simplify conditions
Christian Svensson (1):
32023afd CPU: Add support for OpenRISC 1000
Chuck Atkins (3):
e4bba930 Directory: Make sure the /* suffix uses correct slashes
97817ce7 SystemTools: Refactor test file and directory locations
8f991ab0 SystemTools: Use extended paths on Windows for > 256 length
Clinton Stimpson (7):
0d8ef429 Encoding: Help enforce the use of wide apis on Windows.
cfbc1cc8 FStream: Remove unused basic_filebuf declaration.
b3b20cc0 FStream: Add ability to detect BOM.
c2a329ce Encoding: Fixes uses of stat() on Windows to work with unicode.
65b36ede Encoding: Fix testProcess to work with unicode paths.
93eb1a1f SystemTools: Improve RelativePath() to handle ./ ../ and //
fb77be5a SystemTools: Fix GetCasePathName to handle wildcards on Windows.
Gerhard Grimm (1):
fa86f1ba SystemInformation: Fix HP-UX PA-RISC processor detection
Jiri Malak (2):
e66d99b8 SystemTools: Fix compilation with Open Watcom
36982798 SystemTools: add Watcom single Quote processing
Matt McCormick (1):
b3db597b SystemInformation: Mark EXECINFO_LIB as advanced
Rashad M (1):
e787837a SharedForward: Cast away const to call execvp on MinGW 64-bit
Rolf Eike Beer (3):
a8aa1014 SystemInformation: Fix HP-UX Intel processor detection
a99a9235 set the compile flags for older HP compilers to fix compilation
8b085635 MD5: avoid casting back and forth between size_t and int
Sean McBride (1):
6aa1f800 SystemInformation: Fix clang -Wtautological-pointer-compare warning
Stephen Kelly (1):
dd873734 SystemTools: Remove some unnecessary c_str() calls
Steve Dougherty (1):
5f28a52b Terminal: Fix spelling of 'definitely' in comments
Change-Id: If23ebc713411e1eee3a7951bd2bf56e75c7b6bb6
|
| |
| |
| |
| |
| | |
No changes needed. Simply record that we have tested with the newer
version. The previous version r216002 did not build on MSVC.
|