| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 104237
|
| |
|
|
| |
llvm-svn: 104169
|
| |
|
|
| |
llvm-svn: 104135
|
| |
|
|
| |
llvm-svn: 104026
|
| |
|
|
|
|
|
| |
for Visual Studio 2010. It also adds a registry search
for the Express edition,", from Steven Watanabe!
llvm-svn: 104015
|
| |
|
|
|
|
| |
number of times the analyzer will go through a loop.
llvm-svn: 104007
|
| |
|
|
|
|
| |
out. The remaining ones are okay.
llvm-svn: 103973
|
| |
|
|
|
|
| |
This aligns with how gcc compiler does things.
llvm-svn: 103912
|
| |
|
|
|
|
| |
entirely sure what this does, to be honest.
llvm-svn: 103895
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870
|
| |
|
|
|
|
|
|
|
|
|
|
| |
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.
I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.
llvm-svn: 103865
|
| |
|
|
|
|
|
|
|
|
| |
"return" statement and mark the corresponding CXXConstructExpr as
elidable. Teach CodeGen that eliding a temporary is different from
eliding an object construction.
This is just a baby step toward NRVO.
llvm-svn: 103849
|
| |
|
|
|
|
| |
types.", it is breaking Clang bootstrap.
llvm-svn: 103775
|
| |
|
|
| |
llvm-svn: 103770
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.
The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).
From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).
Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.
Fixes PR7114 and PR6564.
llvm-svn: 103718
|
| |
|
|
|
|
|
|
|
|
|
| |
(e.g. for C++ operators) in the xml dump.
I also re-enabled the unit test for ast-print-xml (or so I think)
at least, make test didn't fail..."
patch by Sebastien Binet!
llvm-svn: 103671
|
| |
|
|
| |
llvm-svn: 103517
|
| |
|
|
|
|
| |
ASTContext's allocator. Fixes <rdar://problem/7961605>.
llvm-svn: 103421
|
| |
|
|
| |
llvm-svn: 103412
|
| |
|
|
| |
llvm-svn: 103390
|
| |
|
|
|
|
| |
CXXExprWithTemporaries.
llvm-svn: 103387
|
| |
|
|
| |
llvm-svn: 103376
|
| |
|
|
| |
llvm-svn: 103375
|
| |
|
|
| |
llvm-svn: 103374
|
| |
|
|
|
|
|
| |
and deserialize as a CallExpr which is close, but ends up
deserializing with the wrong stmt class.
llvm-svn: 103371
|
| |
|
|
|
|
|
| |
mark any declarations we see inside of that type as
"referenced". Fixes PR7079.
llvm-svn: 103323
|
| |
|
|
|
|
|
|
| |
walk an entire AST, including all of the types, declarations,
statements, and expressions, and allowing one to easily override the
behavior of the walk at any particular node kind.
llvm-svn: 103308
|
| |
|
|
|
|
| |
Andrew Sutton!
llvm-svn: 103301
|
| |
|
|
| |
llvm-svn: 103260
|
| |
|
|
| |
llvm-svn: 103258
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/switch/while/do/for statements. Previously, we would end up either:
(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).
We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.
Fixes PR7067.
llvm-svn: 103187
|
| |
|
|
|
|
| |
which breaks clang-i686-xp-msvc9 test-clang.
llvm-svn: 103180
|
| |
|
|
|
|
|
|
|
|
| |
matching gcc compiler. Fixes #include_next <...> shenanigans that lead to
file-not-found failures with <cstddef> on libstdc++ 4.3.[012].
Updated C++ include header search paths for various Debian/Ubuntu and Fedora
linux distros.
llvm-svn: 103177
|
| |
|
|
|
|
|
| |
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
|
| |
|
|
|
|
|
| |
flag now, and can be used with other analyses. Only turned it on for C++
methods for now.
llvm-svn: 103160
|
| |
|
|
|
|
|
| |
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).
llvm-svn: 103123
|
| |
|
|
| |
llvm-svn: 103090
|
| |
|
|
| |
llvm-svn: 103077
|
| |
|
|
| |
llvm-svn: 103075
|
| |
|
|
|
|
|
|
|
|
|
|
| |
over choice of:
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String]
dox to come.
llvm-svn: 103056
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
print the diagnostic category number in the [] at the end
of the line. For example:
$ cat t.c
#include <stdio.h>
void foo() {
printf("%s", 4);
}
$ clang t.c -fsyntax-only -fdiagnostics-print-source-range-info
t.c:3:11:{3:10-3:12}{3:15-3:16}: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
printf("%s", 4);
~^ ~
1 warning generated.
Clients that want category information can now pick the number
out of the output, rdar://7928231.
More coming.
llvm-svn: 103053
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.
This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.
llvm-svn: 103014
|
| |
|
|
|
|
|
|
|
| |
they don't go in
the DeclContext for the translation unit. This is to workaround a fundamental issue in how
ObjC decls (within an @implementation) are parsed before the ObjCContainerDecl is available.
llvm-svn: 102944
|
| |
|
|
|
|
|
|
| |
(-Wunused-exception-parameter) than normal variables, since it's more
common to name and then ignore an exception parameter. This warning is
neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.
llvm-svn: 102931
|
| |
|
|
| |
llvm-svn: 102847
|
| |
|
|
|
|
| |
fatal error has occurred.
llvm-svn: 102778
|
| |
|
|
| |
llvm-svn: 102690
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
translation unit is parsed. This enables us to inline some calls when still
analyzing one function at a time.
Actions are classified into Function, CXXMethod, ObjCMethod,
ObjCImplementation.
This does not hurt performance much. The analysis time for sqlite3.c:
before:
real 17m52.440s
user 17m49.460s
sys 0m2.010s
after:
real 18m0.500s
user 17m56.900s
sys 0m2.330s
DisplayProgress option is broken now. -inine-call action is removed. It
will be reenabled in another form, perhaps as an indenpendant option.
llvm-svn: 102689
|
| |
|
|
| |
llvm-svn: 102686
|
| |
|
|
| |
llvm-svn: 102623
|