| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.
llvm-svn: 190444
|
| |
|
|
|
|
|
|
|
|
| |
As requested when applying the same logic to calling conventions.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1634
llvm-svn: 190441
|
| |
|
|
|
|
|
| |
treat such subtractions as being non-constant. Patch by Serge Pavlov! With a
few tweaks by me.
llvm-svn: 190439
|
| |
|
|
|
|
|
|
|
| |
Make sure we perform the correct "referenced-but-not-used" check for
static member constants.
Fixes bug reported on cfe-commits by Alexey Samsonov.
llvm-svn: 190437
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates. As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.
MSVC's scheme is that every function that requires a guard gets an i32
bitfield. Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created. MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.
On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.
Implements PR16888.
Reviewers: rjmccall, eli.friedman
Differential Revision: http://llvm-reviews.chandlerc.com/D1416
llvm-svn: 190427
|
| |
|
|
|
|
| |
clang-x86_64-darwin11-nobootstrap-RAincremental.
llvm-svn: 190393
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.
Fixes:
1st Commit (Done): Add new methods for TargetInfo:
getRealTypeByWidth and getIntTypeByWidth
for ASTContext names are almost same(invokes new methods from TargetInfo):
getIntTypeForBitwidth and getRealTypeForBitwidth
2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.
llvm-svn: 190391
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a few different things.
This patch improves unused var diags for const vars: we no longer
unconditionally suppress diagnostics for const vars, instead only suppressing
the diagnostic when the declaration appears to be useful.
This patch also makes us more consistently use whether a variable/function
is declared in the main file to suppress diagnostics where appropriate.
Fixes <rdar://problem/14907887>.
llvm-svn: 190382
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Calling conventions are inherited during decl merging. Before this
change, deduction would fail due to a type mismatch between the template
and the specialization. This change adjusts the CCs to match before
deduction, and lets the decl merging logic diagnose mismatch or inherit
the CC from the template.
This allows specializations of static member function templates in the
Microsoft C++ ABI.
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1570
llvm-svn: 190377
|
| |
|
|
| |
llvm-svn: 190369
|
| |
|
|
|
|
| |
This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required.
llvm-svn: 190368
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Noticed by Roman Divacky.
llvm-svn: 190311
|
| |
|
|
|
|
| |
but is fine with {}).
llvm-svn: 190305
|
| |
|
|
|
|
| |
functionality was never completely implemented, and this is an improvement over silently eating the attribute.
llvm-svn: 190303
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 190249
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange
in CXXConstructExpr nodes.
Added testcase.
llvm-svn: 190239
|
| |
|
|
|
|
|
| |
sequence. All that matters here is whether we're doing the
std::initializer_list special case thing.
llvm-svn: 190213
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
threadprivate_messages.cpp)
llvm-svn: 190183
|
| |
|
|
|
|
|
|
|
|
| |
vector types,
so allow that case and add appropriate tests.
Patch by Ruiling Song!
llvm-svn: 190129
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this patch, TreeTransform::TransformExpr uses a ridiculous amount of
stack space (around 5000 bytes). Preventing inlining brings the stack usage
down to something sane.
On a testcase I have, on my computer, this allows changing -ftemplate-depth
from 210 to around 750 before we crash. I'm not sure I should commit the
testcase, though: I don't want to cause test failures on platforms with less
stack space available.
<rdar://problem/14098189>.
llvm-svn: 190114
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Found by Chris Wailes
llvm-svn: 189859
|
| |
|
|
| |
llvm-svn: 189857
|
| |
|
|
|
|
| |
StringArgument since that is a more accurate modeling.
llvm-svn: 189851
|
| |
|
|
|
|
| |
with a prior declaration. No functionality change intended.
llvm-svn: 189850
|
| |
|
|
|
|
|
|
|
|
| |
Patch by chris.wailes@gmail.com
Functions can now declare what state the consumable type the are returning will
be in. This is then used on the caller side and checked on the callee side.
Constructors now use this attribute instead of the 'consumes' attribute.
llvm-svn: 189843
|
| |
|
|
| |
llvm-svn: 189833
|
| |
|
|
|
|
|
|
| |
This reverts commit r189795.
threadprivate_messages.cpp is faling on windows.
llvm-svn: 189811
|
| |
|
|
| |
llvm-svn: 189795
|
| |
|
|
|
|
| |
CheckVectorOperands on CheckConditionalOperands function. This problem caused compilation error with test17 on "test/CodeGen/ext-vector.c".
llvm-svn: 189773
|
| |
|
|
|
|
| |
argument list.
llvm-svn: 189711
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Patch by chris.wailes@gmail.com
Adds the 'consumable' attribute that can be attached to classes. This replaces
the previous method of scanning a class's methods to see if any of them have
consumed analysis attributes attached to them. If consumed analysis attributes
are attached to methods of a class that isn't marked 'consumable' a warning
is generated.
llvm-svn: 189702
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, Sema was reusing parts of the AST when synthesizing an assignment
operator, turning it into a AS-dag. This caused problems for the static
analyzer, which assumed an expression appears in the tree only once.
Here I make sure to always create a fresh Expr, when inserting something into
the AST, fixing PR16745 in the process.
Reviewers: doug.gregor
CC: cfe-commits, jordan_rose
Differential Revision: http://llvm-reviews.chandlerc.com/D1425
llvm-svn: 189659
|
| |
|
|
|
|
| |
Based on a patch by Benno Rice!
llvm-svn: 189644
|
| |
|
|
|
|
|
|
| |
I changed the diagnostic printing code because it's probably better
to cut off a digit from DBL_MAX than to print something like
1.300000001 when the user wrote 1.3.
llvm-svn: 189625
|
| |
|
|
|
|
| |
The problem was caught by sanitizer build.
llvm-svn: 189575
|
| |
|
|
|
|
| |
The function always returned true value, which was never used.
llvm-svn: 189571
|
| |
|
|
|
|
| |
do anything useful.
llvm-svn: 189548
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We would not perform substitution at an appropriate point, allowing strange
results to appear. We would accepts things that we shouldn't or mangle things incorrectly. Note that this hasn't fixed the other cases like
template-template parameters or non-type template parameters.
Reviewers: doug.gregor, rjmccall, rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1507
llvm-svn: 189540
|
| |
|
|
|
|
| |
CUDAHost are now handled as inheritable attributes. In all three cases, this makes the processing behavior more consistent with the declared behavior in Attr.td.
llvm-svn: 189532
|