| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
we don't do the scope checks otherwise we are going to hit assertion checks
since a label may not have been actually added.
llvm-svn: 175281
|
|
|
|
|
|
|
| |
cast<ObjCObjectPointerType> doesn't look through sugar, getAs does.
Fixes PR15257.
llvm-svn: 175272
|
|
|
|
|
|
| |
microsoft; also fix vdtor calls for the ARM ABI
llvm-svn: 175271
|
|
|
|
| |
llvm-svn: 175253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This just adds a very simple check that if a DerivedToBase CastExpr is
operating on a value with known C++ object type, and that type is not the
base type specified in the AST, then the cast is invalid and we should
return UnknownVal.
In the future, perhaps we can have a checker that specifies that this is
illegal, but we still shouldn't assert even if the user turns that checker
off.
PR14872
llvm-svn: 175239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...after a host of optimizations related to the use of LazyCompoundVals
(our implementation of aggregate binds).
Originally applied in r173951.
Reverted in r174069 because it was causing hangs.
Re-applied in r174212.
Reverted in r174265 because it was /still/ causing hangs.
If this needs to be reverted again it will be punted to far in the future.
llvm-svn: 175234
|
|
|
|
|
|
| |
// rdar://13192366
llvm-svn: 175217
|
|
|
|
|
|
|
|
| |
a property, the -Wdirect-ivar-access should not warn when
accessing the property's synthesized instance variable.
// rdar://13142820
llvm-svn: 175195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In C++, constants captured by lambdas (and blocks) are not actually stored
in the closure object, since they can be expanded at compile time. In this
case, they will have no binding when we go to look them up. Previously,
RegionStore thought they were uninitialized stack variables; now, it checks
to see if they are a constant we know how to evaluate, using the same logic
as r175026.
This particular code path is only for scalar variables. Constant arrays and
structs are still unfortunately unhandled; we'll need a stronger solution
for those.
This may have a small performance impact, but only for truly-undefined
local variables, captures in a non-inlined block, and non-constant globals.
Even then, in the non-constant case we're only doing a quick type check.
<rdar://problem/13105553>
llvm-svn: 175194
|
|
|
|
|
|
|
|
| |
before checking for its attributes.
rdar://13192395
llvm-svn: 175184
|
|
|
|
| |
llvm-svn: 175166
|
|
|
|
|
|
|
| |
static functions in extern "C" contexts are mangled. Should fix the
bootstrap.
llvm-svn: 175132
|
|
|
|
|
|
|
|
|
|
| |
I added hasCLanguageLinkage while fixing some language linkage bugs some
time ago so that I wouldn't have to check all users of isExternC. It turned
out to be a much longer detour than expected, but this patch finally
merges the two again. The isExternC function now implements just the
standard notion of having C language linkage.
llvm-svn: 175119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some cases where functions with no language linkage were being treated as having
C language linkage. In particular, don't warn in
extern "C" {
static NonPod foo();
}
Since getLanguageLinkage checks the language linkage, the linkage computation
cannot use the language linkage. Break the loop by checking just the context
in the linkage computation.
llvm-svn: 175117
|
|
|
|
|
|
|
| |
instantiation in order to permit devirtualization later in codegen, skip over
pure functions since those can't be devirtualization targets.
llvm-svn: 175116
|
|
|
|
|
|
|
|
| |
in the course of property synthesis deterministic (ordered
by their type size), instead of having hashtable order
(as it is currently). // rdar://13192366
llvm-svn: 175100
|
|
|
|
| |
llvm-svn: 175084
|
|
|
|
|
|
|
| |
base-to-derived casts have undefined behavior if the object is not actually an
instance of the derived type.
llvm-svn: 175078
|
|
|
|
|
|
|
|
|
| |
is inside a macro argument.
Previously we would give up and not annotate anything in the range.
rdar://11891550
llvm-svn: 175062
|
|
|
|
| |
llvm-svn: 175054
|
|
|
|
|
|
| |
Release+Asserts builds
llvm-svn: 175053
|
|
|
|
| |
llvm-svn: 175045
|
|
|
|
| |
llvm-svn: 175027
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we were handling only simple integer constants for globals and
the smattering of implicitly-valued expressions handled by Environment for
default arguments. Now, we can use any integer constant expression that
Clang can evaluate, in addition to everything we handled before.
PR15094 / <rdar://problem/12830437>
llvm-svn: 175026
|
|
|
|
|
|
| |
Part of rdar://13202662
llvm-svn: 175022
|
|
|
|
|
|
| |
visible, not when they become deserialized <rdar://problem/13203033>.
llvm-svn: 175018
|
|
|
|
|
|
| |
Part of rdar://13200215
llvm-svn: 175009
|
|
|
|
| |
llvm-svn: 175005
|
|
|
|
|
|
| |
directives.
llvm-svn: 175000
|
|
|
|
| |
llvm-svn: 174995
|
|
|
|
| |
llvm-svn: 174989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC accepts this:
class A {
A::A();
};
Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors. This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions. This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:
/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
A::A();
~~~~ ^
1 error generated.
After:
/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
A::A();
~~~^
1 error generated.
Patch by Jason Haslam.
llvm-svn: 174980
|
|
|
|
|
|
| |
Also, fix a minor typo in the test.
llvm-svn: 174966
|
|
|
|
| |
llvm-svn: 174953
|
|
|
|
|
|
|
|
|
|
|
|
| |
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
* don't mark functions odr-used when considering them for an initialization
sequence. Do mark them referenced though.
* the function nominated by the cleanup attribute should be diagnosed.
* operator new/delete should be diagnosed when building a 'new' expression.
llvm-svn: 174951
|
|
|
|
|
|
| |
rdar://12046763
llvm-svn: 174946
|
|
|
|
|
|
|
|
| |
the linkage of functions and variables while merging declarations from modules,
and we don't necessarily have enough of the rest of the AST loaded at that
point to allow us to compute linkage, so serialize it instead.
llvm-svn: 174943
|
|
|
|
|
|
| |
calling std::terminate(). rdar://11904428
llvm-svn: 174940
|
|
|
|
|
|
|
|
|
| |
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.
llvm-svn: 174931
|
|
|
|
|
|
| |
expression.
llvm-svn: 174930
|
|
|
|
|
|
| |
Patch by Joey Gouly!
llvm-svn: 174928
|
|
|
|
| |
llvm-svn: 174925
|
|
|
|
|
|
| |
of immediately afterwards.
llvm-svn: 174922
|
|
|
|
| |
llvm-svn: 174921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.
Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.
This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.
Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.
llvm-svn: 174919
|
|
|
|
|
|
|
| |
of @throw statement by finding location of the ';'
correctly. // rdar://13186010
llvm-svn: 174898
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declared in the current translation unit <rdar://problem/13189985>.
These two related tweaks to keep the information associated with a
given identifier correct when the identifier has been given some
top-level information (say, a top-level declaration) and more
information is then loaded from a module. The first ensures that an
identifier that was "interesting" before being loaded from an AST is
considered to be different from its on-disk counterpart. Otherwise, we
lose such changes when writing the current translation unit as a
module.
Second, teach the code that injects AST-loaded names into the
identifier chain for name lookup to keep the most recent declaration,
so that we don't end up confusing our declaration chains by having a
different declaration in there.
llvm-svn: 174895
|
|
|
|
| |
llvm-svn: 174866
|
|
|
|
|
|
|
|
|
|
|
| |
Apple's kernel engineers have been expecting this behavior even though
we've never implemented it before, as far as I can tell. In recent months,
clang has gotten better at using vector instructions to optimize memcpy-like
operations, and that has exposed problems when vector/floating-point
instructions are used in kexts that don't support that. This behavior also
matches what Apple's GCC did for PowerPC targets.
llvm-svn: 174838
|
|
|
|
|
|
|
|
|
| |
For x86 targets, we've been using the -msoft-float option to control passing
the no-implicit-float option to cc1. Since the -mno-implicit-float option is
now accepted by the driver, this just makes it work for x86 the same as it
does for ARM targets.
llvm-svn: 174836
|