| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CRTP-like patterns involve a class which inherits from another class
using itself as a template parameter.
However, the base class itself may try to create a pointer-to-member
which involves the derived class. This is problematic because we
may not have finished parsing the most derived classes' base specifiers
yet.
It turns out that MSVC simply uses the unspecified inheritance model
instead of doing anything fancy.
This fixes PR19987.
llvm-svn: 210886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression. This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type. If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.
This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang. Please try it and
file bugs!
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4108
llvm-svn: 210855
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would do the access check from the context of
MarkVTableUsed.
Also update this test to C++11, since that is typically used with the MS
C++ ABI.
Fixes PR20005.
llvm-svn: 210850
|
|
|
|
|
|
|
|
|
|
|
| |
to call themselves will get the warning:
"Capturing <itself> strongly in this block is likely to
lead to a retain cycle". Cut down on the amount of noise
by noticing that user at some point sets the captured variable
to null in order to release it (and break the cycle).
// rdar://16944538
llvm-svn: 210823
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would calculate the inheritance model of a class when
requiring a pointer to member type of that class to be complete. The
inheritance model is used to figure out how many fields are used by the
member pointer.
However, once we require a pointer to member of a derived class type to
be complete, we can form pointers to members of bases without
calculating the inheritance model for those bases. This was causing
crashes on this simple test case:
struct A {
void f();
void f(int);
};
struct B : public A {};
void g() { void (B::*a)() = &B::f; }
Now we calculate the inheritance models of all base classes when
completing a member pointer type.
Fixes PR2007.
llvm-svn: 210813
|
|
|
|
|
|
| |
patch. NFC.
llvm-svn: 210795
|
|
|
|
| |
llvm-svn: 210791
|
|
|
|
|
|
|
| |
enumeration type. I've also filed a LWG issue pointing out that this should be
ill-formed.
llvm-svn: 210723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current MSVC versions don't have move assignment operators, so we
can't rely on them being available in the dll. If we have the
definition, we can just use that directly. This breaks pointer
equality, but should work fine otherwise.
When there is an MSVC version that supports move assignment,
we can key this off the -fmsc-ver option.
http://reviews.llvm.org/D4105
llvm-svn: 210715
|
|
|
|
|
|
|
| |
I wasn't able to figure out how to emit this diagnostic from a SFINAE
context, so I don't have a test.
llvm-svn: 210713
|
|
|
|
|
|
| |
It didn't handle the in-class member initializer and compound literal.
llvm-svn: 210707
|
|
|
|
|
|
|
| |
for function/methods returning block in MRR mode as well.
// rdar://17259812
llvm-svn: 210706
|
|
|
|
|
|
|
| |
a fix to make it work when CFStructs have no definition.
// rdar://17238954.
llvm-svn: 210690
|
|
|
|
|
|
|
|
|
|
|
| |
Also move the constructor for NamespaceSpecifierSet out of line to
improve the class' readability. I meant to do these two things while
cleaning up the previous TypoCorrectionConsumer changes and have them
folded into those changes.
No functionality changed.
llvm-svn: 210686
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SpecifierInfo is not used outside of NamespaceSpecifierSet except
indirectly through NamespaceSpecifierSet's iterator, so clean up the
code a bit by moving SpecifierInfo into NamespaceSpecifierSet. Also drop
SpecifierInfo's trivial yet verbose constructor since brace
initiialization is sufficient in the only two places the constructor was
being explicitly called.
No functionality changed.
llvm-svn: 210672
|
|
|
|
|
|
|
|
|
|
|
| |
The SpecifierInfo and NamespaceSpecifierSet are now only used by
TypoCorrectionConsumer, so treat them as the implementation details of
TypoCorrectionConsumer that they are. Also make NamespaceSpecifierSet's
method names more style guide compliant.
No functionality changed.
llvm-svn: 210671
|
|
|
|
|
|
| |
No functionality changed.
llvm-svn: 210670
|
|
|
|
|
|
|
|
|
|
|
|
| |
incremental.
The only external/visible functional change that fell out of this
refactoring is that there was one less case where the typo caching
and/or counting didn't work properly. The result is that a test case
had to be moved from typo-correction.cpp to typo-correction-pt2.cpp
to avoid the hard-coded limit on per file/TU typo correction attempts.
llvm-svn: 210669
|
|
|
|
|
|
|
|
|
|
|
| |
This is in preparation for moving TypoCorrection filtering
into the TypoCorrectionConsumer, to separate out some of the purely
mechanical churn. It also makes some of the method names in
NamespaceSpecifierSet be more style guide compliant.
No functionality changed.
llvm-svn: 210668
|
|
|
|
|
|
|
|
| |
http://reviews.llvm.org/D4089
Patch by Mark Heffernan.
llvm-svn: 210667
|
|
|
|
|
|
|
|
| |
correctly when both NSAttributedString and
NSMutableAttributedString are specified on the same
CFStruct via different typedefs. // rdar://17238954
llvm-svn: 210660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently allow unqualified lookup for instance methods but not
static methods because we can't recover with a semantic 'this->'
insertion.
ATL headers have static methods that do unqualified lookup into
dependent base classes. The pattern looks like:
template <typename T> struct Foo : T {
static int *getBarFromT() { return Bar; }
};
Now we recover as if the user had written:
template <typename T> struct Foo : T {
static int *getBarFromT() { return Foo::Bar; }
};
... which will eventually look up Bar in T at instantiation time.
Now we emit a diagnostic in both cases, and delay lookup in other
contexts where 'this' is available and refers to a class with dependent
bases.
Reviewed by: rsmith
Differential Revision: http://reviews.llvm.org/D4079
llvm-svn: 210611
|
|
|
|
|
|
|
| |
expression of array-of-unknown-bound type, don't try to complete the array
bound, and return the alignment of the element type rather than 1.
llvm-svn: 210608
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While matching a non-type template argument against a known template
type parameter we now modify the AST's TemplateArgumentLoc to assume the
user wrote typename. Under -fms-compatibility, we downgrade our
diagnostic from an error to an extwarn.
Reviewed by: rsmith
Differential Revision: http://reviews.llvm.org/D4049
llvm-svn: 210607
|
|
|
|
| |
llvm-svn: 210585
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 210583
|
|
|
|
|
|
|
| |
doing Objective-C subscript access. // rdar://16842487
PR19682.
llvm-svn: 210565
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would previously end up with an error when instantiating the
following template:
template <typename> struct __declspec(dllimport) S {
void foo() = delete;
};
S<int> s;
error: attribute 'dllimport' cannot be applied to a deleted function
llvm-svn: 210550
|
|
|
|
|
|
|
|
|
| |
instantiation
We would previously assert if the initializer was dependent. I also think that
checking isConstantInitializer is more correct here than checkInitIsICE.
llvm-svn: 210505
|
|
|
|
| |
llvm-svn: 210499
|
|
|
|
|
|
|
| |
will never be true in a well-defined context. The checking for null pointers
has been moved into the caller logic so it does not rely on undefined behavior.
llvm-svn: 210498
|
|
|
|
|
|
|
| |
'NSCopying' protocol when diagnosing block to ObjC pointer conversion.
// rdar://16739120
llvm-svn: 210491
|
|
|
|
|
|
| |
This expands the logic from r210141 to cover partial specializations too.
llvm-svn: 210484
|
|
|
|
| |
llvm-svn: 210448
|
|
|
|
|
|
| |
Requires LLVM r210417.
llvm-svn: 210418
|
|
|
|
|
|
|
|
| |
These cases in particular were incurring an extra strlen() when we already knew
the length. They appear to be leftovers from when the interfaces worked with C
strings that have continued to compile due to the implicit StringRef ctor.
llvm-svn: 210403
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC delays parsing of default arguments until instantiation. If the
default argument is never used, it is never parsed. We don't model
this.
Instead, if lookup of a type name fails in a template argument context,
we form a DependentNameType, which will be looked up at instantiation
time.
This fixes errors about 'CControlWinTraits' in atlwin.h.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3995
llvm-svn: 210382
|
|
|
|
|
|
| |
to detect underfined behavior involving pointers.
llvm-svn: 210372
|
|
|
|
|
|
|
|
|
| |
A previous patch r210330 (and possibly another) introduced DOS-style newlines
into a UNIX newline formatted file.
Patch by Mark Heffernan (http://reviews.llvm.org/D4046)
llvm-svn: 210369
|
|
|
|
|
|
| |
us to.
llvm-svn: 210355
|
|
|
|
|
|
|
|
| |
results in a template having too many arguments, but all the trailing arguments
are packs, that's OK if we have a partial pack substitution: the trailing pack
expansions may end up empty.
llvm-svn: 210350
|
|
|
|
|
|
| |
with any other loop hint options.
llvm-svn: 210338
|
|
|
|
| |
llvm-svn: 210333
|
|
|
|
|
|
| |
Patch thanks to Tyler Nowicki!
llvm-svn: 210330
|
|
|
|
| |
llvm-svn: 210328
|
|
|
|
|
|
| |
redundant ellipsis in parameter pack.
llvm-svn: 210304
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for pointer types in global named registers variables.
It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls.
Also adds some early checks on types on SemaDecl to avoid the assert.
Tests changed accordingly. (PR19837)
llvm-svn: 210274
|
|
|
|
|
|
|
|
| |
They should be initialized when they're exported.
Differential Revision: http://reviews.llvm.org/D4020
llvm-svn: 210217
|
|
|
|
|
|
| |
Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks.
llvm-svn: 210184
|
|
|
|
|
|
|
|
|
| |
Fix post-commit review comments by Carlo Bertolli
for commit r209660 - OMP collapse clause.
Re-formatted TransformOMP* functions in TreeTransform.h with clang-format.
llvm-svn: 210169
|