Zhanyong Wan
392d2ed8a1
Fix a typo in a comment in tools/clang/unittests/Frontend/Makefile.
...
llvm-svn: 125182
2011-02-09 07:42:47 +00:00
Ted Kremenek
435c80f5ea
Initialize 'reclaimNodes'.
...
llvm-svn: 125179
2011-02-09 06:04:59 +00:00
NAKAMURA Takumi
1e8200d7ba
test: CMake: Be aware of LLVM_LIT_TOOLS_DIR.
...
llvm-svn: 125178
2011-02-09 04:19:57 +00:00
Devang Patel
19ba2b4d6e
Emit debug info for objc_selector.
...
llvm-svn: 125163
2011-02-09 03:15:05 +00:00
Ken Dyck
48b0b2f762
Correct units in comments describing Size and getSize().
...
llvm-svn: 125158
2011-02-09 02:06:44 +00:00
Douglas Gregor
2575631c0f
When IRgen refers to a function declaration that is not a definition,
...
and we later find the definition, make sure that we add the definition
(not the declaration) to the list of deferred definitions to
emit. Fixes PR8864.
Thanks to Nick Lewycky for testing this patch out
llvm-svn: 125157
2011-02-09 02:03:05 +00:00
Ken Dyck
c8ae55050d
Convert RecordLayout::Size to CharUnits from bits. No changes to
...
functionality intended.
llvm-svn: 125156
2011-02-09 01:59:34 +00:00
Ted Kremenek
a40f8ebc83
static analyzer: Further reduce the analyzer's memory usage when analyzing sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes.
...
The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain
practically no difference between the predecessor and successor nodes. For example, if
the state is different between a predecessor and a node, the node is left in. Only for
the 'environment' component of the state do we not care if the ExplodedNodes are different.
This paves the way for future optimizations where we can reclaim the environment objects.
llvm-svn: 125154
2011-02-09 01:27:33 +00:00
Ted Kremenek
a628225535
Make ProgramPoint::getTag() public.
...
llvm-svn: 125153
2011-02-09 01:27:27 +00:00
John McCall
f4cd4f94d9
NonTypeTemplateParmDecl is just a DeclaratorDecl, not a VarDecl.
...
Also, reorganize and make very explicit the logic for determining
the value kind and type of a referenced declaration.
llvm-svn: 125150
2011-02-09 01:13:10 +00:00
Devang Patel
14524e0f24
If an aggregate argument is passed indirectly because it has non trivial
...
destructor or copy constructor than let debug info know about it.
Radar 8945514.
llvm-svn: 125142
2011-02-09 00:37:30 +00:00
Ted Kremenek
fffba74477
No longer pass deprecated '-nodistribute' flag to xcodebuild.
...
llvm-svn: 125131
2011-02-08 22:54:30 +00:00
Ted Kremenek
1953f97ac9
analyzer, retain/release checker: Remove hack where objects passed in message to 'self' are no longer tracked.
...
llvm-svn: 125130
2011-02-08 22:54:26 +00:00
Rafael Espindola
c6236065b7
Update for API change.
...
llvm-svn: 125129
2011-02-08 22:44:16 +00:00
John McCall
7a198cef04
When checking the 'weak' and 'weakref' attributes, look for non-external
...
linkage rather than the presence of the 'static' storage class specifier.
Fixes rdar://problem/8814626.
llvm-svn: 125126
2011-02-08 22:35:49 +00:00
Fariborz Jahanian
701f094afb
Fix an IRGen bug in property setter calls when
...
setter and getter types mismatch. // rdar://8966864
llvm-svn: 125125
2011-02-08 22:33:23 +00:00
Argyrios Kyrtzidis
fa0734ec4f
[analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core.
...
Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration.
Yet another library to avoid cyclic dependencies between Core and Checkers.
llvm-svn: 125124
2011-02-08 22:30:36 +00:00
Argyrios Kyrtzidis
4975170267
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.cpp -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp
...
llvm-svn: 125123
2011-02-08 22:30:15 +00:00
Argyrios Kyrtzidis
f410a6299f
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h
...
llvm-svn: 125122
2011-02-08 22:30:11 +00:00
Argyrios Kyrtzidis
f99d595cfd
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h
...
llvm-svn: 125121
2011-02-08 22:30:02 +00:00
John McCall
53c72e71cc
Test case accidentally left out of my last commit.
...
llvm-svn: 125119
2011-02-08 22:28:39 +00:00
Douglas Gregor
92a96f5c32
Split the serialized representation for the detailed preprocessing
...
record away from the core processor record. The tangling of these two
data structures led to some inefficiencies (e.g., deserializing all
of the detailed preprocessing record when we didn't need it, such as
while performing code completion) along with some unnecessary
ugliness.
llvm-svn: 125117
2011-02-08 21:58:10 +00:00
Peter Collingbourne
3a34725ed1
AST: support for pre-arg expressions on CallExpr subclasses
...
llvm-svn: 125115
2011-02-08 21:18:02 +00:00
Peter Collingbourne
4b279a033b
StmtPrinter: factor out arg printing code to PrintCallArgs
...
llvm-svn: 125114
2011-02-08 21:17:54 +00:00
Benjamin Kramer
1a648d1930
Allow multiple -B prefixes. Patch by Joerg Sonnenberger.
...
llvm-svn: 125111
2011-02-08 20:31:42 +00:00
John McCall
d396b97c5a
Clear the linkage cache recursively. Fixes PR8926.
...
llvm-svn: 125104
2011-02-08 19:01:05 +00:00
Argyrios Kyrtzidis
898fdbf82d
In Sema::CheckShadow, get the DeclContext from the variable that we are checking
...
instead from the Scope; Inner scopes in bodies don't have DeclContexts associated with them.
Fixes http://llvm.org/PR9160 & rdar://problem/8966163.
llvm-svn: 125097
2011-02-08 18:21:25 +00:00
Fariborz Jahanian
87967425f9
Support for objextive-c++ use of property-dot syntax as receiver
...
in liu of a class method getter.
// rdar://8962253
llvm-svn: 125094
2011-02-08 18:05:59 +00:00
Douglas Gregor
0beaec05af
Update the writing of the block-information block in the AST file
...
format, so that llvm-bcanalyzer knows about all of the various record
kinds.
llvm-svn: 125086
2011-02-08 16:34:17 +00:00
John McCall
ad7c5c1657
Reorganize CodeGen{Function,Module} to eliminate the unfortunate
...
Block{Function,Module} base class. Minor other refactorings.
Fixed a few address-space bugs while I was there.
llvm-svn: 125085
2011-02-08 08:22:06 +00:00
John McCall
b0a3ecb41c
Extend the const capture optimization to C++ record types with no
...
mutable fields and with trivial destructors and copy constructors.
llvm-svn: 125073
2011-02-08 03:07:00 +00:00
Douglas Gregor
a57a66e8d0
Sema::MaybeBindToTemporary() shouldn't treat any expression returning
...
a glvalue as a temporary. Previously, we were enumerating all of the
cases that coul return glvalues and might be called with
Sema::MaybeBindToTemporary(), but that was gross and we missed the
Objective-C property reference case.
llvm-svn: 125070
2011-02-08 02:14:35 +00:00
Ken Dyck
bec0285d7f
Convert RecordLayout::NonVirtualAlign to CharUnits. No change in
...
functionality intended.
llvm-svn: 125069
2011-02-08 02:02:47 +00:00
John McCall
653dac4b0a
dgregor accidentally killed this assert, but on investigation, it can fire
...
on invalid code and we don't really care, so kill it harder.
llvm-svn: 125068
2011-02-08 01:59:10 +00:00
Fariborz Jahanian
14889fc671
Support for objc use of property-dot syntax as receiver
...
in liu of a class method getter. objc++ uses a different
code path and is more involved (TBD).
llvm-svn: 125061
2011-02-08 00:23:07 +00:00
John McCall
93be3f75cc
When copy-capturing values for a nested capture, use a BlockDeclRefExpr.
...
llvm-svn: 125021
2011-02-07 18:37:40 +00:00
Ted Kremenek
e6a12a97d4
Move uninitialized variable checking back under -Wuninitialized-experimental. It is clear from user feedback that this warning is not quite ready.
...
llvm-svn: 125007
2011-02-07 17:38:38 +00:00
John McCall
351762cda2
A few more tweaks to the blocks AST representation:
...
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary
With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.
Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.
llvm-svn: 125005
2011-02-07 10:33:21 +00:00
Anton Yartsev
85129b8a86
pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed)
...
llvm-svn: 125000
2011-02-07 02:17:30 +00:00
Anders Carlsson
43760c3d42
Add another test that we can fully devirtualize now.
...
llvm-svn: 124988
2011-02-06 20:16:20 +00:00
Anders Carlsson
e866d44417
Fix self-host; if a thunk already exists and has available_externally linkage, we should change its linkage instead of asserting.
...
llvm-svn: 124986
2011-02-06 20:09:44 +00:00
Anders Carlsson
8b02183ff3
When building with optimizations, emit thunks with available_externally linkage so devirtualized function calls can also be de-thunked.
...
llvm-svn: 124984
2011-02-06 18:31:40 +00:00
Anders Carlsson
fe8a9939f9
Simplify thunks code.
...
llvm-svn: 124983
2011-02-06 17:15:43 +00:00
Oscar Fuentes
ced8836182
CLANG_BINARY_DIR is not the same thing as LLVM_BINARY_DIR when Clang
...
is built as part of LLVM.
llvm-svn: 124982
2011-02-06 15:33:08 +00:00
Chris Lattner
7031ae38bb
add some missing builtins.
...
llvm-svn: 124981
2011-02-06 12:45:51 +00:00
Oscar Fuentes
82a0d26294
Support running tests from the VS IDE and XCode.
...
Untested, but should work :)
llvm-svn: 124975
2011-02-05 21:37:51 +00:00
Oscar Fuentes
1b6a38e3c6
Remove the clang++ symlink with `make clean'.
...
llvm-svn: 124974
2011-02-05 21:37:37 +00:00
Douglas Gregor
7115aee109
Add a __has_feature check for default template arguments in function
...
templates, a C++0x feature.
llvm-svn: 124973
2011-02-05 20:35:30 +00:00
Oscar Fuentes
c9fe3b94a5
CMake: libclang shall be named libclang.so, not liblibclang.so.
...
It is not possible to simply change that target name to `clang'
because we already have one.
llvm-svn: 124972
2011-02-05 20:00:13 +00:00
Douglas Gregor
606c4ac325
Improve our uniquing of file entries when files are re-saved or are
...
overridden via remapping. Thus, when we create a "virtual" file in the
file manager, we still stat() the real file that lives behind it so
that we can provide proper uniquing based on inodes. This helps keep
the file manager much more consistent.
To take advantage of this when reparsing files in libclang, we disable
the use of the stat() cache when reparsing or performing code
completion, since the stat() cache is very likely to be out of date in
this use case.
llvm-svn: 124971
2011-02-05 19:42:43 +00:00