| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 181092
|
|
|
|
|
|
|
| |
conversion-type-id, in preparation for this becoming valid in c++1y mode.
No functionality change; small diagnostic improvement.
llvm-svn: 181089
|
|
|
|
|
|
| |
to prevent an edge being optimized away.
llvm-svn: 181088
|
|
|
|
| |
llvm-svn: 181087
|
|
|
|
|
|
| |
parents and subexpressions.
llvm-svn: 181086
|
|
|
|
|
|
| |
subexpression and pop back out.
llvm-svn: 181085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
same statement parents.
This change required some minor changes to LocationContextMap to have it map
from PathPieces to LocationContexts instead of PathDiagnosticCallPieces to
LocationContexts. These changes are in the other diagnostic
generation logic as well, but are functionally equivalent.
Interestingly, this optimize requires delaying "cleanUpLocation()" until
later; possibly after all edges have been optimized. This is because
we need PathDiagnosticLocations to refer to the semantic entity (e.g. a statement)
as long as possible. Raw source locations tell us nothing about
the semantic relationship between two locations in a path.
llvm-svn: 181084
|
|
|
|
|
|
|
| |
These were being dropped due a transcription mistake from the original
algorithm.
llvm-svn: 181083
|
|
|
|
|
|
|
| |
tags off by default for now. Move diagnostic code
to DiagnosticCommentKinds.td. // rdar://12381408
llvm-svn: 181081
|
|
|
|
| |
llvm-svn: 181077
|
|
|
|
|
|
| |
context.
llvm-svn: 181076
|
|
|
|
|
|
| |
Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag.
llvm-svn: 181073
|
|
|
|
|
|
| |
commands. // rdar://12381408
llvm-svn: 181071
|
|
|
|
| |
llvm-svn: 181070
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we would clone the current diagnostic consumer to produce
a new diagnostic consumer to use when building a module. The problem
here is that we end up losing diagnostics for important diagnostic
consumers, such as serialized diagnostics (where we'd end up with two
diagnostic consumers writing the same output file). With forwarding,
the diagnostics from all of the different modules being built get
forwarded to the one serialized-diagnostic consumer and are emitted in
a sane way.
Fixes <rdar://problem/13663996>.
llvm-svn: 181067
|
|
|
|
|
|
|
|
| |
MacroArgs object that provides information about
the argument tokens for a function macro.
llvm-svn: 181065
|
|
|
|
|
|
| |
consistency with ObjCInterfaceDecl::getSuperClassLoc()
llvm-svn: 181064
|
|
|
|
| |
llvm-svn: 181057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Un-break the gdb buildbot.
- Use the debug location of the return expression for the cleanup code
if the return expression is trivially evaluatable, regardless of the
number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.
rdar://problem/13442648
llvm-svn: 181056
|
|
|
|
|
|
|
|
|
|
|
| |
Add serialization for captured statements and captured decls. Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
llvm-svn: 181048
|
|
|
|
|
|
| |
it when visiting such subexpressions.
llvm-svn: 181046
|
|
|
|
|
|
|
|
|
|
|
| |
Move the creation of CapturedStmt parameters out of CodeGen and into
Sema, making it easier to customize the outlined function. The
ImplicitParamDecls are stored in the CapturedDecl using an
ASTContext-allocated array.
Differential Revision: http://llvm-reviews.chandlerc.com/D722
llvm-svn: 181043
|
|
|
|
|
|
| |
Not guaranteed to do anything useful yet.
llvm-svn: 181040
|
|
|
|
|
|
| |
provided.
llvm-svn: 181039
|
|
|
|
|
|
|
|
| |
checking for a lambda.
Thanks to Jordan for the pointer.
llvm-svn: 181031
|
|
|
|
|
|
|
|
| |
InitializationSequence::Diagnose()
Patch by Robert Wilhelm.
llvm-svn: 181022
|
|
|
|
|
|
|
|
|
| |
Clang always calls setWarnOnSpellCheck, but we shouldn't require every client to
do so.
Issue noticed by Enea Zaffanella.
llvm-svn: 181021
|
|
|
|
|
|
| |
Before: for (int i = 0;(i < 10); ++i) {}
After: for (int i = 0; (i < 10); ++i) {}
llvm-svn: 181020
|
|
|
|
|
|
| |
Before: for (; a&& b;) {}
After: for (; a && b;) {}
llvm-svn: 181017
|
|
|
|
|
|
| |
Patch by Ismail Pazarbasi.
llvm-svn: 181011
|
|
|
|
| |
llvm-svn: 181006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC provides __wchar_t, either as an alias for the built-in wchar_t
type, or as a separate type depending on language (C vs C++) and flags
(-fno-wchar).
In -fms-extensions, Clang will simply accept __wchar_t as an alias for
whatever type is used for wide character literals. In -fms-compatibility, we
try to mimic MSVC's behavior by always making __wchar_t a builtin type.
This fixes PR15815.
llvm-svn: 181004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a lambda.
Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.
Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.
rdar://13800041
llvm-svn: 181000
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FindLastStoreBRVisitor is responsible for finding where a particular region
gets its value; if the region is a VarRegion, it's possible that value was
assigned at initialization, i.e. at its DeclStmt. However, if a function is
called recursively, the same DeclStmt may be evaluated multiple times in
multiple stack frames. FindLastStoreBRVisitor was not taking this into
account and just picking the first one it saw.
<rdar://problem/13787723>
llvm-svn: 180997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were actually two bugs here:
- if we decided to look for an interesting lvalue or call expression, we
wouldn't go find its node if we also knew we were at a (different) call.
- if we looked through one message send with a nil receiver, we thought we
were still looking at an argument to the original call.
Put together, this kept us from being able to track the right values, which
means sub-par diagnostics and worse false-positive suppression.
Noticed by inspection.
llvm-svn: 180996
|
|
|
|
|
|
| |
This reverts commit 180982.
llvm-svn: 180990
|
|
|
|
| |
llvm-svn: 180986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without any conversion, this is pretty straightforward. Most of the
fields can be zeros. The order is:
- field offset or pointer
- nonvirtual adjustment (for MI functions)
- vbptr offset (for unspecified)
- virtual adjustment offset (for virtual inheritance)
Differential Revision: http://llvm-reviews.chandlerc.com/D699
llvm-svn: 180985
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use the debug location of the return expression for the cleanup code
if the return expression is trivially evaluatable, regardless of the
number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.
rdar://problem/13442648
llvm-svn: 180982
|
|
|
|
|
|
| |
of a weird merge error with git.
llvm-svn: 180981
|
|
|
|
|
|
|
|
| |
variable in BugReporter."
This reverts commit 180974. It broke the build.
llvm-svn: 180979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the actual parser and support arbitrary id-expressions.
We're actually basically set up to do arbitrary expressions here
if we wanted to.
Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.
I've also fixed the serialization of MS asm statements.
This commit depends on an LLVM commit.
llvm-svn: 180976
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BugReporter.
BugReporter is used to process ALL bug reports. By using a shared map,
we are having mappings from different PathDiagnosticPieces to LocationContexts
well beyond the point where we are processing a given report. This
state is inherently error prone, and is analogous to using a global
variable. Instead, just create a temporary map, one per report,
and when we are done with it we throw it away. No extra state.
llvm-svn: 180974
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180973
|
|
|
|
| |
llvm-svn: 180972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};
while this would parse as a "parameter name" 'Align':
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};
The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};
i.e., use the maximal alignment rather than the specified alignment.
Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.
Fixes <rdar://problem/13700933>.
llvm-svn: 180970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...and don't consider '0' to be a null pointer constant if it's the
initializer for a float!
Apparently null pointer constant evaluation looks through both
MaterializeTemporaryExpr and ImplicitCastExpr, so we have to be more
careful about types in the callers. For RegionStore this just means giving
up a little more; for ExprEngine this means handling the
MaterializeTemporaryExpr case explicitly.
Follow-up to r180894.
llvm-svn: 180944
|
|
|
|
|
|
|
|
|
|
|
| |
After some discussion, it was decided to use the Itanium ABI for thread_local on
Darwin OS X platforms. This involved a couple of changes. First, we use
"_tlv_atexit" instead of "__cxa_thread_atexit". Secondly, the global variables
are marked with 'internal' linkage, because we want all access to be calls to
the Itanium-specific entry point, which has normal linkage.
<rdar://problem/13733006>
llvm-svn: 180941
|
|
|
|
|
|
|
|
| |
initializer.
Fixes <rdar://problem/13712739>.
llvm-svn: 180937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers, speculatively load module maps.
The "magical" builtin headers are the headers we provide as part of
the C standard library, which typically comes from /usr/include. We
essentially merge our headers into that location (due to cyclic
dependencies). This change makes sure that, when header search finds
one of our builtin headers, we figure out which module it actually
lives in. This case is fairly rare; one ends up having to include one
of the few built-in C headers we provide before including anything
from /usr/include to trigger it. Fixes <rdar://problem/13787184>.
llvm-svn: 180934
|