Fariborz Jahanian
113b8ad7cf
Reverse a partial fix patch for radar 7214820. It broke some code and
...
I don't have time to refix it for now.
llvm-svn: 95733
2010-02-10 00:32:12 +00:00
Douglas Gregor
811663eb11
Implement basic support for importing source locations from one AST
...
into another AST, including their include history. Here's an example
error that involves a conflict merging a variable with different types
in two translation units (diagnosed in the third AST context into
which everything is merged).
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5:
error: external variable 'x2' declared with incompatible types in
different translation units ('int' vs. 'double')
int x2;
^
In file included from
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3:
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8:
note: declared here with type 'double'
double x2;
^
Although we maintain include history, we do not maintain macro
instantiation history across a merge. Instead, we map down to the
spelling location (for now!).
llvm-svn: 95732
2010-02-10 00:15:17 +00:00
Ted Kremenek
096807e77e
Pull header into side column.
...
llvm-svn: 95726
2010-02-09 23:42:00 +00:00
Ted Kremenek
118667c4b9
Increase page width for more modern displays.
...
llvm-svn: 95725
2010-02-09 23:40:10 +00:00
Ted Kremenek
f33109b452
Tweak CSS for options table.
...
llvm-svn: 95724
2010-02-09 23:32:46 +00:00
Ted Kremenek
d4d6abe512
Even more menu tweaking...
...
llvm-svn: 95722
2010-02-09 23:21:49 +00:00
Ted Kremenek
758f6acc95
More menu tweaking.
...
llvm-svn: 95721
2010-02-09 23:21:00 +00:00
Ted Kremenek
a362afe55f
Adjust height of main content.
...
llvm-svn: 95720
2010-02-09 23:18:43 +00:00
Ted Kremenek
1b24918fb2
Fix grammar.
...
llvm-svn: 95719
2010-02-09 23:18:00 +00:00
Ted Kremenek
7b461607f5
Change text alignment in menus.
...
llvm-svn: 95718
2010-02-09 23:16:24 +00:00
Ted Kremenek
390dd25d0f
Move file-specific styling to after the menu.
...
llvm-svn: 95717
2010-02-09 23:10:47 +00:00
Ted Kremenek
5c98bf55ac
Invert css inclusion order.
...
llvm-svn: 95716
2010-02-09 23:09:48 +00:00
Ted Kremenek
c6ee376692
More analyzer website tweaking in preparation for additional content.
...
llvm-svn: 95714
2010-02-09 23:05:59 +00:00
Douglas Gregor
e4c83e4e2e
Complain about types and declarations that we don't know how to import.
...
llvm-svn: 95706
2010-02-09 22:48:33 +00:00
Douglas Gregor
44e16a3f4c
Add in the LIT magic to avoid running AST merge test inputs as
...
separate tests. Thanks, Daniel!
llvm-svn: 95705
2010-02-09 22:40:03 +00:00
Douglas Gregor
6b2a474531
Hook up the diagnostics-argument printer when merging AST files, so
...
that we get readable diagnostics such as:
error: external variable 'x1' declared with incompatible types in
different translation units ('double *' vs. 'float **')
However, there is no translation of source locations, yet.
llvm-svn: 95704
2010-02-09 22:37:58 +00:00
Douglas Gregor
639cccc4c0
Move the diagnostic argument formatting function out of Sema and make
...
it available within the AST library, of which Sema is one client. No
functionality change.
llvm-svn: 95701
2010-02-09 22:26:47 +00:00
Ted Kremenek
1b018ab712
Fix javascript link.
...
llvm-svn: 95696
2010-02-09 21:49:53 +00:00
Fariborz Jahanian
5db5281db8
Finish implementing property synthesis by default.
...
(radar 7381956).
llvm-svn: 95695
2010-02-09 21:49:50 +00:00
Ted Kremenek
c319f5c044
Fix javascript file link.
...
llvm-svn: 95694
2010-02-09 21:48:04 +00:00
Ted Kremenek
02f2a0c279
Update checker build.
...
llvm-svn: 95692
2010-02-09 21:42:12 +00:00
Fariborz Jahanian
4587803919
Implement synthesizing properties by default.
...
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.
llvm-svn: 95685
2010-02-09 19:31:38 +00:00
Benjamin Kramer
f3a499ad88
StringRefize two random methods, remove a dead variable and a weird constructor call.
...
This maybe fixes some of the errors GCC 4.5 gives on this code.
llvm-svn: 95684
2010-02-09 19:31:24 +00:00
Douglas Gregor
62d311fdf4
Introduce a testbed for merging multiple ASTs into a single AST
...
context with the AST importer. WIP, still useless but at least it has
a test.
llvm-svn: 95683
2010-02-09 19:21:46 +00:00
Ted Kremenek
499b4e3387
Fix lookup of fields from lazy bindings to check if the region is
...
NULL, not the store, to determine if a lookup succeeded. The store
can be null if it contained no bindings. This fixes a false positive
reported to me by a user of the analyzer.
llvm-svn: 95679
2010-02-09 19:11:53 +00:00
Devang Patel
0ae70d16b8
Fix virtual bases' debug info.
...
llvm-svn: 95678
2010-02-09 19:09:28 +00:00
Ted Kremenek
74cc62e161
Tweak output.
...
llvm-svn: 95676
2010-02-09 18:51:44 +00:00
Ted Kremenek
8de7a0efd1
Add a check for a running Xcode before modifying its configuration files.
...
llvm-svn: 95675
2010-02-09 18:46:58 +00:00
Devang Patel
cce7e85165
Mark implicit "this" argument as an artificial argument.
...
llvm-svn: 95673
2010-02-09 17:57:50 +00:00
Anton Korobeynikov
c5c905e772
Fix typo
...
llvm-svn: 95664
2010-02-09 16:50:54 +00:00
Anton Korobeynikov
55496d736b
Clearify Qt status a bit
...
llvm-svn: 95663
2010-02-09 16:46:25 +00:00
Douglas Gregor
fa186e9e19
Add Qt, CMake projects to the list of C++ projects we're working on compiling
...
llvm-svn: 95662
2010-02-09 16:36:17 +00:00
Daniel Dunbar
5140d1b75e
Update tests in -Asserts mode. These tests really need to be rewritten...
...
llvm-svn: 95658
2010-02-09 08:22:03 +00:00
Douglas Gregor
e6565625f4
Migrate the mish-mash of declaration checks in
...
Sema::ActOnUninitializedDecl over to InitializationSequence (with
default initialization), eliminating redundancy. More importantly, we
now check that a const definition in C++ has an initilizer, which was
an #if 0'd code for many, many months. A few other tweaks were needed
to get everything working again:
- Fix all of the places in the testsuite where we defined const
objects without initializers (now that we diagnose this issue)
- Teach instantiation of static data members to find the previous
declaration, so that we build proper redeclaration
chains. Previously, we had the redeclaration chain but built it
too late to be useful, because...
- Teach instantiation of static data member definitions not to try
to check an initializer if a previous declaration already had an
initializer. This makes sure that we don't complain about static
const data members with in-class initializers and out-of-line
definitions.
- Move all of the incomplete-type checking logic out of
Sema::FinalizeDeclaratorGroup; it makes more sense in
ActOnUnitializedDecl.
There may still be a few places where we can improve these
diagnostics. I'll address that as a separate commit.
llvm-svn: 95657
2010-02-09 07:26:29 +00:00
Daniel Dunbar
a7566f163a
IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.
...
- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!
PR6240.
llvm-svn: 95648
2010-02-09 02:48:28 +00:00
Douglas Gregor
1f53e803cd
Fix PR number in test case
...
llvm-svn: 95640
2010-02-09 01:02:53 +00:00
John McCall
6f891400c2
Reset the found-virtual-base state unless the *current* base produces a path,
...
not *any* base up to now has produced a path. Fixes PR 6254.
I'll do the access-control part of this patch RSN.
llvm-svn: 95638
2010-02-09 00:57:12 +00:00
Douglas Gregor
34c0a90265
Be more careful when checking initializer lists that involve reference
...
types; we don't want to give an expression reference type. Fixes PR6177.
llvm-svn: 95635
2010-02-09 00:50:06 +00:00
Douglas Gregor
92354b6b55
Implement a specific diagnostic when a class template partial
...
specialization does not use any of its template parameters, then
recover far more gracefully. Fixes PR6181.
llvm-svn: 95629
2010-02-09 00:37:32 +00:00
Jakob Stoklund Olesen
819e54b65c
Pass inline keyword to optimizer as the new InlineHint function attribute.
...
At the moment the inlinehint attribute is ignored by the Inliner unless you
pass a -respect-inlinehint option. This will soon be the default.
The inlinehint attribute is set if the inline keyword is explicitly specified
on any declaration.
llvm-svn: 95623
2010-02-09 00:10:00 +00:00
Ted Kremenek
2a0cd59f8e
Convert tabs to spaces.
...
llvm-svn: 95621
2010-02-09 00:04:09 +00:00
Ted Kremenek
3f91c4b289
Fix grammar.
...
llvm-svn: 95618
2010-02-08 23:57:20 +00:00
Ted Kremenek
53c60c9a0a
Tweak menu.
...
llvm-svn: 95617
2010-02-08 23:56:51 +00:00
Ted Kremenek
156a8f92e6
Really increase menu width...
...
llvm-svn: 95615
2010-02-08 23:55:36 +00:00
Ted Kremenek
fcf4904144
Increase width of nav bar.
...
llvm-svn: 95612
2010-02-08 23:54:46 +00:00
Ted Kremenek
2960ec1c95
Add inclusion links for external JavaScript file.
...
llvm-svn: 95611
2010-02-08 23:52:41 +00:00
Ted Kremenek
d578ca93d6
Switch to drop-down menu style.
...
llvm-svn: 95610
2010-02-08 23:50:54 +00:00
Douglas Gregor
6c379e2aa6
When substituting a declaration non-type template argument for a
...
non-type template parameter that has reference type, augment the
qualifiers of the non-type template argument with those of the
referenced type. Fixes PR6250.
llvm-svn: 95607
2010-02-08 23:41:45 +00:00
Douglas Gregor
4b8fd6d3d3
Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!
...
llvm-svn: 95602
2010-02-08 23:11:56 +00:00
John McCall
bc077cf589
Thread a source location into the template-argument deduction routines. There
...
may be some other places that could take advantage of this new information,
but I haven't really looked yet.
llvm-svn: 95600
2010-02-08 23:07:23 +00:00
Douglas Gregor
408bb74ae6
Note that a CXIndex cannot be destroyed until after all of its translation units have been destroyed
...
llvm-svn: 95598
2010-02-08 23:03:06 +00:00
Douglas Gregor
f85bee621b
Eliminate a pointer of storage in each ObjCInterfaceType and
...
ObjCObjectPointerType AST node by allocating the list of protocols
after the type node itself. No functionality change.
llvm-svn: 95597
2010-02-08 22:59:26 +00:00
Daniel Dunbar
3d33fab7fc
Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
...
element type always matched the converted LLVM type for ExprType.
llvm-svn: 95596
2010-02-08 22:53:07 +00:00
Douglas Gregor
bd683973c1
Warn when cases are missing from a switch on a value of enumeration
...
type (-Wswitch), from Michal!
llvm-svn: 95592
2010-02-08 22:24:16 +00:00
Ted Kremenek
73fd7e3bee
Remove table (for now). Doesn't look so hot.
...
llvm-svn: 95590
2010-02-08 22:16:08 +00:00
Ted Kremenek
9f25dd587c
Add images showing the results in a web browser and Xcode respectively.
...
llvm-svn: 95589
2010-02-08 22:12:48 +00:00
Douglas Gregor
586d0f926c
Keep track of whether a tag was defined in a declarator vs. being
...
defined by itself, from Enea Zaffanella!
llvm-svn: 95586
2010-02-08 22:07:33 +00:00
John McCall
340aafaac6
Emit global references with constant initializers as constants. Fixes PR5585.
...
The standard actually says that such references should have internal linkage,
but gcc doesn't do that, so we probably can't get away with it.
llvm-svn: 95577
2010-02-08 21:46:50 +00:00
Ted Kremenek
d0450d90b3
Remove link to Developer Meeting and tighten menu.
...
llvm-svn: 95576
2010-02-08 21:39:53 +00:00
Ted Kremenek
8eacbe5559
Add link to the current status of analysis support for C++.
...
llvm-svn: 95573
2010-02-08 21:36:47 +00:00
Ted Kremenek
e52f932f5f
Add some diagnostics for when we cannot update the original spec file.
...
llvm-svn: 95572
2010-02-08 21:19:27 +00:00
Fariborz Jahanian
04477f3de9
Merge block/function pointer types with objc's __weak
...
attribute properly and avoid bogus warning. This is
an objective-c fix only. objective-c++ follows different code
pass and requires separate fix (which will come at a later time).
Fixes radar 7214820.
llvm-svn: 95571
2010-02-08 21:09:39 +00:00
Douglas Gregor
3aed6cdd5e
Implement basic importing and merging of variable declarations within
...
the AST importer. This doesn't actually do anything (yet), because we
don't have driver logic for merging ASTs.
llvm-svn: 95570
2010-02-08 21:09:39 +00:00
Ted Kremenek
94c5349ef2
Add a Python script to change what version of Clang is used by Xcode for static analysis (and ONLY static analysis).
...
llvm-svn: 95569
2010-02-08 20:54:01 +00:00
Daniel Dunbar
ddf1445134
Fix -Asserts warning.
...
llvm-svn: 95563
2010-02-08 20:24:21 +00:00
Sebastian Redl
c1b139dba0
Add a test case for r95555.
...
llvm-svn: 95562
2010-02-08 19:58:40 +00:00
Benjamin Kramer
16fe0bcb26
Simplify another switch/strcmp construct. No functionality/performance change.
...
llvm-svn: 95561
2010-02-08 19:51:59 +00:00
Sebastian Redl
b0e3e1bf67
When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248.
...
llvm-svn: 95555
2010-02-08 19:35:18 +00:00
John McCall
69f9dbc3e4
Fix the crash-on-invalid from PR6259.
...
llvm-svn: 95554
2010-02-08 19:26:07 +00:00
Chandler Carruth
75cc359fdc
Ensure that a operator delete overload is rocognized regardless of cv-quals.
...
llvm-svn: 95553
2010-02-08 18:54:05 +00:00
Benjamin Kramer
eaabbd8b46
Reapply r95546, no intended change in performance or functionality.
...
llvm-svn: 95552
2010-02-08 18:38:55 +00:00
Ted Kremenek
ac5ab79555
Revert 95546 since it changed the algorithmic characteristics of the convention lookup.
...
llvm-svn: 95547
2010-02-08 16:45:01 +00:00
Benjamin Kramer
30949dd9f9
Simplify code with StringRef.
...
3 files changed, 76 insertions(+), 153 deletions(-)
llvm-svn: 95546
2010-02-08 16:39:00 +00:00
Ted Kremenek
57f0989c16
Revert 95541.
...
llvm-svn: 95545
2010-02-08 16:18:51 +00:00
Douglas Gregor
f65bbb31e8
Cache imported types
...
llvm-svn: 95543
2010-02-08 15:18:58 +00:00
Zhongxing Xu
500f49fe25
Rename: GRState::getSVal(Stmt*) => getExprVal(),
...
GRState::getSVal(MemRegion*) => Load().
llvm-svn: 95541
2010-02-08 09:30:02 +00:00
Zhongxing Xu
c5f825eacd
BindInternal is redundant. Remove it.
...
llvm-svn: 95540
2010-02-08 08:48:05 +00:00
Zhongxing Xu
8ca2dc05a3
Like for symbolic region, automatically create a element zero region for
...
alloca region.
llvm-svn: 95539
2010-02-08 08:43:02 +00:00
Zhongxing Xu
b02d4a0d11
Unify the implementation of getLValueElement of store managers.
...
It's more sophisticated than the original one of BasicStore. But it does
matter.
llvm-svn: 95536
2010-02-08 08:17:02 +00:00
Zhongxing Xu
f7f0cdc517
Unify the implementation of getLValueIvar and getLValueField of store managers.
...
llvm-svn: 95535
2010-02-08 07:58:06 +00:00
Zhongxing Xu
08515a5242
Move common methods to the base StoreManager class.
...
llvm-svn: 95534
2010-02-08 07:10:35 +00:00
Chandler Carruth
794da4c236
This doesn't seem to be used code as it didn't break any tests, but fix the
...
glaring logic bug anyways. =D
llvm-svn: 95533
2010-02-08 06:42:49 +00:00
Zhongxing Xu
8ffee4d5f8
ASTContext is now a reference member of StoreManager.
...
llvm-svn: 95531
2010-02-08 06:00:22 +00:00
Zhongxing Xu
000a859f05
Add support for binding and retrieving VarRegions in flat store.
...
llvm-svn: 95529
2010-02-08 05:40:07 +00:00
Chandler Carruth
c126311d3e
Require a complete type before examining base classes during template argument
...
deduction. This requires refactoring the deduction to have access to the Sema
object instead of merely the ASTContext. Still leaves something to be desired
due to poor source location.
Fixes PR6257 and half of PR6259.
llvm-svn: 95528
2010-02-07 21:33:28 +00:00
Anders Carlsson
ff8cce4395
Make sure to set vtable pointers in the destructors as well.
...
llvm-svn: 95525
2010-02-07 19:45:40 +00:00
Anders Carlsson
6d0e5bd8f3
Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.
...
llvm-svn: 95524
2010-02-07 17:37:13 +00:00
Douglas Gregor
0e027fb32b
Workaround for friend template instantiation crash in PR5848, from Keir Mierle!
...
llvm-svn: 95517
2010-02-07 10:31:35 +00:00
Douglas Gregor
b65a913c35
Fix assertion failure when parsing linkage specifications (PR5921),
...
from Keir Mierle!
llvm-svn: 95516
2010-02-07 08:38:28 +00:00
Sam Weinig
e83b3aca0b
Roll r95513 back in.
...
llvm-svn: 95515
2010-02-07 06:32:43 +00:00
Sam Weinig
e911058bb5
Roll out r95513, it seems to have broken self hosting.
...
llvm-svn: 95514
2010-02-07 05:26:25 +00:00
Sam Weinig
db3758c40d
Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.
...
llvm-svn: 95513
2010-02-07 04:44:10 +00:00
Anders Carlsson
cee2d2f016
Use the right linkage for static variables inside C++ inline functions.
...
llvm-svn: 95512
2010-02-07 02:03:08 +00:00
Anders Carlsson
10d369d1a2
Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.
...
(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)
llvm-svn: 95511
2010-02-07 01:44:36 +00:00
Anders Carlsson
a7bcade229
Add attributes to namespace decls.
...
llvm-svn: 95510
2010-02-07 01:09:23 +00:00
Anders Carlsson
9878f9f73b
Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.
...
llvm-svn: 95509
2010-02-06 23:59:05 +00:00
Anders Carlsson
fcd764a168
Add support for threadsafe statics, and make them the default (matching gcc).
...
Daniel, I'd appreciate a review of the driver/cc1 parts.
llvm-svn: 95508
2010-02-06 23:23:06 +00:00
Anders Carlsson
5ade5d39b4
Call destructors for constructed bases as well.
...
llvm-svn: 95502
2010-02-06 20:00:21 +00:00
Anders Carlsson
ba63167b64
If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.
...
llvm-svn: 95501
2010-02-06 19:50:17 +00:00
John McCall
15dda3701a
Use a substituted type when determining how to substitute in non-type template
...
params. Don't insert addrof operations when matching against a pointer;
array/function conversions should take care of this for us, assuming the
argument type-checked in the first place. Add a fixme where we seem to be
using a less-restrictive reference type than we should.
Fixes PR 6249.
llvm-svn: 95495
2010-02-06 10:23:53 +00:00
Benjamin Kramer
4692faa7a4
Silence GCC warning and stay in 80 cols.
...
llvm-svn: 95494
2010-02-06 09:59:24 +00:00
John McCall
13481c56c3
Extract a function to instantiate references to value template parameters.
...
llvm-svn: 95491
2010-02-06 08:42:39 +00:00
Ted Kremenek
83fdeb5855
Update checker build.
...
llvm-svn: 95490
2010-02-06 06:08:09 +00:00
Anders Carlsson
96c15b1816
Don't diagnose missing noreturns for uninstantiated templates. Fixes PR6247.
...
llvm-svn: 95487
2010-02-06 05:31:15 +00:00
Douglas Gregor
61f6db54e1
Switch CodeGen's "is this variable declaration a definition?" logic
...
over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.
llvm-svn: 95486
2010-02-06 05:15:45 +00:00
Anders Carlsson
2c4de4c31e
Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)
...
llvm-svn: 95485
2010-02-06 04:52:27 +00:00
Ted Kremenek
bdfcacbe8f
Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly initialized to NULL.
...
llvm-svn: 95479
2010-02-06 04:04:46 +00:00
Ted Kremenek
30fe9ecac2
Fix regression in RegionStore (from BasicStore) where static variables were not treated as being implicitly initialized to 0 (and instead were getting symbolicated).
...
llvm-svn: 95478
2010-02-06 03:57:59 +00:00
Ted Kremenek
9c193965ba
Remove unused variable.
...
llvm-svn: 95476
2010-02-06 03:29:18 +00:00
Anders Carlsson
6710c5351e
Use the correct function info for constructors when applying function attributes. Fixes PR6245.
...
llvm-svn: 95474
2010-02-06 02:44:09 +00:00
Anders Carlsson
0da714a3e2
Implement a warning diagnostic for weak vtables. Fixes PR6116.
...
llvm-svn: 95472
2010-02-06 02:27:10 +00:00
John McCall
ce410662ce
Teach Sema how to instantiate a local function declaration properly. Fixes
...
PR 5517.
llvm-svn: 95470
2010-02-06 01:50:47 +00:00
Douglas Gregor
cae03b1e6d
Assert when we try to mangle a dependent template name, rather than
...
crashing unceremoniously.
llvm-svn: 95464
2010-02-06 01:09:36 +00:00
John McCall
52cc0897f3
Per discussion, remove the explicit restriction on static const data members with
...
out-of-line initializers as integer constant expressions. Fixes PR6206.
llvm-svn: 95463
2010-02-06 01:07:37 +00:00
Ted Kremenek
5abd69d946
Teach RegionStore::InvalidateRegions() to also invalidate static variables referenced by blocks.
...
llvm-svn: 95459
2010-02-06 00:30:00 +00:00
John McCall
ca972cd1f1
Rearrange some checks to avoid call to isCopyConstructor() and clarify path
...
taken for non-trivial constructors.
llvm-svn: 95457
2010-02-06 00:25:16 +00:00
Douglas Gregor
bb26a92239
Update Clang C++ status, with a more project-centric focus.
...
llvm-svn: 95455
2010-02-05 23:51:14 +00:00
Douglas Gregor
d320e03eed
Fix a bogus assertion after adjusting the type of a substituted
...
non-type template argument for a non-type template parameter of
pointer type. Fixes PR6244.
llvm-svn: 95447
2010-02-05 22:49:09 +00:00
Douglas Gregor
d225fa05bd
Cope with finding the "instantiated" declaration when we are
...
type-checking within a template definition. In this case, the
"instantiated" declaration is just the declaration itself, found
within the current instantiation. Fixes PR6239.
llvm-svn: 95442
2010-02-05 22:40:03 +00:00
John McCall
ab26cfa58d
Standardize the parsing of function type attributes in a way that
...
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().
llvm-svn: 95436
2010-02-05 21:31:56 +00:00
Ted Kremenek
31e7f0f293
Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not do
...
anything when Sema has issued an error. This matches the behavior in
RewriteObjC::HandleTranslationUnit().
llvm-svn: 95434
2010-02-05 21:28:51 +00:00
Douglas Gregor
a643780483
Revert r95393, which broke Clang's self-host.
...
llvm-svn: 95430
2010-02-05 21:10:36 +00:00
Douglas Gregor
c90dedbda0
Oops, thanks Clang
...
llvm-svn: 95429
2010-02-05 21:07:53 +00:00
Charles Davis
2b2864c436
Convert this test to FileCheck instead of grepping LLVM IR.
...
llvm-svn: 95428
2010-02-05 20:45:48 +00:00
Douglas Gregor
a16b0cae9a
Implement name mangling for template template parameters
...
llvm-svn: 95427
2010-02-05 20:45:00 +00:00
Ted Kremenek
6a93195783
Fix how scan-build finds c++-analyzer to work with checker builds.
...
llvm-svn: 95425
2010-02-05 20:34:14 +00:00
Daniel Dunbar
9c4e4651d5
IRgen: A few more ConvertType cleanups.
...
llvm-svn: 95423
2010-02-05 20:02:42 +00:00
Douglas Gregor
b9397108c5
Fix two issues with the substitution of template template parameters
...
when instantiating the declaration of a member template:
- Only check if the have a template template argument at a specific position
when we already know that we have template arguments at that level;
otherwise, we're substituting for a level-reduced template template
parameter.
- When trying to find an instantiated declaration for a template
template parameter, look into the instantiated scope. This was a
typo, where we had two checks for TemplateTypeParmDecl, one of
which should have been a TemplateTemplateParmDecl.
With these changes, tramp3d-v4 passes -fsyntax-only.
llvm-svn: 95421
2010-02-05 19:54:12 +00:00
Daniel Dunbar
d0bc7b9d13
IRgen: Factor out EmitAggExprToLValue.
...
llvm-svn: 95416
2010-02-05 19:38:31 +00:00
Fariborz Jahanian
df506b934e
Fix a code gen bug accessing 'isa' field via a message call
...
(Fixes radar 7609722).
llvm-svn: 95406
2010-02-05 19:18:30 +00:00
Douglas Gregor
7df89f5d18
When we're parsing an expression that may have looked like a
...
declaration, we can end up with template-id annotation tokens for
types that have not been converted into type annotation tokens. When
this is the case, translate the template-id into a type and parse as
an expression.
llvm-svn: 95404
2010-02-05 19:11:37 +00:00
Daniel Dunbar
8848175547
IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
...
conceptually correct. Review appreciated (Chris, Eli, Anders).
llvm-svn: 95401
2010-02-05 18:56:49 +00:00
Anders Carlsson
cb86e1088a
Fix the bug that was breaking self-host, and re-land the static ctor fixes.
...
llvm-svn: 95400
2010-02-05 18:38:45 +00:00
Charles Davis
5a5473f0f8
Now that we store calling conventions in the types, use them instead of
...
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.
llvm-svn: 95399
2010-02-05 18:13:10 +00:00
Fariborz Jahanian
73587761e2
Removed non-essential header file from test.
...
llvm-svn: 95396
2010-02-05 18:04:36 +00:00
Douglas Gregor
96e578d29d
Initial skeleton of an AST "importer", which will take AST elements from
...
one context and import them into another context, merging them
according to language-specific rules. This is a skeleton. It doesn't
work, it isn't testable, but I want it in version control.
llvm-svn: 95395
2010-02-05 17:54:41 +00:00
Charles Davis
e4e604b5d6
Testing, 1, 2, 3...
...
Also make the comments I added in r95291 consistent.
llvm-svn: 95394
2010-02-05 17:53:51 +00:00
Daniel Dunbar
363589bded
IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
...
need to deal with aggregates specially; this is consistent with the rest of IRgen.
Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.
llvm-svn: 95393
2010-02-05 17:51:33 +00:00
Fariborz Jahanian
314333847e
Fixes a minor rewriter bug messaging inside a function call.
...
Fixes radar 7617047.
llvm-svn: 95392
2010-02-05 17:48:10 +00:00
Fariborz Jahanian
a7e1dcdc0e
Some clean up of replacement text API no longer needed by
...
my recent changes.
llvm-svn: 95391
2010-02-05 16:43:40 +00:00
Douglas Gregor
af77cd220a
Revert r95363 and r95375, which broke self-host.
...
llvm-svn: 95389
2010-02-05 16:18:08 +00:00
Douglas Gregor
0ab7af6c28
A dependent initializer with zero arguments should return a NULL
...
initializer (for no initialization) rather than a ParenListExpr with
zero arguments in it.
llvm-svn: 95382
2010-02-05 07:56:11 +00:00
Chandler Carruth
bc50da6360
Revert the unused TST_pixel entry from r95335 as it is not listed in the Sema
...
switch, triggering warnings.
llvm-svn: 95381
2010-02-05 07:38:55 +00:00
Douglas Gregor
8c702534cb
Default function arguments for function template specializations
...
always come from the primary template, so gather the instantiation
template arguments from the primary template.
llvm-svn: 95380
2010-02-05 07:33:43 +00:00
Daniel Dunbar
4e9083260b
Tweak inliner thresholds to match llvm-gcc, see r95321.
...
llvm-svn: 95379
2010-02-05 07:32:37 +00:00
Anders Carlsson
c6eec40189
Check in a mangle checker that's turned off by default.
...
llvm-svn: 95377
2010-02-05 07:31:37 +00:00
Douglas Gregor
3ce7493c35
Teach C++ name lookup that it's okay to look in a scope without a
...
context. This happens fairly rarely (which is why we got away with
this bug). Fixes PR6184, where we skipped over the template parameter
scope while tentatively parsing.
llvm-svn: 95376
2010-02-05 07:07:10 +00:00
Anders Carlsson
893555ce66
Fix array initialization test.
...
llvm-svn: 95375
2010-02-05 07:00:11 +00:00
Anders Carlsson
ff338dbf9c
Fix a test case.
...
llvm-svn: 95374
2010-02-05 06:58:06 +00:00
Douglas Gregor
1aa3edbb99
A function declarator with a non-identifier name in an anonymous class
...
is a constructor for that class, right? Fixes PR6238.
llvm-svn: 95367
2010-02-05 06:12:42 +00:00