| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
This initial commit serves as an example -- the remainder of the
classes using pointer arithmetic for trailing objects will be
converted in subsequent changes.
Differential Revision: http://reviews.llvm.org/D11298
llvm-svn: 244262
|
|
|
|
| |
llvm-svn: 244261
|
|
|
|
|
|
| |
OpenMP 4.1 allows to use variables with reference types in private clauses and, therefore, in init expressions of the cannonical loop forms.
llvm-svn: 244209
|
|
|
|
| |
llvm-svn: 244193
|
|
|
|
|
|
| |
to match the rest of their brethren and reformat the bits that need it.
llvm-svn: 244186
|
|
|
|
|
|
|
|
| |
useless return value. Switch to using it directly when completing the
redeclaration chain for an anonymous declaration, and reduce the set of
declarations that we load in the process to just those of the right kind.
llvm-svn: 244161
|
|
|
|
|
|
| |
intended.
llvm-svn: 244028
|
|
|
|
| |
llvm-svn: 244027
|
|
|
|
| |
llvm-svn: 244026
|
|
|
|
|
|
|
|
|
|
| |
set_size only resets the end pointer and asserts if it is used to grow
the buffer. This would crash when mangling a float with more than 80 bits,
add a test with a ppc double double (128 bits).
Found by inspection.
llvm-svn: 243979
|
|
|
|
|
|
| |
No functionality change intended.
llvm-svn: 243974
|
|
|
|
|
|
|
|
|
| |
This brings ASTContext closer to LLVM's Allocator concept. Ideally we
would just derive ASTContext from llvm::AllocatorBase, but that does
not work because ASTContext's allocator is mutable and we allocate using
const ASTContext& everywhere.
llvm-svn: 243972
|
|
|
|
| |
llvm-svn: 243966
|
|
|
|
|
|
|
|
| |
rather than forcing the bump pointer allocator to produce a viable
pointer. This also fixes UB when we would try to memcpy from the null
incoming StringRef.
llvm-svn: 243947
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the nested name specifier code.
First, skip the entire thing when the input is empty.
Next, handle the case where we started off with a null buffer and a zero
capacity to skip copying and freeing.
This was found with UBSan.
llvm-svn: 243946
|
|
|
|
|
|
|
|
|
|
| |
in inline assembler.
Compiler crashed when vector elements / global register vars were used in inline assembler with "m" restriction. This patch fixes this.
Differential Revision: http://reviews.llvm.org/D10476
llvm-svn: 243870
|
|
|
|
|
|
| |
Extended vector types are mangled just like normal vector types.
llvm-svn: 243828
|
|
|
|
|
|
|
|
| |
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.
llvm-svn: 243635
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 243439
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
chain and fix the cases where it fires.
* Handle the __va_list_tag as a predefined decl. Previously we failed to merge
sometimes it because it's not visible to name lookup. (In passing, remove
redundant __va_list_tag typedefs that we were creating for some ABIs. These
didn't affect the mangling or representation of the type.)
* For Decls derived from Redeclarable that are not in fact redeclarable
(implicit params, function params, ObjC type parameters), remove them from
the list of expected redeclarable decls.
llvm-svn: 243259
|
|
|
|
|
|
| |
These cases should now be impossible as of r243243.
llvm-svn: 243252
|
|
|
|
|
|
|
| |
RecordLayoutBuilder is an inaccruate name because it does not build all
records. It only builds layouts for targets using the Itanium C++ ABI.
llvm-svn: 243225
|
|
|
|
| |
llvm-svn: 243222
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 243221
|
|
|
|
| |
llvm-svn: 243218
|
|
|
|
|
|
|
|
|
| |
This lets us pass functors (and lambdas) without void * tricks. On the
downside we can't pass CXXRecordDecl's Find* members (which are now type
safe) to lookupInBases directly, but a lambda trampoline is a small
price to pay. No functionality change intended.
llvm-svn: 243217
|
|
|
|
|
|
|
|
|
|
| |
We treated DependentSizedArrayTypes with the same element type but
differing size expressions as equivalently canonical. This would lead
to bizarre behavior during template instantiation.
This fixes PR24212.
llvm-svn: 243093
|
|
|
|
|
|
|
| |
for OpenMP 4 target data directive parsing and sema.
This commit is on behalf of Kelvin Li.
llvm-svn: 242785
|
|
|
|
| |
llvm-svn: 242649
|
|
|
|
|
|
|
|
|
| |
StmtRange was just a convenient wrapper for two StmtIterators before
we had real range support. This removes some of the implicit conversions
StmtRange had leading to slightly more verbose code but also should make
more obvious what's going on. No functional change intended.
llvm-svn: 242615
|
|
|
|
|
|
|
|
| |
- Make it a proper random access iterator with a little help from iterator_adaptor_base
- Clean up users of magic dereferencing. The iterator should behave like an Expr **.
- Make it an implementation detail of Stmt. This allows inlining of the assertions.
llvm-svn: 242608
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, explicit specializations are treated like strong external
definitions. However, MSVC treats explicit specializations of static
data members as weak. MSVC 2013's <regex> implementation has such an
explicit specialization which leads to clang emitting a strong
definition in each translation unit which includes it. Tweak clang's
linkage calculation to give such entities GVA_StrongODR linkage instead.
This fixes PR24165.
llvm-svn: 242592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some const-correctness changes snuck in here too, since they were in the
area of code I was modifying.
This seems to make Clang actually work without Bus Error on
32bit-sparc.
Follow-up patches will factor out a trailing-object helper class, to
make classes using the idiom of appending objects to other objects
easier to understand, and to ensure (with static_assert) that required
alignment guarantees continue to hold.
Differential Revision: http://reviews.llvm.org/D10272
llvm-svn: 242554
|
|
|
|
|
|
| |
that appears inside needs to be desugared.
llvm-svn: 242371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps with freeform documentation styles, where otherwise code like
enum class E {
E1, // D1
E2 // D2
};
would result in D1 being associated with E2. To properly associate E1
with D1 and E2 with D2, this patch allows all raw comments C such that
C.isParseAllComments() to participate in trailing comment checks inside
getRawCommentForDeclNoCache. This takes care of linking the intended
documentation with the intended decls. There remains an issue with code
like:
foo(); // DN
int x;
To prevent DN from being associated with x, this patch adds a new test
on preceding-line comments C (where C.isParseAllComments() and also
C's kind is RCK_OrdinaryBCPL or RCK_OrdinaryC) that checks whether C
is the first non-whitespace thing on C's starting line.
Patch from Luke Zarko <zarko@google.com>, D11069 reviewed by rsmith.
llvm-svn: 242317
|
|
|
|
| |
llvm-svn: 242080
|
|
|
|
|
|
|
|
|
|
|
| |
builtins
We should only consider declarations which were written, implicit
declarations shouldn't be considered.
This fixes PR24084.
llvm-svn: 241941
|
|
|
|
|
|
| |
This function will be used for emitting debug info.
llvm-svn: 241748
|
|
|
|
|
|
|
|
|
|
| |
Desugar doesn't necessarily initialize ShouldAKA, but as of r241542 it
may read it. Fix the misuse of the API and initialize this before
passing it in.
Found by ubsan.
llvm-svn: 241705
|
|
|
|
|
|
|
| |
instantiation, use the set of modules visible from the template definition, not
from whichever declaration the specialization was instantiated from.
llvm-svn: 241662
|
|
|
|
|
|
| |
static_assert. Amends r241577.
llvm-svn: 241604
|
|
|
|
|
|
| |
This requires changing a static_assert into an assert, too.
llvm-svn: 241577
|
|
|
|
|
|
|
| |
They aren't universally supported and we're not getting any benefit
from using them.
llvm-svn: 241564
|
|
|
|
|
|
| |
rdar://19670303
llvm-svn: 241561
|
|
|
|
|
|
|
|
| |
implementations.
rdar://20643768
llvm-svn: 241559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when importing type parameter lists. The reason is that type parameters
have their DeclContexts set to the interface that is parameterized with those
types, and the importer would follow that loop and blow the stack out.
I've changed the way this works so that the type parameters are only imported
after the interface that contains them has been registered via the Imported()
function.
This is tested by LLDB.
<rdar://problem/20315663>
llvm-svn: 241556
|
|
|
|
|
|
|
| |
Older versions of Clang cannot handle such local classes properly
rdar://problem/19386032.
llvm-svn: 241550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce co- and contra-variance for Objective-C type parameters,
which allows us to express that (for example) an NSArray is covariant
in its type parameter. This means that NSArray<NSMutableString *> * is
a subtype of NSArray<NSString *> *, which is expected of the immutable
Foundation collections.
Type parameters can be annotated with __covariant or __contravariant
to make them co- or contra-variant, respectively. This feature can be
detected by __has_feature(objc_generics_variance). Implements
rdar://problem/20217490.
llvm-svn: 241549
|
|
|
|
|
|
|
|
|
|
| |
The __kindof type qualifier can be applied to Objective-C object
(pointer) types to indicate id-like behavior, which includes implicit
"downcasting" of __kindof types to subclasses and id-like message-send
behavior. __kindof types provide better type bounds for substitutions
into unspecified generic types, which preserves more type information.
llvm-svn: 241548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach C++'s tentative parsing to handle specializations of Objective-C
class types (e.g., NSArray<NSString *>) as well as Objective-C
protocol qualifiers (id<NSCopying>) by extending type-annotation
tokens to handle this case. As part of this, remove Objective-C
protocol qualifiers from the declaration specifiers, which never
really made sense: instead, provide Sema entry points to make them
part of the type annotation token. Among other things, this properly
diagnoses bogus types such as "<NSCopying> id" which should have been
written as "id <NSCopying>".
Implements template instantiation support for, e.g., NSArray<T>*
in C++. Note that parameterized classes are not templates in the C++
sense, so that cannot (for example) be used as a template argument for
a template template parameter. Part of rdar://problem/6294649.
llvm-svn: 241545
|