| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
constructor with invalid code.
rdar://12240916
llvm-svn: 165623
|
|
|
|
|
|
| |
what's going on, per Sean Silva's suggestion.
llvm-svn: 165286
|
|
|
|
|
|
|
|
| |
a non-inline namespace, then reopens it as inline to try to add its symbols to
the surrounding namespace. In this one special case, permit the namespace to be
reopened as inline, and patch up the name lookup tables to match.
llvm-svn: 165263
|
|
|
|
|
|
|
|
| |
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).
llvm-svn: 164989
|
|
|
|
|
|
| |
Patch by Andy Gibbs!
llvm-svn: 164590
|
|
|
|
|
|
| |
instantiations if we encountered errors parsing some of the initializers.
llvm-svn: 164578
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the wording more informative, and consistent with the other
warnings about uninitialized variables.
Also, me and David who reviewed this couldn't figure out why we would
need to do a lookup to get the name of the variable; so just print the
name directly.
llvm-svn: 164366
|
|
|
|
| |
llvm-svn: 164360
|
|
|
|
| |
llvm-svn: 164359
|
|
|
|
|
|
| |
non-function friend declaration. Patch by Josh Magee!
llvm-svn: 164273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes Clang warn about self references in in-class initializers,
for example:
struct S {
int a = a + 42;
};
This basically just moves UninitializedFieldVisitor up a bit in
SemaDeclCXX.cpp, and adds a call to it from ActOnCXXInClassMemberInitializer.
llvm-svn: 164131
|
|
|
|
| |
llvm-svn: 164033
|
|
|
|
|
|
| |
delegating initializer, not to the first initializer. For good measure, also highlight the other initializer.
llvm-svn: 163919
|
|
|
|
|
|
|
|
|
| |
type checking for non-static data member initializers in a dependent
class, because our ASTs lose too much information to when
type-checking an initializer. Fixes <rdar://problem/11974632>,
although the result is still rather unsatisfactory.
llvm-svn: 163871
|
|
|
|
| |
llvm-svn: 163546
|
|
|
|
|
|
| |
crash in a corner case. Patch by Olivier Goffart!
llvm-svn: 163337
|
|
|
|
| |
llvm-svn: 163039
|
|
|
|
| |
llvm-svn: 163032
|
|
|
|
|
|
| |
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|
|
|
|
|
|
|
|
|
| |
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.
llvm-svn: 162962
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 162552
|
|
|
|
|
|
|
|
| |
MutableArrayRef.
This required changing all get() calls to data() and using the simpler constructors.
llvm-svn: 162501
|
|
|
|
|
|
| |
SmallVector.
llvm-svn: 162492
|
|
|
|
|
|
|
| |
These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.
llvm-svn: 162475
|
|
|
|
| |
llvm-svn: 162430
|
|
|
|
| |
llvm-svn: 162198
|
|
|
|
|
|
|
|
|
| |
and remove ASTContext reference (which was frequently bound to a dereferenced
null pointer) from the recursive lump of printPretty functions. In so doing,
fix (at least) one case where we intended to use the 'dump' mode, but that
failed because a null ASTContext reference had been passed in.
llvm-svn: 162011
|
|
|
|
| |
llvm-svn: 161828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
things going on here that were problematic:
- We were missing the actual access check, or rather, it was suppressed
on account of being a redeclaration lookup.
- The access check would naturally happen during delay, which isn't
appropriate in this case.
- We weren't actually emitting dependent diagnostics associated with
class templates, which was unfortunate.
- Access was being propagated incorrectly for friend method declarations
that couldn't be matched at parse-time.
llvm-svn: 161652
|
|
|
|
|
|
|
|
| |
for side-effects. Instead, check for side-effects after performing
initialization. Doing so also removes some strange corner cases and differences
between in-class initialization and constructor initialization.
llvm-svn: 161449
|
|
|
|
|
|
|
| |
we know whether the function is virtual. But check it as soon as we do know;
in some cases we don't need to wait for an instantiation.
llvm-svn: 161316
|
|
|
|
|
|
| |
been defined.
llvm-svn: 161315
|
|
|
|
|
|
| |
non-type template parameter pack. Patch by Andy Gibbs!
llvm-svn: 161260
|
|
|
|
| |
llvm-svn: 161211
|
|
|
|
|
|
|
|
| |
sure to update the exception specification on the declaration as well as the
definition. If we're building in -fno-exceptions mode, nothing else will
trigger it to be updated.
llvm-svn: 161008
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a defaulted special member function until the exception specification is needed
(using the same criteria used for the delayed instantiation of exception
specifications for function temploids).
EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like
EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to
resolve the exception specification.
This is enabled for all C++ modes: it's a little faster in the case where the
exception specification isn't used, allows our C++11-in-C++98 extensions to
work, and is still correct for C++98, since in that mode the computation of the
exception specification can't fail.
The diagnostics here aren't great (in particular, we should include implicit
evaluation of exception specifications for defaulted special members in the
template instantiation backtraces), but they're not much worse than before.
Our approach to the problem of cycles between in-class initializers and the
exception specification for a defaulted default constructor is modified a
little by this change -- we now reject any odr-use of a defaulted default
constructor if that constructor uses an in-class initializer and the use is in
an in-class initialzer which is declared lexically earlier. This is a closer
approximation to the current draft solution in core issue 1351, but isn't an
exact match (but the current draft wording isn't reasonable, so that's to be
expected).
llvm-svn: 160847
|
|
|
|
| |
llvm-svn: 160622
|
|
|
|
|
|
|
|
| |
structor class under ARC, that struct/class does not have a trivial
move constructor or move assignment operator. Fixes the rest of
<rdar://problem/11738725>.
llvm-svn: 160615
|
|
|
|
|
|
|
|
| |
be defined as deleted, take cv-qualifiers on class members into account when
looking up the copy or move constructor or assignment operator which will be
used for them.
llvm-svn: 160418
|
|
|
|
|
|
|
| |
constructor will be used for moving that object, in the computation of its
exception specification.
llvm-svn: 160417
|
|
|
|
|
|
| |
behavior and is the first step in fixing pr13338.
llvm-svn: 160104
|
|
|
|
|
|
|
| |
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.
llvm-svn: 160088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics implemented -- see testcases.
I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.
This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).
In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.
It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.
Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).
llvm-svn: 160078
|
|
|
|
|
|
|
|
|
|
| |
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.
llvm-svn: 159895
|
|
|
|
|
|
| |
Move the ASTContext-dependent version out of line.
llvm-svn: 159717
|
|
|
|
|
|
|
|
|
| |
template instantiation. I wasn't able to reproduce this down to
anything small enough to put in our test suite, but it's "obviously"
okay to set the invalid bit earlier and precludes a
known-broken-but-not-marked-broken class from being used elsewhere.
llvm-svn: 159584
|
|
|
|
|
|
| |
Reviewed by Doug Gregor.
llvm-svn: 159442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around a quirk in the way that explicit template specializations are
handled in Clang. We generate an implicit declaration from the original
template which the explicit specialization is considered to redeclare. This
trips up the explicit delete logic.
This change only works around that strange representation. At some point it'd
be nice to remove those extra declarations to make the AST more accurately
reflect the C++ semantics.
Review by Doug Gregor.
llvm-svn: 159167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resulted in it being reverted. A test for that bug was added in r158950.
Original comment:
If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.
Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.
Patch by Sam Panzer!
llvm-svn: 159159
|
|
|
|
|
|
|
|
| |
Revert "If an object (such as a std::string) with an appropriate c_str() member function"
This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e.
llvm-svn: 158949
|