| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Transform the token sequence for:
typename typedef T U;
to:
typename T typedef U;
Raise a diagnostic when this happens but only if we succeeded handling
the typename.
Reviewers: rsmith, rnk
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1433
llvm-svn: 189867
|
| |
|
|
|
|
| |
Patch by chris.wailes@gmail.com.
llvm-svn: 189866
|
| |
|
|
|
|
| |
Patch by Nico Rieck!
llvm-svn: 189860
|
| |
|
|
|
|
| |
Found by Chris Wailes
llvm-svn: 189859
|
| |
|
|
| |
llvm-svn: 189857
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes pr13124.
From the discussion at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html
we know that we cannot make funcions in a weak_odr vtable also weak_odr. They
should remain linkonce_odr.
The side effect is that we cannot emit a available_externally vtable unless we
also emit a copy of the function. This also has an issue: If codegen is going
to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks
like sema cannot be more aggressive at marking functions used because
of vtables.
This leaves us with a few unpleasant options:
* Marking functions in vtables used if possible. This sounds a bit sloppy, so
we should avoid it.
* Producing available_externally vtables only when all the functions in it are
already used or weak_odr. This would cover cases like
--------------------
struct foo {
virtual ~foo();
};
struct bar : public foo {
virtual void zed();
};
void f() {
foo *x(new bar);
delete x;
}
void g(bar *x) {
x->~bar(); // force the destructor to be used
}
--------------------------
and
----------------------------------
template<typename T>
struct bar {
virtual ~bar();
};
template<typename T>
bar<T>::~bar() {
}
// make the destructor weak_odr instead of linkonce_odr
extern template class bar<int>;
void f() {
bar<int> *x(new bar<int>);
delete x;
}
----------------------------
These look like corner cases, so it is unclear if it is worth it.
* And finally: Just nuke this optimization. That is what this patch implements.
llvm-svn: 189852
|
| |
|
|
|
|
| |
StringArgument since that is a more accurate modeling.
llvm-svn: 189851
|
| |
|
|
|
|
| |
with a prior declaration. No functionality change intended.
llvm-svn: 189850
|
| |
|
|
| |
llvm-svn: 189845
|
| |
|
|
| |
llvm-svn: 189844
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
From llvm r189841.
llvm-svn: 189842
|
| |
|
|
|
|
| |
here.
llvm-svn: 189838
|
| |
|
|
| |
llvm-svn: 189833
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This paves the way for adding support for modeling the destructor of a
region before it is deleted. The statement "delete <expr>" now generates
this series of CFG elements:
1. <expr>
2. [B1.1]->~Foo() (Implicit destructor)
3. delete [B1.1]
Patch by Karthik Bhat!
llvm-svn: 189828
|
| |
|
|
| |
llvm-svn: 189823
|
| |
|
|
| |
llvm-svn: 189822
|
| |
|
|
|
|
|
|
|
|
| |
Implements parsing of lambdas in the UnwrappedLineParser.
This introduces the correct line breaks; the formatting of
lambda captures are still incorrect, and the braces are also
still formatted as if they were braced init lists instead of
blocks.
llvm-svn: 189818
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I have no idea why these were there in the first place, but now they are
certainly not necessary.
Reviewers: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1581
llvm-svn: 189813
|
| |
|
|
|
|
|
|
| |
This reverts commit r189795.
threadprivate_messages.cpp is faling on windows.
llvm-svn: 189811
|
| |
|
|
|
|
| |
I will investigate why it still fails, but for now this gets the bots green.
llvm-svn: 189807
|
| |
|
|
| |
llvm-svn: 189805
|
| |
|
|
|
|
|
| |
Convert the last few tests using -ccc-print-options to -### and remove
-ccc-print-options.
llvm-svn: 189802
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Matcher<T>::WrappedMatcher.
Summary:
Remove DynCastMatcher, since it is pretty much the same as Matcher<T>::WrappedMatcher.
This reduces the number of template instantiations and number of symbols in the object file.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1560
llvm-svn: 189800
|
| |
|
|
| |
llvm-svn: 189795
|
| |
|
|
| |
llvm-svn: 189794
|
| |
|
|
|
|
| |
CheckVectorOperands on CheckConditionalOperands function. This problem caused compilation error with test17 on "test/CodeGen/ext-vector.c".
llvm-svn: 189773
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
been an oversight, as it definitely works. Every test which changed had
the const written on the LHS of the auto already.
Notably, this also makes things like cpp11-migrate's formation of 'const
auto &' variables much more familiar.
Yes, many people feel that 'const' and other qualifiers belong on the
RHS of the type. I'm not going to argue about that because Clang already
*overwhelming* places the qualifiers on the LHS when it can and on the
RHS when it must. We shouldn't diverge for auto. We should add a tool to
clang-tidy that fixes this in either direction, and then wire up
clang-tidy to tools like cpp11-migrate to fix their placement after
transforms.
llvm-svn: 189769
|
| |
|
|
|
|
| |
messages.
llvm-svn: 189765
|
| |
|
|
| |
llvm-svn: 189762
|
| |
|
|
|
|
| |
both tools/clang and llvm directories.
llvm-svn: 189761
|
| |
|
|
| |
llvm-svn: 189759
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and comments.
Summary:
Store first and last newline position in the token text for string literals and
comments to avoid doing .find('\n') for each possible solution.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1556
llvm-svn: 189758
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Test clang-format's handling of empty .clang-format files.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1562
llvm-svn: 189757
|
| |
|
|
|
|
|
|
|
| |
Before, constructs like:
using A::operator+;
caused a segfault. This fixes llvm.org/PR17050.
llvm-svn: 189749
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an improved version of r186498. It enables ExprEngine to reason about
temporary object destructors. However, these destructor calls are never
inlined, since this feature is still broken. Still, this is sufficient to
properly handle noreturn temporary destructors.
Now, the analyzer correctly handles expressions like "a || A()", and executes the
destructor of "A" only on the paths where "a" evaluted to false.
Temporary destructor processing is still off by default and one has to
explicitly request it by setting cfg-temporary-dtors=true.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1259
llvm-svn: 189746
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
#define OPERATION_CASE(name) \
case OP_name: \
return operations::Operation##name
After:
#define OPERATION_CASE(name) \
case OP_name: \
return operations::Operation##name
llvm-svn: 189743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fallback syntax used when we fail to find a '.clang-format' file. Adjust
variable names appropriately.
Update the editor integration pieces that specify a '-style' option to
specify it as '-style=file'. I left the functionality in place because
even if the preferred method is to use '.clang-format' files, this way
if someone needs to clobber the style in their editor we show how to do
so in these examples.
Also check in a '.clang-format' file for Clang to ensure that separate
checkouts and builds of Clang from LLVM can still get the nice
formatting. =] This unfortunately required nuking the test for the
absence of a '.clang-format' file as now the directory happening to be
under your clang source tree will cause there to always be a file. ;]
llvm-svn: 189741
|
| |
|
|
| |
llvm-svn: 189731
|
| |
|
|
| |
llvm-svn: 189721
|
| |
|
|
|
|
|
|
|
|
| |
InitializedEntity::EntityKind as an index for one of its %select. Over time,
EntityKind has been expanded, but the diagnostic text has not been updated.
This adds additional text to the %select to cover the new enum values. A
comment has been added to the end of the enum regarding this situation. This
fixes the crasher in PR17043.
llvm-svn: 189716
|
| |
|
|
| |
llvm-svn: 189712
|
| |
|
|
|
|
| |
argument list.
llvm-svn: 189711
|
| |
|
|
| |
llvm-svn: 189710
|
| |
|
|
|
|
|
|
|
| |
a windows compatible builtin header.
Currently uses x86intrin.h for implementing intel intrinsics in a clang
specific manner.
llvm-svn: 189709
|
| |
|
|
|
|
|
|
| |
of some sort (but not an object, block pointer or CF pointers),
and is not annotated with the objc_returns_inner_pointer attribute,
we should suggest NS_RETURNS_INNER_POINTER annotation for these methods.
llvm-svn: 189707
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
This will never happen in the analyzed code code, but can happen for checkers
that over-eagerly dereference pointers without checking that it's safe.
UnknownVal is a harmless enough value to get back.
Fixes an issue added in r189590, caught by our internal buildbot.
llvm-svn: 189688
|
| |
|
|
|
|
|
|
|
|
| |
specified NSUInteger as the followup typedef.
With this change, NS_OPTIONS is only inferred
based on looking up how enumerators are speficied
(if they her hexadecimal, power of 2, or have
bitwise constant expressions).
llvm-svn: 189682
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function bound in the registry.
Summary:
Reduce the number of symbols by changing how templates are instantiated per function bound in the registry.
This change reduces the number of sections in Registry.cpp.o by a little over 10%.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1557
llvm-svn: 189676
|