| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Ignore trailing NullStmts in compound expressions when determining the result type and value. This is to match the GCC behavior which ignores semicolons at the end of compound expressions.
Patch by Dominic Ferreira.
llvm-svn: 365498
|
|
|
|
|
|
| |
Clang <= 4 used the pre-C++11 rule about which structures can be passed in registers.
llvm-svn: 364690
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces support of hip_pinned_shadow variable for HIP.
A hip_pinned_shadow variable is a global variable with attribute hip_pinned_shadow.
It has external linkage on device side and has no initializer. It has internal
linkage on host side and has initializer or static constructor. It can be accessed
in both device code and host code.
This allows HIP runtime to implement support of HIP texture reference.
Differential Revision: https://reviews.llvm.org/D62738
llvm-svn: 364381
|
|
|
|
|
|
| |
Rather than create JSON objects for source locations and ranges, we instead stream them out directly. This allows us to elide duplicate information (without JSON field reordering causing an issue) like file names and line numbers, similar to the text dump. This also adds token length information when dumping the source location.
llvm-svn: 364226
|
|
|
|
|
|
| |
the AST to JSON.
llvm-svn: 364078
|
|
|
|
| |
llvm-svn: 364067
|
|
|
|
|
|
| |
This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note.
llvm-svn: 364055
|
|
|
|
| |
llvm-svn: 364043
|
|
|
|
| |
llvm-svn: 364033
|
|
|
|
|
|
| |
to JSON.
llvm-svn: 363988
|
|
|
|
|
|
| |
to JSON.
llvm-svn: 363966
|
|
|
|
| |
llvm-svn: 363965
|
|
|
|
|
|
| |
the AST to JSON.
llvm-svn: 363943
|
|
|
|
| |
llvm-svn: 363932
|
|
|
|
|
|
| |
when dumping the AST to JSON.
llvm-svn: 363926
|
|
|
|
|
|
| |
dumping the AST to JSON.
llvm-svn: 363873
|
|
|
|
|
|
| |
the AST to JSON.
llvm-svn: 363869
|
|
|
|
| |
llvm-svn: 363866
|
|
|
|
| |
llvm-svn: 363859
|
|
|
|
| |
llvm-svn: 363849
|
|
|
|
|
|
| |
Patch by Abhishek Bhaskar.
llvm-svn: 363820
|
|
|
|
|
|
|
|
| |
about template arguments.
Previously, we attempted to write out template parameters and specializations to their own array, but due to the architecture of the ASTNodeTraverser, this meant that other nodes were not being written out. This now follows the same behavior as the regular AST dumper and puts all the (correct) information into the "inner" array. When we correct the AST node traverser itself, we can revisit splitting this information into separate arrays again.
llvm-svn: 363819
|
|
|
|
| |
llvm-svn: 363709
|
|
|
|
| |
llvm-svn: 363699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When using ConstantExpr we often need the result of the expression to be kept in the AST. Currently this is done on a by the node that needs the result and has been done multiple times for enumerator, for constexpr variables... . This patch adds to ConstantExpr the ability to store the result of evaluating the expression. no functional changes expected.
Changes:
- Add trailling object to ConstantExpr that can hold an APValue or an uint64_t. the uint64_t is here because most ConstantExpr yield integral values so there is an optimized layout for integral values.
- Add basic* serialization support for the trailing result.
- Move conversion functions from an enum to a fltSemantics from clang::FloatingLiteral to llvm::APFloatBase. this change is to make it usable for serializing APValues.
- Add basic* Import support for the trailing result.
- ConstantExpr created in CheckConvertedConstantExpression now stores the result in the ConstantExpr Node.
- Adapt AST dump to print the result when present.
basic* : None, Indeterminate, Int, Float, FixedPoint, ComplexInt, ComplexFloat,
the result is not yet used anywhere but for -ast-dump.
Reviewers: rsmith, martong, shafik
Reviewed By: rsmith
Subscribers: rnkovacs, hiraditya, dexonsmith, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D62399
llvm-svn: 363493
|
|
|
|
|
|
|
| |
Begin restructuring to support the forms of non-odr-use reference
permitted by DR712.
llvm-svn: 363086
|
|
|
|
|
|
| |
'this' capture initialization.
llvm-svn: 362317
|
|
|
|
|
|
|
|
|
| |
regenerate the test expectations.
(Only two tests change, as a result of no longer matching the 0x in a
pointer; the other tests were already excluding that.)
llvm-svn: 362316
|
|
|
|
|
|
|
|
|
|
| |
and returned to the context in which 'this' should be captured.
This means we now always mark 'this' referenced from the context in
which it's actually referenced, rather than potentially from some
context nested within that.
llvm-svn: 362182
|
|
|
|
| |
llvm-svn: 361895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capturing expression or statement.
No functionality change yet. The intent is that we will also delay
building the initialization expression until the enclosing context, so
that:
a) we build the initialization expression in the right context, and
b) we can elide captures that are not odr-used, as suggested by P0588R1.
This also consolidates some duplicated code building capture fields into
a single place.
llvm-svn: 361893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adjusts `PragmaOpenMPHandler` to set the location of
`tok::annot_pragma_openmp` to the `#pragma` location instead of the
`omp` location so that the former becomes the start location of the
OpenMP AST node. This can be useful when, for example, rewriting a
directive using Clang's Rewrite facility. Most of this patch updates
tests for changes to locations in diagnostics and `-ast-dump` output.
Reviewed By: ABataev, lebedev.ri, Meinersbur, aaron.ballman
Differential Revision: https://reviews.llvm.org/D61509
llvm-svn: 361867
|
|
|
|
|
|
| |
expression with a type operand.
llvm-svn: 361769
|
|
|
|
| |
llvm-svn: 361768
|
|
|
|
| |
llvm-svn: 361767
|
|
|
|
|
|
| |
expression.
llvm-svn: 361766
|
|
|
|
| |
llvm-svn: 361764
|
|
|
|
| |
llvm-svn: 361662
|
|
|
|
|
|
| |
catch-all statements.
llvm-svn: 361660
|
|
|
|
| |
llvm-svn: 361652
|
|
|
|
|
|
|
|
| |
no_sanitize_foo attribute into a no_sanitize("foo") attribute.
This fixes a crash when AST pretty printing declarations marked with no_sanitize_memory.
llvm-svn: 361274
|
|
|
|
| |
llvm-svn: 361265
|
|
|
|
|
|
| |
This adds tests for dumping expressions in C. It also updates a comment to note an issue to be fixed with printing character literals discovered as part of this testing.
llvm-svn: 361193
|
|
|
|
| |
llvm-svn: 361172
|
|
|
|
|
|
| |
This adds tests for dumping records and statements.
llvm-svn: 361065
|
|
|
|
|
|
| |
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests.
llvm-svn: 360622
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
currently for:
```
template<typename ... T>
void f(T... t) {
auto l = [t...]{};
}
```
`clang -ast-print file.cpp`
outputs:
```
template <typename ...T> void f(T ...t) {
auto l = [t] {
}
;
}
```
notice that there is not `...` in the capture list of the lambda. this patch fixes this issue. and add test for it.
Patch by Tyker
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61556
llvm-svn: 359980
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FIXME of this test case has been addressed in r335084/r338800. Its
execution still does not succeed because of multiple syntax errors.
First, the "clang" namespace is missing on each of the 4 pragmas.
Second, the pragma for defining the vector width is "vectorize_width(4)"
instead of "vectorize(4)". Third, the pragma for defining the interleave
factor is "interleave_count(8)" instead of "interleave(8)".
The file was already using the wrong syntax when added in
r210925 2014-06-13. The file ast-print-pragmas.cpp already checks for
the correct pragma order, making this test redundant even if fixed.
Differential Revision: https://reviews.llvm.org/D60749
llvm-svn: 358507
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- `@property(attr, attr2)` instead of `@property ( attr,attr2 )`.
- Change priority of attributes (see code/comments inline).
- Support for printing weak and unsafe_unretained attributes.
Subscribers: arphaman, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57965
llvm-svn: 357937
|
|
|
|
|
|
|
|
| |
Fails on MSVC buildbot (but not locally).
Not important as it is 'testing' something that isn't supported yet anyway:
https://bugs.llvm.org/show_bug.cgi?id=41022
llvm-svn: 356577
|