| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixes PR9195.
llvm-svn: 148300
|
| |
|
|
| |
llvm-svn: 148276
|
| |
|
|
|
|
|
|
| |
PotentiallyPotentiallyEvaluated contexts so that we model it in a sane way in most cases, and give up for the edge case which hopefully doesn't matter too much.
In preparation for correctly treating sizeof() as a PotentiallyPotentiallyEvaluated context.
llvm-svn: 148271
|
| |
|
|
|
|
| |
Fixes PR6484. Patch from Jason Switzer!
llvm-svn: 148270
|
| |
|
|
| |
llvm-svn: 148255
|
| |
|
|
| |
llvm-svn: 148254
|
| |
|
|
|
|
| |
correctly. Getting the target triple wrong mostly appears to work, but messes up in subtle cases; for example, we incorrectly conclude that fwrite is actually named fwrite$UNIX2003. Also shuffles around the auto-detection code a bit to try and make it a bit more reliable. Fixes <rdar://problem/10664848>.
llvm-svn: 148249
|
| |
|
|
|
|
| |
non-constant-folded-switch containing a constant-folded switch.
llvm-svn: 148247
|
| |
|
|
| |
llvm-svn: 148245
|
| |
|
|
| |
llvm-svn: 148244
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.
Still to do:
- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases
llvm-svn: 148242
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
protocol, record the definition pointer in the canonical declaration
for that entity, and then propagate that definition pointer from the
canonical declaration to all other deserialized declarations. This
approach works well even when deserializing declarations that didn't
know about the original definition, which can occur with modules.
A nice bonus from this definition-deserialization approach is that we
no longer need update records when a definition is added, because the
redeclaration chains ensure that the if any declaration is loaded, the
definition will also get loaded.
llvm-svn: 148223
|
| |
|
|
|
|
|
| |
Don't consider decltype(e) for an instantiation-dependent, but not
type-dependent, e to be non-type-dependent but canonical(!).
llvm-svn: 148210
|
| |
|
|
|
|
|
|
| |
not integer constant expressions. In passing, fix the 'folding is an extension'
diagnostic to not claim we're accepting the code, since that's not true in
-pedantic-errors mode, and add this diagnostic to -Wgnu.
llvm-svn: 148209
|
| |
|
|
|
|
|
| |
designator invalid. (Since we can't read the value of such a pointer, this only
affects the quality of diagnostics.)
llvm-svn: 148208
|
| |
|
|
|
|
|
|
| |
or VarDecl::isExternC, and instead queries what it actually cares about: whether the given declaration is inside an extern "C" context. Fundamentally, figuring out whether a function/variable uses C linkage requires knowing the linkage, and the logic in FunctionDecl::isExternC and VarDecl::isExternC was getting it wrong. Given that, fix FunctionDecl::isExternC and VarDecl::isExternC to use much simpler implementations that depend on the fixed linkage computation.
Fixes a regression to test/SemaCXX/linkage.cpp caused by a new warning exposing the fact that the internal state was wrong.
llvm-svn: 148207
|
| |
|
|
| |
llvm-svn: 148197
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
|
| |
|
|
|
|
| |
data.
llvm-svn: 148176
|
| |
|
|
|
|
|
|
| |
With that, centralize the way we merge visibility, always preferring explicit over
implicit and then picking the most restrictive one.
Fixes pr10113 and pr11690.
llvm-svn: 148163
|
| |
|
|
|
|
|
| |
get added to the identifier chains as part of deserialization, because
they should not be visible to name lookup.
llvm-svn: 148159
|
| |
|
|
|
|
|
|
| |
don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate.
I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that.
llvm-svn: 148158
|
| |
|
|
|
|
| |
<rdar://problem/10691092>.
llvm-svn: 148157
|
| |
|
|
|
|
|
|
| |
The change to SemaTemplateVariadic.cpp improves the typo correction
results in certain situations, while the change to SemaTemplate.cpp
does not change existing behavior.
llvm-svn: 148155
|
| |
|
|
|
|
|
| |
multiple name lookup results in C/Objective-C. Fixes a regression a
caused in r147533, found by Enea Zaffanella!
llvm-svn: 148154
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
framework is actually a subframework within a top-level framework. If
so, only infer a module for the top-level framework and then dig out
the appropriate submodule.
This helps us cope with an amusing subframeworks anti-pattern, where
one uses -F <framework>/Frameworks to get direct include access to the
subframeworks of a framework (which otherwise would not be
permitted).
llvm-svn: 148148
|
| |
|
|
| |
llvm-svn: 148141
|
| |
|
|
|
|
|
|
|
| |
improving the typo correction results in certain situations.
This is also the first typo correction callback conversion to affect
an existing unit test. :)
llvm-svn: 148140
|
| |
|
|
| |
llvm-svn: 148138
|
| |
|
|
| |
llvm-svn: 148118
|
| |
|
|
| |
llvm-svn: 148117
|
| |
|
|
|
|
| |
base classes.
llvm-svn: 148094
|
| |
|
|
|
|
| |
it. Based on patch by Yin Ma. Fixes PR11751.
llvm-svn: 148093
|
| |
|
|
|
|
| |
report on cfe-dev.
llvm-svn: 148090
|
| |
|
|
|
|
| |
function. In particular, this restores the cool error recovery for the example from http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html , which regressed a few months back.
llvm-svn: 148089
|
| |
|
|
|
|
| |
incomplete return type.
llvm-svn: 148088
|
| |
|
|
|
|
| |
radar://10686991
llvm-svn: 148081
|
| |
|
|
|
|
| |
looking up value at a CodeTextRegion even when the type is not provided.
llvm-svn: 148079
|
| |
|
|
|
|
| |
inside a class implementation with parse errors. // rdar://10633434
llvm-svn: 148074
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- If the declarator is at the start of a line, and the previous line contained
another declarator and ended with a comma, then that comma was probably a
typo for a semicolon:
int n = 0, m = 1, l = 2, // k = 5;
myImportantFunctionCall(); // oops!
- If removing the parentheses would correctly initialize the object, then
produce a note suggesting that fix.
- Otherwise, if there is a simple initializer we can suggest which performs
value-initialization, then provide a note suggesting a correction to that
initializer.
Sema::Declarator now tracks the location of the comma prior to the declarator in
the declaration, if there is one, to facilitate providing the note. The code to
determine an appropriate initializer from the -Wuninitialized warning has been
factored out to allow use in both that and -Wvexing-parse.
llvm-svn: 148072
|
| |
|
|
|
|
| |
Original message: Make sure adding a field to a struct never reduces its size. PR11745.
llvm-svn: 148070
|
| |
|
|
| |
llvm-svn: 148068
|
| |
|
|
| |
llvm-svn: 148056
|
| |
|
|
| |
llvm-svn: 148055
|
| |
|
|
|
|
| |
improvng the typo correction results in certain situations.
llvm-svn: 148052
|
| |
|
|
|
|
| |
list of protools. // rdar://10669694
llvm-svn: 148051
|
| |
|
|
|
|
|
| |
And once again improve the typo correction results in certain
situations just by moving the existing checks on the correction.
llvm-svn: 148037
|
| |
|
|
|
|
| |
limit the call stack depth. The analyzer can now accurately simulate factorial for limited depths.
llvm-svn: 148036
|
| |
|
|
|
|
|
|
|
| |
zero-initialize the first union member. Also fix a bug where initializing an
array of types compatible with wchar_t from a wide string literal failed in C,
and fortify the C++ tests in this area. This part can't be tested without a code
change to enable array evaluation in C (where an existing test fails).
llvm-svn: 148035
|
| |
|
|
|
|
| |
are used with that and the 'a' length modifier.
llvm-svn: 148029
|