| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
r224667 broke bootstrap on Fedora 20 X86_64 (at least).
See pr22006 for the details.
r224668 depends on r224667.
llvm-svn: 224770
|
|
|
|
| |
llvm-svn: 224747
|
|
|
|
|
|
|
|
|
|
| |
The default value of Opts.Trigraphs now no longer depends solely on the
language input kind, so move the code out of setLangDefaults(). Also make
sure that Opts.MSVCCompat is set before the Trigraph code runs.
Related to PR21974.
llvm-svn: 224719
|
|
|
|
|
|
|
| |
The lit.cfg files only add .cpp to suffixes, so these tests used to never run,
oops. (Also tweak to of these tests in minor ways to make the actually pass.)
llvm-svn: 224718
|
|
|
|
| |
llvm-svn: 224714
|
|
|
|
|
|
| |
(from patch r224549).
llvm-svn: 224713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reapplies r224503 along with a fix for compiling Fortran by having the
clang driver invoke gcc (see r224546, where it was reverted). I have added
a testcase for that as well.
Original commit message:
It is often convenient to use -save-temps to collect the intermediate
results of a compilation, e.g., when triaging a bug report. Besides the
temporary files for preprocessed source and assembly code, this adds the
unoptimized bitcode files as well.
This adds a new BackendJobAction, which is mostly mechanical, to run after
the CompileJobAction. When not using -save-temps, the BackendJobAction is
combined into one job with the CompileJobAction, similar to the way the
integrated assembler is handled. I've implemented this entirely as a
driver change, so under the hood, it is just using -disable-llvm-optzns
to get the unoptimized bitcode.
Based in part on a patch by Steven Wu.
rdar://problem/18909437
llvm-svn: 224688
|
|
|
|
|
|
|
|
|
| |
When a non-type template argument expression needs a conversion to change it
into the argument type, preserve that information by remaking the
TemplateArgument with an expression that has those conversions. Also a small
fix to template type diffing to handle the extra conversions in some cases.
llvm-svn: 224667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider a template class with attributes on a method, and an explicit
specialization of that method:
template <int>
struct A {
void foo() final;
};
template <>
void A<0>::foo() {}
In this example, the attribute is `final`, but it might also be an
__attribute__((visibility("foo"))), noreturn, inline, etc. clang's current
behavior is to strip all attributes, which for some attributes is wrong
(the snippet above allows a subclass of A<0> to override the final method, for
example) and for others disagrees with gcc.
So stop dropping attributes. r95845 added this code without a test case, and
r176728 added the code for dropping attributes on parameters (with tests, but
they still pass).
As an additional wrinkle, do drop dllimport and dllexport, since that's how
these two attributes work. (This is covered by existing tests.)
Fixes PR21942.
The approach is by Richard Smith, initial analysis and typing was done by me.
With this, clang also matches GCC and EDG on all attributes Richard tested.
llvm-svn: 224651
|
|
|
|
|
|
|
| |
Turns out there will be left-over deferred inline methods if there have
been errors, because in that case HandleTopLevelDecl bails out early.
llvm-svn: 224649
|
|
|
|
|
|
| |
lambda-expression in C++11, to match the C++14 rules.
llvm-svn: 224620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds "all" sanitizer group. A shortcut "-fno-sanitize=all"
can be used to disable all sanitizers for a given source file.
"-fsanitize=all" option makes no sense, and will produce an error.
This group can also be useful when we add "-fsanitize-recover=<list>"
options (patch in http://reviews.llvm.org/D6302), as it would allow
to conveniently enable/disable recovery for all specified sanitizers.
Test Plan: regression test suite
Reviewers: kcc, rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6733
llvm-svn: 224596
|
|
|
|
|
|
| |
when we diagnose this as an error.
llvm-svn: 224595
|
|
|
|
|
|
|
|
|
|
| |
implicit conversion.
The issue was produced with OpenCL C code that
called a function with a constant string literal
argument.
llvm-svn: 224592
|
|
|
|
|
|
|
|
| |
or an identifier. VariadicEnumArguments now behave consistently instead of only accepting a string literal.
This change affects the only attribute accepting a variadic enumeration: callable_when.
llvm-svn: 224582
|
|
|
|
|
|
| |
declared return type (including a trailing-return-type in C++14).
llvm-svn: 224561
|
|
|
|
|
|
| |
Fixes PR21947.
llvm-svn: 224558
|
|
|
|
|
|
|
|
| |
when source range is incorrect causing the warning to be
issued when it should not because expression is in a macro.
rdar://19256338
llvm-svn: 224549
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r224503.
It broke compilation of fortran through the Clang driver. Previously
`clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it
tries to call `clang -cc1 t.f` which fails for obvious reasons.
llvm-svn: 224546
|
|
|
|
|
|
|
| |
on multiple selector names found during lookup.
rdar://19265296
llvm-svn: 224536
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r224451. It caused us to reject some valid existing
code.
This code appears to run in non-error cases as well as error cases. If
the scope of a DependentScopeDeclRefExpr is still incomplete it probably
means we still have more instantiation to do.
llvm-svn: 224526
|
|
|
|
|
| |
Change-Id: I4dbfe1d97670fc4e626368ef1f91fc008778dfca
llvm-svn: 224523
|
|
|
|
|
|
|
| |
two identical module.modulemap are available on the include path and
so should be fixed in the mingw driver include dies, when we'll have it.
llvm-svn: 224515
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Repared support for warnings -Wkeyword-macro and -Wreserved-id-macro.
The warning -Wkeyword-macro now is not issued in patterns that are used
in configuration scripts:
#define inline
also for 'const', 'extern' and 'static'. If macro repalcement is identical
to macro name, the warning also is not issued:
#define volatile volatile
And finally if macro replacement is also a keyword identical to the replaced
one but decorated with leading/trailing underscores:
#define inline __inline
#define inline __inline__
#define inline _inline // in MSVC compatibility mode
Warning -Wreserved-id-macro is off by default, it could help catching
things like:
#undef __cplusplus
llvm-svn: 224512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ParseCXXNonStaticMemberInitializer stashes away all the tokens for the
initializer and an additional EOF token to denote where the initializer
ends. However, it is possible for ParseLexedMemberInitializer to get
its hands on the "real" EOF token; since the two tokens are
indistinguishable, we end up consuming the EOF and descend into madness.
Instead, make it possible to tell which EOF token we are looking at.
This fixes PR21872.
llvm-svn: 224505
|
|
|
|
|
|
|
| |
Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA
Differential Revision: http://reviews.llvm.org/D6655
llvm-svn: 224504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is often convenient to use -save-temps to collect the intermediate
results of a compilation, e.g., when triaging a bug report. Besides the
temporary files for preprocessed source and assembly code, this adds the
unoptimized bitcode files as well.
This adds a new BackendJobAction, which is mostly mechanical, to run after
the CompileJobAction. When not using -save-temps, the BackendJobAction is
combined into one job with the CompileJobAction, similar to the way the
integrated assembler is handled. I've implemented this entirely as a
driver change, so under the hood, it is just using -disable-llvm-optzns
to get the unoptimized bitcode.
Based in part on a patch by Steven Wu.
rdar://problem/18909437
llvm-svn: 224503
|
|
|
|
|
|
|
|
|
|
|
|
| |
use clang -cc1 matching the front end and backend. Fix up a couple
of tests that were testing aapcs for arm-linux-gnu.
The test that removes the aapcs abi calling convention removes
them because the default triple matches what the backend uses
for the calling convention there and so it doesn't need to be
explicitly stated - see the code in TargetInfo.cpp.
llvm-svn: 224491
|
|
|
|
| |
llvm-svn: 224490
|
|
|
|
|
|
|
|
|
|
|
| |
Use new `DIBuilder` API from LLVM r224482 to mutate `DICompositeType`s,
rather than changing them directly. This allows `DIBuilder` to track
otherwise orphaned cycles when `CollectContainingType()` creates a
self-reference.
Fixes PR21941.
llvm-svn: 224483
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we thought the instance member was a function, not a field,
and we'd say something silly like:
t.cpp:4:27: error: call to non-static member function without an object argument
static int f() { return n; }
^
Noticed in PR21923.
llvm-svn: 224480
|
|
|
|
|
|
|
|
| |
So, place warning about property getter should not be used for side-effect
under its own group so warning can be turned off.
rdar://19137815
llvm-svn: 224479
|
|
|
|
|
|
|
|
|
| |
This reverts commit r224369.
Thanks to Reid Kleckner for pointing out that we need a bigger gun to fix this
case.
llvm-svn: 224475
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few cases where unqualified lookup can find C++ methods.
Unfortunately, none of them seem to have illegal access paths, so I
can't excercise the diagnostic source range code that I am changing
here.
Fixes PR21851, which was a crash on valid.
llvm-svn: 224471
|
|
|
|
|
|
| |
unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.
llvm-svn: 224465
|
|
|
|
| |
llvm-svn: 224462
|
|
|
|
|
|
|
|
| |
exact type match for deduced template arguments, and be sure to produce correct
canonical TemplateArgument representations to enable correct redeclaration
matching.
llvm-svn: 224456
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a comment and a test to ~DiagnosticEngine about the ordering
requirements on the teardown of DiagnosticConsumer. This could also be
accomplished by rearranging the fields of ~DiagnosticEngine, but I felt
that this was a better, more explicit solution.
This fixes PR21911, an issue that occurred after the unique_ptr
migration in r222193.
llvm-svn: 224454
|
|
|
|
|
|
|
| |
when clang is built with mingw-w64 4.9.1 or according to
http://llvm.org/PR20995 , mingw-w64 4.7.2 as well.
llvm-svn: 224453
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A DependentScopeDeclRefExpr should always have a nested name specifier.
During template instantiation, if we found that the named context was
incomplete, we would previously build a DependentScopeDeclRefExpr with
an empty qualifier.
This error recovery path has been asserting for some time. The other
error codepaths use ExprError, so we can do the same.
Fixes PR21864.
llvm-svn: 224451
|
|
|
|
|
|
| |
temporaries.
llvm-svn: 224449
|
|
|
|
|
|
|
|
|
| |
Fails an ASan bootstrap - I'll try to reproduce locally & sort that out
before recommitting.
This reverts commit r224385.
llvm-svn: 224441
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For MSVC compatibility, add the `__emit' builtin. This is used in the Windows
SDK headers, and must therefore be implemented as a builtin rather than an
intrinsic.
The `__emit' builtin provides a mechanism to emit a 16-bit opcode instruction
into the stream. The value must be a compile time constant expression. No
guarantees are made about the CPU and memory states after the execution of the
instruction.
Due to the unchecked nature of the builtin, only support this on Windows on ARM.
llvm-svn: 224438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Because GCC doesn't use $1 for code generation, inline assembly code can use $1 without having to add it to the clobbers list.
LLVM, on the other hand, does not shy away from using $1, and this can cause conflicts with inline assembly which assumes GCC-like code generation.
A solution to this problem is to make Clang automatically clobber $1 for all MIPS inline assembly.
This is not the optimal solution, but it seems like a necessary compromise, for now.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6638
llvm-svn: 224428
|
|
|
|
| |
llvm-svn: 224426
|
|
|
|
| |
llvm-svn: 224421
|
|
|
|
|
|
|
|
|
| |
This code was written with the intent that a pointer could be null but
we dyn_cast'd it anyway. Change the dyn_cast to a dyn_cast_or_null.
This fixes PR21933.
llvm-svn: 224411
|
|
|
|
|
|
|
|
|
| |
We would consume the lparen even if it wasn't followed by an identifier
or a star-identifier pair.
This fixes PR21815.
llvm-svn: 224403
|
|
|
|
| |
llvm-svn: 224401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A patch by Daniel DeFreez!
We were previously dropping edges on re-declarations. Store the
canonical declarations in the graph to ensure that different
references to the same function end up reflected with the same call graph
node.
(Note, this might lead to performance fluctuation because call graph
is used to determine the function analysis order.)
llvm-svn: 224398
|