| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Similar to r288685.
getExceptionSpec returned structure with pointers to temporarily object created
by computeImplicitExceptionSpec.
Reviewers: rsmith
Subscribers: aizatsky, cfe-commits
Differential Revision: https://reviews.llvm.org/D27422
llvm-svn: 288689
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
getExceptionSpec returns structure with pointers to temporarily object created
by computeImplicitExceptionSpec.
Reviewers: rsmith
Subscribers: aizatsky, cfe-commits
Differential Revision: https://reviews.llvm.org/D27420
llvm-svn: 288685
|
|
|
|
|
|
|
|
|
|
|
| |
On MSVC, if an implicit instantiation already exists and an explicit
instantiation definition with a DLL attribute is created, the DLL
attribute still takes effect. Make clang match this behavior for
exporting.
Differential Revision: https://reviews.llvm.org/D26657
llvm-svn: 288682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a method call, the ObjCGenerics checker uses the type tracked by
DynamicTypePropagation for the receiver to to infer substituted parmeter types
for the called methods and warns when the argument type does not match the
parameter.
Unfortunately, using the tracked type can result in false positives when the
receiver has a non-invariant type parameter and has been intentionally upcast.
For example, becaue NSArray's type parameter is covaraint, the following code
is perfectly safe:
NSArray<NSString *> *allStrings = ...
NSDate *date = ...;
NSArray<NSObject *> *allObjects = allStrings;
NSArray<NSObject *> *moreObjects = [allObjects arrayByAddingObject:date];
but the checker currently warns that the date parameter is not an NSString *.
To avoid this kind of false positive, the checker will now only warn when
the class defining the called method has only invariant type parameters.
rdar://problem/28803951
llvm-svn: 288677
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
CXXDeleteExpr::getDestroyedType() can return a null QualType if the destroyed
type is a dependent type. This patch protects against this.
Reviewers: klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27350
llvm-svn: 288665
|
|
|
|
| |
llvm-svn: 288664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
latter case, a temporary array object is materialized, and can be
lifetime-extended by binding a reference to the member access. Likewise, in an
array-to-pointer decay, an rvalue array is materialized before being converted
into a pointer.
This caused IR generation to stop treating file-scope array compound literals
as having static storage duration in some cases in C++; that has been rectified
by modeling such a compound literal as an lvalue. This also improves clang's
compatibility with GCC for those cases.
llvm-svn: 288654
|
|
|
|
| |
llvm-svn: 288645
|
|
|
|
| |
llvm-svn: 288629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fmodule-file=. We try to include the headers of the module textually in this case, still enforcing the modules semantic rules. In order to make that work, we need to still track that we're entering and leaving the module. Also, if the module was also marked as unavailable (perhaps because it was missing a file), we shouldn't mark the module unavailable -- we don't need the module to be complete if we're going to enter it textually."
This reverts commit r288449.
I believe that this is currently faulty wrt. modules being imported
inside namespaces. Adding these lines to the new test:
namespace n {
#include "foo.h"
}
Makes it break with
fatal error: import of module 'M' appears within namespace 'n'
However, I believe it should fail with
error: redundant #include of module 'M' appears within namespace 'n'
I have tracked this down to us now inserting a tok::annot_module_begin
instead of a tok::annot_module_include in
Preprocessor::HandleIncludeDirective() and then later in
Parser::parseMisplacedModuleImport(), we hit the code path for
tok::annot_module_begin, which doesn't set FromInclude of
checkModuleImportContext to true (thus leading to the "wrong"
diagnostic).
llvm-svn: 288626
|
|
|
|
| |
llvm-svn: 288614
|
|
|
|
|
|
| |
clang-format-diff
llvm-svn: 288605
|
|
|
|
|
|
|
| |
Revert r288447 which introduced -mdirect. It turns out we don't need a
custom flag for this, as the information we need is in the target triple.
llvm-svn: 288604
|
|
|
|
|
|
| |
It was broken in r286421
llvm-svn: 288582
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An explicit template specialization can cause the implicit template
specialization of a type which inherits the attributes. In such a case, we
would end up with a delayed template specialization for a dll exported type
which we would fail to reference. This would trigger an assertion.
We now propagate the dll storage attributes through the inheritance
chain. Only after having done so do we reference the delayed template
specializations. This allows any implicit specializations which inherit dll
storage to also be referenced.
llvm-svn: 288570
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constructors
Summary:
The C++17 rules for aggregate initialization changed to disallow types with explicit constructors [dcl.init.aggr]p1. This patch implements that new rule.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25654
llvm-svn: 288565
|
|
|
|
|
|
|
| |
temporary produces an xvalue, not a prvalue. Support this by materializing the
temporary prior to performing the member access.
llvm-svn: 288563
|
|
|
|
|
|
|
| |
compute whether a call is noexcept, even if we can't map the callee expression
to a called declaration.
llvm-svn: 288558
|
|
|
|
|
|
| |
In passing, add a warning group for "ignored qualifier in inline assembly" warnings.
llvm-svn: 288548
|
|
|
|
|
|
|
|
| |
When a C++ record is marked with dllexport mark both the typeinfo and the
typeinfo name as being exported. Handle dllimport as the inverse. This applies
to the itanium environment and not the MinGW environment.
llvm-svn: 288546
|
|
|
|
| |
llvm-svn: 288545
|
|
|
|
|
|
| |
Looks like the reset() call was omitted by accident.
llvm-svn: 288534
|
|
|
|
|
|
|
|
|
|
| |
This is to match the behavior of non-LTO;
when -fsave-optimization-record is passed and PGO is available we enable
the generation of hotness information in the optimization records.
Differential Revision: https://reviews.llvm.org/D27332
llvm-svn: 288520
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is an improvement on rL288448 where address sanitization was listed
as supported for the CudaToolChain. Since the intent is for the
CudaToolChain not to reject any flags supported by the host compiler,
this patch switches to forwarding the CudaToolChain sanitizer support to
the host toolchain rather than explicitly whitelisting address
sanitization.
Thanks to hfinkel for this suggestion.
Reviewers: jlebar
Subscribers: hfinkel, cfe-commits
Differential Revision: https://reviews.llvm.org/D27351
llvm-svn: 288512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the file.
Summary:
This avoid inserting #include into:
- raw string literals containing #include.
- #if block.
- Special #include among declarations (e.g. functions).
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D26909
llvm-svn: 288493
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
removed as a duplicate header search path
The commit r126167 started passing the First index into RemoveDuplicates, but
forgot to update 0 to First in the loop that looks for the duplicate. This
resulted in a bug where an -iquoted search path was incorrectly removed if you
passed in the same path into -iquote and more than one time into -isystem.
rdar://23991350
Differential Revision: https://reviews.llvm.org/D27298
llvm-svn: 288491
|
|
|
|
|
|
| |
external assembler in trunk.
llvm-svn: 288478
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The test introduced by rL288448 is currently failing because
unimportant but unexpected errors appear as output from a test compile
line. This patch looks for a more specific error message, in order to
avoid false positives.
Reviewers: jlebar
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D27328
Switch to more specific error
llvm-svn: 288453
|
|
|
|
| |
llvm-svn: 288452
|
|
|
|
|
|
|
|
|
|
|
| |
We try to include the headers of the module textually in this case, still
enforcing the modules semantic rules. In order to make that work, we need to
still track that we're entering and leaving the module. Also, if the module was
also marked as unavailable (perhaps because it was missing a file), we
shouldn't mark the module unavailable -- we don't need the module to be
complete if we're going to enter it textually.
llvm-svn: 288449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug that was introduced in rL287285. The bug made it
illegal to pass -fsanitize=address during CUDA compilation because the
CudaToolChain class was switched from deriving from the Linux toolchain
class to deriving directly from the ToolChain toolchain class. When
CudaToolChain derived from Linux, it used Linux's getSupportedSanitizers
method, and that method allowed ASAN, but when it switched to deriving
directly from ToolChain, it inherited a getSupportedSanitizers method
that didn't allow for ASAN.
This patch fixes that bug by creating a getSupportedSanitizers method
for CudaToolChain that supports ASAN.
This patch also fixes the test that checks that -fsanitize=address is
passed correctly for CUDA builds. That test didn't used to notice if an
error message was emitted, and that's why it didn't catch this bug when
it was first introduced. With the fix from this patch, that test will
now catch any similar bug in the future.
llvm-svn: 288448
|
|
|
|
|
|
|
| |
Add a target flag for enabling the new direct wasm object emission
feature.
llvm-svn: 288447
|
|
|
|
|
|
|
|
| |
After r256463, both the LHS and RHS now refer to the same variable. Before,
they referred to the member, the parameter respectively. Now GCC6's
-Wtautological-compare complains.
llvm-svn: 288444
|
|
|
|
|
|
|
| |
to do this unconditionally, given that the indices will always be small
constant integers anyway.
llvm-svn: 288440
|
|
|
|
|
|
|
|
|
| |
CXEvalResult without overflow
Patch by Emilio Cobos Álvarez!
See https://reviews.llvm.org/D26788
llvm-svn: 288438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In bigger projects like an Operating System, the same source code is
often compiled in slightly different ways. This could be the difference
between PIC and non-PIC code for static vs dynamic libraries, it could
also be the difference between size optimised versions of tools for
ramdisk images. At the moment, the compilation database has no way to
distinguish such cases. As first step, add a field in the JSON format
for it and process it accordingly.
Differential Revision: https://reviews.llvm.org/D27138
llvm-svn: 288436
|
|
|
|
| |
llvm-svn: 288414
|
|
|
|
|
|
| |
Fixes test failures if tests are run in a read-only source tree.
llvm-svn: 288406
|
|
|
|
|
|
|
|
|
|
|
| |
have the same size.
This fixes an asset that is triggered when an address of a boolean
variable is passed to __builtin_arm_ldrex or __builtin_arm_strex.
rdar://problem/29269006
llvm-svn: 288404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adds support for -Wa,-defsym,abc=1 option.
Related llvm patch: https://reviews.llvm.org/D26214
Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin
Subscribers: mehdi_amini
Tags: #clang-c
Differential Revision: https://reviews.llvm.org/D26213
llvm-svn: 288397
|
|
|
|
|
|
| |
register
llvm-svn: 288394
|
|
|
|
|
|
|
|
|
|
| |
assemblies
Also added a gitignore to help track the right items to commit.
Patch by Antonio Maiorano <amaiorano@gmail.com>!
llvm-svn: 288393
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should complain about the following:
```
void foo() __attribute__((unavailable("a", "b")));
```
Instead, we currently just ignore "b". (...We also end up ignoring "a",
because we assume elsewhere that this attribute can only have 1 or 0
args.)
This happens because `unavailable` has a fake enum arg, and
`AttributeList::{getMinArgs,getMaxArgs}` include fake args in their
counts.
llvm-svn: 288388
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The basic constraint solver was dropped in rL162384, leaving the range constraint solver as the default and only constraint solver. Explicitly specifying it is unnecessary, and makes it difficult to test with other solver backends.
Reviewers: zaks.anna, dcoughlin
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26694
llvm-svn: 288372
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27207
llvm-svn: 288366
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {}
directive is shown only when we're parsing an actual statement where such
directives can actually be present.
rdar://19669565
Differential Revision: https://reviews.llvm.org/D26916
llvm-svn: 288334
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the access qualifier to the Pipe Type, rather than using a class
hierarchy.
It also fixes mergeTypes for Pipes, by disallowing merges. Only identical
pipe types can be merged. The test case in invalid-pipes-cl2.0.cl is added
to check that.
llvm-svn: 288332
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required.
Reviewers: rafael, joerg, echristo
Subscribers: mehdi_amini, joerg, dschuff, cfe-commits
Differential Revision: https://reviews.llvm.org/D27066
llvm-svn: 288327
|
|
|
|
|
|
| |
that will be filled in when the initializer is set.
llvm-svn: 288313
|
|
|
|
|
|
| |
and catching as noexcept.
llvm-svn: 288305
|