| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
it is an implicit instantiation of a class template specialization), pick the
first-loaded definition to be the canonical definition, and merge all other
definitions into it.
This is still rather incomplete -- we need to extend every form of declaration
that can appear within a CXXRecordDecl to be redeclarable if it came from an
AST file (this includes fields, enumerators, ...).
llvm-svn: 190315
|
| |
|
|
|
|
| |
PR17105.
llvm-svn: 190312
|
| |
|
|
|
|
| |
functionality was never completely implemented, and this is an improvement over silently eating the attribute.
llvm-svn: 190303
|
| |
|
|
|
|
|
|
| |
"long long" which is currently technically only "reserved for future" use in OpenCL, but
since clang in OpenCL mode supports it we may as well test the modifications to
the settings made for that type.
llvm-svn: 190297
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name lookup from lazily deserializing the other declarations with the same
name, by tracking a bit to indicate whether a name in a DeclContext might have
additional external results. This also allows lazier reconciling of the lookup
table if a module import adds decls to a pre-existing DC.
However, this exposes a pre-existing bug, which causes a regression in
test/Modules/decldef.mm: if we have a reference to a declaration, and a
later-imported module adds a redeclaration, nothing causes us to load that
redeclaration when we use or emit the reference (which can manifest as a
reference to an undefined inline function, a use of an incomplete type, and so
on). decldef.mm has been extended with an additional testcase which fails with
or without this change.
llvm-svn: 190293
|
| |
|
|
|
|
|
|
| |
following 26 instructions,
SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL
llvm-svn: 190289
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
__uuidof on templated types should exmaine if any of its template
parameters have a uuid declspec. If exactly one does, then take it.
Otherwise, issue an appropriate error.
Reviewers: rsmith, thakis, rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1419
llvm-svn: 190240
|
| |
|
|
|
|
|
|
| |
preserve getter's attribute. Also, do not attach
an inferred NS_RETURNS_INNER_POINTER to the inferred
property (it is illegal).
llvm-svn: 190223
|
| |
|
|
|
|
|
|
|
|
| |
The libm math functions should be marked with the "n" (nothrow) flag so that
the corresponding IR function declarations are tagged with the nounwind
attribute (this has been true in C mode, but not in C++ mode).
The test case has been updated to run in C++ mode in addition to in C mode.
llvm-svn: 190217
|
| |
|
|
|
|
|
|
|
| |
Exception specs are not part of the canonical type, but we shouldn't
drop them just because we merged a noreturn attribute.
Fixes PR17110.
llvm-svn: 190206
|
| |
|
|
|
|
|
|
| |
I don't think Clang intends to implement this functionality.
ASan should be used instead. Since /RTC is often passed by default
from MSBuild, ignore the option to avoid bloating the output.
llvm-svn: 190202
|
| |
|
|
|
|
|
| |
DIBuilder now uses an identifier to reference DIType in containing type field of
a DICompositeType (in r190190).
llvm-svn: 190191
|
| |
|
|
|
|
| |
threadprivate_messages.cpp)
llvm-svn: 190183
|
| |
|
|
|
|
| |
minor cosmetics
llvm-svn: 190162
|
| |
|
|
|
|
| |
introduced in commit r190048
llvm-svn: 190159
|
| |
|
|
|
|
|
|
|
|
| |
vector types,
so allow that case and add appropriate tests.
Patch by Ruiling Song!
llvm-svn: 190129
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
If a noreturn destructor is executed while returning a value from a function,
the resulting CFG has had two edges to the exit block. This crashed the analyzer,
because it expects that blocks with no terminators have only one outgoing edge.
I added code to avoid creating the second edge in this case.
PS: The crashes did not manifest themselves always, as usually the
NoReturnFunctionChecker would stop program evaluation before the analyzer hit
the assertion, but in the case of lifetime extended temporaries, the checker
failed to do that (which is a separate bug in itself).
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1513
llvm-svn: 190125
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creation recreates the item the context is created for
By removing the possibility of strange partial definitions with no
members that older GCC's produced for the otherwise unreferenced outer
types of referenced inner types, we can simplify debug info generation
and correct this bug. Newer (4.8.1 and ToT) GCC's don't produce this
quirky debug info, and instead produce the full definition for the outer
type (except in the case where that type is dynamic and its vtable is
not emitted in this TU).
During the creation of the context for a type, we may revisit that type
(due to the need to visit template parameters, among other things) and
used to end up visiting it first there. Then when we would reach the
original code attempting to define that type, we would lose debug info
by overwriting its members.
By avoiding the possibility of latent "defined with no members" types,
we can be sure than whenever we already have a type in a cache (either a
definition or declaration), we can just return that. In the case of a
full definition, our work is done. In the case of a partial definition,
we must already be in the process of completing it. And in the case of a
declaration, the completed/vtable/etc callbacks can handle converting it
to a definition.
llvm-svn: 190122
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This expands very slightly what -Wtautological-compare considers to be
tautological to include implicit accesses to C++ fields and ObjC ivars.
I don't want to turn this into a full expression-identity check, but
these additions seem pretty well-contained, and maintain the theme
of checking for "x == x".
<rdar://problem/14431127>
llvm-svn: 190118
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
specifying the default assumed state for objects of this class
This information is used for return states and pass-by-value parameter
states.
Patch by Chris Wailes.
Review by DeLesley Hutchins and Aaron Ballman.
llvm-svn: 190116
|
| |
|
|
|
|
|
|
| |
initializer list containing a single element of type T, be sure to mark the
sequence as a list conversion sequence so that it is known to be worse than an
implicit conversion sequence that initializes a std::initializer_list object.
llvm-svn: 190115
|
| |
|
|
|
|
| |
constructor.
llvm-svn: 190111
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider something like the following:
struct X {
virtual void foo(float x);
};
struct Y : X {
void foo(double x) override;
};
The error is almost certainly that Y::foo() has the wrong signature,
rather than incorrect usage of the override keyword. This patch
adds an appropriate diagnostic for that case.
Fixes <rdar://problem/14785106>.
llvm-svn: 190109
|
| |
|
|
|
|
|
|
|
| |
inferring NS_RETURNS_RETAINED, etc., return annotations.
Do not infer if these annotations are implicit
from the naming convention. Also add inference for
NS_CONSUMES_SELF annotation.
llvm-svn: 190106
|
| |
|
|
|
|
|
| |
DIBuilder now uses an identifier to reference DIType in base type field of
ptr_to_member (in r190081).
llvm-svn: 190082
|
| |
|
|
|
|
|
| |
code to work for bit 32bit and 64bit APIs.
// rdar://14913632
llvm-svn: 190072
|
| |
|
|
|
|
|
|
| |
We already use .obj as extension when the user provides a stem file
name (via /Fo), but were failing in the most basic case when the file
name is based on the input file.
llvm-svn: 190071
|
| |
|
|
|
|
| |
it works in the CL flavor driver.
llvm-svn: 190040
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I've had a test failure here while experimenting and I've found that it's
impossible to find what is wrong with the previous structure of the file. So I
have grouped the expected output with the function that produces it, to make
searching for discrepancies more obvious.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1595
llvm-svn: 190037
|
| |
|
|
|
|
|
|
| |
is at the end of the line, point to the location after the double colon instead
of at the next token. There is more context to be given this way. In addition,
the next token can be several lines later.
llvm-svn: 190029
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the following flags covering existing warnings:
-Wgnu-zero-variadic-macro-arguments
-Wgnu-imaginary-constant
-Wgnu-binary-literal
-Wgnu-zero-line-directive
Patch by Peter Lewis.
llvm-svn: 190017
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an AST file is built based on another AST file, it can use a decl from
the fist file, and therefore mark the "isUsed" bit. We need to note this in
the AST file so that the bit is set correctly when the second AST file is
loaded.
This patch introduces the distinction between setIsUsed() and markUsed() so
that we don't call into the ASTMutationListener callback when it wouldn't
be appropriate.
Fixes PR16635.
llvm-svn: 190016
|
| |
|
|
|
|
| |
representation. Don't emit comparisons on them as 'icmp ult'!
llvm-svn: 190010
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current GCCs:
* In C, as before, if the "warning flag" is enabled, warnings are produced by
forcing string literals to have const-qualified types (the produced warnings
are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4
onwards) now take -w into account here, so we now do the same.
* In C++, this flag is entirely sane: it behaves just like any other warning
flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's
no real functionality change except in the case where -Xclang -fno-const-strings
is also specified.
llvm-svn: 190006
|
| |
|
|
|
|
| |
to Method/functions returning ObjC objects. wip.
llvm-svn: 190005
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inside namespaces
A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.
Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.
With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.
llvm-svn: 189996
|
| |
|
|
|
|
|
|
|
|
| |
Summary: I added the display of the VarDecl contained in the statement.
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1596
llvm-svn: 189941
|
| |
|
|
|
|
| |
tweaking expressions.
llvm-svn: 189927
|
| |
|
|
|
|
|
|
|
|
| |
instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
and 4 convert instructions:
scvtf,ucvtf,fcvtzs,fcvtzu
llvm-svn: 189926
|
| |
|
|
| |
llvm-svn: 189919
|
| |
|
|
| |
llvm-svn: 189918
|
| |
|
|
| |
llvm-svn: 189917
|
| |
|
|
|
|
|
| |
If source code is invalid, error recovery can lead to name lookup in a set containing invalid declaration. The lookup is stopped once found such declaration, but LookupResult object could remain in inconsistent state. Its destructor triggered a check, which caused assert violation.
This patch fixes PR16964 and PR12791.
llvm-svn: 189916
|
| |
|
|
| |
llvm-svn: 189910
|
| |
|
|
|
|
|
|
| |
I tried to implement this properly in r189051, but I didn't have enough
test coverage. Richard kindly provided more test cases than I could
possibly imagine and now we should have the correct condition.
llvm-svn: 189898
|
| |
|
|
|
|
| |
explicit template instantiation" warning.
llvm-svn: 189893
|
| |
|
|
|
|
|
| |
ObjectiveC methods. Apply specific annotations for them
instead as determined by the static analyzer.
llvm-svn: 189892
|
| |
|
|
| |
llvm-svn: 189888
|
| |
|
|
| |
llvm-svn: 189884
|
| |
|
|
| |
llvm-svn: 189882
|