| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Emit a proper error instead of crashing in CodeGen. PR16892.
llvm-svn: 192345
|
|
|
|
|
|
|
| |
The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1843
llvm-svn: 192343
|
|
|
|
|
|
|
|
|
|
|
|
| |
underlying integer type. This is a precondition for calling getIntegerRank().
Fixes an assertion failure in a test case involving vectors.
Fixes <rdar://problem/15091442>
Please somebody check this.
llvm-svn: 192334
|
|
|
|
|
|
|
|
| |
This exposes a 32-bit view of the registry even when Clang is built as a 64-bit
program. Since Visual Studio is a 32-bit application, this is necessary for us
to find it.
llvm-svn: 192331
|
|
|
|
|
|
| |
warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>.
llvm-svn: 192328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASTImporter when importing the following types:
typedef struct {
} A;
typedef struct {
A a;
} B;
Suppose we have imported B, but we did not at that
time need to complete it. Then later we want to
import A. The struct is anonymous, so the first
thing we want to do is make sure no other anonymous
struct already matches it. So we set up an
StructuralEquivalenceContext and compare B with A.
This happens at ASTImporter.cpp:2179.
Now, in this scenario, B is not complete. So we go
and import its fields, including a, which causes A
to be imported. The ASTImporter doesn’t yet have A
in its list of already-imported things, so we
import A.
After the StructuralEquivalenceContext is finished
determining that A and B are different, the
ASTImporter concludes that A must be imported
because no equivalent exists, so it imports a second
copy of A. Now we have two different structs
representing A. This is really bad news.
The patch allows the StructuralEquivalenceContext to
use the original version of B when making its
comparison, obviating the need for an import and
cutting this loop.
llvm-svn: 192324
|
|
|
|
|
|
|
| |
and use it to infer all properties as 'atomic'.
// rdar://14988132
llvm-svn: 192317
|
|
|
|
|
|
|
|
|
|
|
|
| |
marked all variables as "unknown" at the start of a loop. The new version
keeps the initial state of variables unchanged, but issues a warning if the
state at the end of the loop is different from the state at the beginning.
This patch will eventually be replaced with a more precise analysis.
Initial patch by chris.wailes@gmail.com. Reviewed and edited by
delesley@google.com.
llvm-svn: 192314
|
|
|
|
| |
llvm-svn: 192313
|
|
|
|
|
|
| |
Reviewed at http://llvm-reviews.chandlerc.com/D1867
llvm-svn: 192312
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up from r192240.
This makes it an error to use callee-cleanup conventions on variadic
functions, except for __fastcall and __stdcall, which we ignore with
a warning for GCC and MSVC compatibility.
Differential Revision: http://llvm-reviews.chandlerc.com/D1870
llvm-svn: 192308
|
|
|
|
|
|
|
| |
suppression of strong lifetime qualifiers when
inferring property. // rdar://15082812
llvm-svn: 192305
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we produce alias for cases like
template<typename T>
struct foobar {
foobar() {
}
};
template struct foobar<void>;
It is safe to use aliases to weak symbols, as long and the alias itself is also
weak.
llvm-svn: 192300
|
|
|
|
|
|
|
|
|
|
| |
specified.
In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest test.
llvm-svn: 192299
|
|
|
|
|
|
|
|
|
| |
Before, clang-format would always insert a linebreak before the comment
in code like:
template <typename T> // T can be A, B or C.
struct S {};
llvm-svn: 192297
|
|
|
|
| |
llvm-svn: 192293
|
|
|
|
|
|
| |
MIPS-arch.
llvm-svn: 192292
|
|
|
|
|
|
| |
options are aliases now.
llvm-svn: 192290
|
|
|
|
|
|
| |
ItaniumVTableBuilder and clang-format code around
llvm-svn: 192288
|
|
|
|
|
|
| |
simple thunks when using -cxx-abi microsoft" with relaxed assertions
llvm-svn: 192285
|
|
|
|
|
|
|
|
|
|
| |
An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'
This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression
llvm-svn: 192258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC and clang with -fms-extensions allow pure virtual methods to be
defined inline after the "= 0" tokens. Clang warns on these because it
is not standard, but incorrectly warns on out-of-line definitions, which
are standard.
With this change, clang will only warn on inline definitions of pure
virtual methods.
Fixes some self-host warnings on out-of-line definitions of pure virtual
destructors.
llvm-svn: 192244
|
|
|
|
|
|
| |
reciprocal exponent, and reciprocal square root estimate instructions.
llvm-svn: 192243
|
|
|
|
|
|
|
|
|
|
| |
MSVC allows this and silently falls back to __cdecl for variadic functions.
This patch turns Clang's error into a warning in MS mode and adds a test
to make sure we generate correct code.
Differential Revision: http://llvm-reviews.chandlerc.com/D1861
llvm-svn: 192240
|
|
|
|
|
|
|
| |
properties of function pointer type.
// rdar://15082812
llvm-svn: 192237
|
|
|
|
|
|
| |
convert instructions.
llvm-svn: 192232
|
|
|
|
|
|
|
|
|
| |
properties of block pointer types. Also, remove
strong lifetime attribute from property type
in this migration. This is wip.
// rdar://15082818
llvm-svn: 192226
|
|
|
|
| |
llvm-svn: 192225
|
|
|
|
|
|
|
|
| |
when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1787
llvm-svn: 192220
|
|
|
|
| |
llvm-svn: 192211
|
|
|
|
| |
llvm-svn: 192204
|
|
|
|
|
|
| |
holdover from the long-dead Action interface.
llvm-svn: 192203
|
|
|
|
|
|
|
|
| |
In the test case one type is coming from a typedef with no default arg, the
other has the default arg. Taking the default arg from the typedef crashes, so
always use the real template paramter declaration. PR17510.
llvm-svn: 192202
|
|
|
|
|
|
| |
This fixes PR16992 - Fixit missing when "sizeof type" found.
llvm-svn: 192200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< //
aaaaaaaaaaaaaaaa> {};
struct aaaaaaaaaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa<
aaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa> {};
After:
struct aaaaaaaaaaaaa : public aaaaaaaaaaaaaaaaaaa< //
aaaaaaaaaaaaaaaa> {};
struct aaaaaaaaaaaaaaaaaaaa
: public aaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaa> {};
llvm-svn: 192187
|
|
|
|
|
|
|
|
|
|
| |
The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.
This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.
llvm-svn: 192177
|
|
|
|
|
|
|
|
|
| |
Specifically make ConstructorInitializerAllOnOneLineOrOnePerLine work
nicely with BreakConstructorInitializersBeforeComma.
This fixes llvm.org/PR17395.
llvm-svn: 192168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ
we should allow:
template<typename S>
struct A {
template<typename T> static auto default_lambda() {
return [](const T&) { return 42; };
}
template<class U = decltype(default_lambda<S>())>
U func(U u = default_lambda<S>()) { return u; }
};
int run2 = A<double>{}.func()(3.14);
int run3 = A<char>{}.func()('a');
This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope.
Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval.
llvm-svn: 192166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record. CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.
Fixes PR17371.
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1761
llvm-svn: 192150
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r186373, we started merging attributes on typedefs, but this causes
us to try to merge attributes even if the previous declaration was not
a typedef.
Only merge the attributes if the previous decl was also a typedef.
Fixes rdar://problem/15044218
llvm-svn: 192146
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An updated version of r191586 with bug fix.
Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.
We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.
Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.
llvm-svn: 192145
|
|
|
|
|
|
|
|
|
|
| |
Fixes <rdar://problem/10679282>.
I'm not completely satisfied with this patch. Sprinkling "diagnostic ignored"
_Pragmas throughout this file is gross, but I couldn't suppress
it for the entire file.
llvm-svn: 192143
|
|
|
|
| |
llvm-svn: 192131
|
|
|
|
|
|
|
|
| |
'default' methods in Foundation does not
infer 'instancetype' for methods' result type.
// rdar://15145218
llvm-svn: 192129
|
|
|
|
|
|
|
|
|
| |
extension. The GCC folks have decided to support this even though the standard
committee have not yet approved this feature.
Patch by Hristo Venev!
llvm-svn: 192128
|
|
|
|
|
|
|
| |
declared locally in ObjectiveC containers.
// rdar://15143875
llvm-svn: 192127
|
|
|
|
| |
llvm-svn: 192120
|
|
|
|
|
|
|
| |
ownership attribute (such as 'copy', 'assign' etc.)
// rdar://15131088
llvm-svn: 192115
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 192114
|
|
|
|
|
|
| |
<rdar://problems/13710586&13710643>
llvm-svn: 192113
|