Douglas Gregor
05dac7d154
By default, warn about commas at the end of an enumerator list in C++/C89.
...
llvm-svn: 107485
2010-07-02 16:17:01 +00:00
Argyrios Kyrtzidis
335751610e
Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.
...
<vector> header can be used correctly through PCH now.
llvm-svn: 107483
2010-07-02 15:58:43 +00:00
Argyrios Kyrtzidis
746c889e34
Provide some test cases for C++ PCH.
...
llvm-svn: 107479
2010-07-02 11:55:48 +00:00
Argyrios Kyrtzidis
a45855fc2a
Disable Decl::CheckAccessDeclContext() temporarily.
...
llvm-svn: 107478
2010-07-02 11:55:44 +00:00
Argyrios Kyrtzidis
373a83abdc
Fix reading FunctionDecls from PCH.
...
llvm-svn: 107477
2010-07-02 11:55:40 +00:00
Argyrios Kyrtzidis
e23371e71d
Fix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ClassTemplatePartialSpecializationDecls.
...
Store/read also their template arguments because they may be initializing and not be able to provide them.
llvm-svn: 107476
2010-07-02 11:55:37 +00:00
Argyrios Kyrtzidis
2c2167ac3d
Fully read/write CXXRecordDecl for PCH.
...
llvm-svn: 107475
2010-07-02 11:55:32 +00:00
Argyrios Kyrtzidis
e929095f4a
Fix reading of DependentNameType.
...
llvm-svn: 107474
2010-07-02 11:55:24 +00:00
Argyrios Kyrtzidis
dab33c5d33
Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.
...
llvm-svn: 107473
2010-07-02 11:55:20 +00:00
Argyrios Kyrtzidis
ee776bcb7a
Fix broken reading of member pointer from PCH.
...
llvm-svn: 107472
2010-07-02 11:55:15 +00:00
Argyrios Kyrtzidis
45a83f9acc
- Allow a typedef type to be read from PCH even if its decl is currently initializing.
...
- Fix creation of TemplateSpecializationType.
llvm-svn: 107471
2010-07-02 11:55:11 +00:00
Argyrios Kyrtzidis
e3029a7e7b
Fix broken reading of "#lines" from PCH.
...
llvm-svn: 107470
2010-07-02 11:55:05 +00:00
Argyrios Kyrtzidis
318b0e78c6
Generally types expect an initialized TypeDecl; its safer and less complicated to delay PCH reading the type of a TypeDecl.
...
llvm-svn: 107469
2010-07-02 11:55:01 +00:00
Argyrios Kyrtzidis
39f0e308c4
Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.
...
llvm-svn: 107468
2010-07-02 11:54:55 +00:00
Zhongxing Xu
d6c221c3ee
Create a ASTUnitTU class to interface ASTUnit to the Indexer.
...
llvm-svn: 107467
2010-07-02 11:52:15 +00:00
Zhongxing Xu
a94ec74c6f
add -analyze-function option.
...
llvm-svn: 107463
2010-07-02 07:03:03 +00:00
Zhongxing Xu
7842c0836d
add -view-call-graph option to wpa.
...
llvm-svn: 107462
2010-07-02 06:58:30 +00:00
Zhongxing Xu
a74c22daec
Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.
...
llvm-svn: 107461
2010-07-02 06:39:46 +00:00
Craig Silverstein
19ebcd0f28
Handle typedef function declarations correctly, such as
...
typedef int (*Myfunc)(int);
Myfunc func;
Reviewed by chandlerc
llvm-svn: 107450
2010-07-01 23:46:26 +00:00
Douglas Gregor
e71eddac59
Add a new routine Sema::LookupDestructor and make all destructor-lookup calls use that routine
...
llvm-svn: 107444
2010-07-01 22:47:18 +00:00
Douglas Gregor
6d880b1a83
Provide exception specifications for implicitly-declared default constructors.
...
llvm-svn: 107437
2010-07-01 22:31:05 +00:00
Douglas Gregor
4e8b5fb1eb
Move the implicit declaration of a default constructor into a separate
...
routine; no functionality change.
llvm-svn: 107434
2010-07-01 22:02:46 +00:00
Douglas Gregor
8453ddb5fe
Provide exception specifications for implicitly-declared copy constructors.
...
llvm-svn: 107429
2010-07-01 20:59:04 +00:00
Daniel Dunbar
a2b1f8b5cd
MC: Pass the target instance to the AsmParser constructor.
...
llvm-svn: 107427
2010-07-01 20:41:59 +00:00
Ted Kremenek
bd862711fd
Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for non-static global variables
...
when calling a function/method whose impact on global variables we cannot accurately estimate.
This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes
RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily
determining the value of a global.
llvm-svn: 107423
2010-07-01 20:16:50 +00:00
Jordy Rose
f7488ec6dc
Add an ivar to SymbolReaper for the current statement, and then stop passing the current statement around everywhere. Preparation for symbolic extents.
...
llvm-svn: 107422
2010-07-01 20:09:55 +00:00
Douglas Gregor
19ecba740f
Test implicit declaration of copy assignment operator with non-const argument
...
llvm-svn: 107421
2010-07-01 20:08:52 +00:00
Douglas Gregor
f120304cc4
Move the implicit declaration of a constructor out to a separate
...
method. No functionality change.
llvm-svn: 107415
2010-07-01 19:09:28 +00:00
Douglas Gregor
cfe682274c
Teach DeclareImplicitCopyConstructor how to cope with virtual bases
...
and multi-dimensional array fields. Fixes several bugs found by
inspection.
llvm-svn: 107411
2010-07-01 18:27:03 +00:00
Douglas Gregor
54be33925a
Move declaration of a class's implicit copy constructor into a
...
separate function. Aside from making the loops infinitely faster, no
functionality change.
llvm-svn: 107407
2010-07-01 17:57:27 +00:00
Douglas Gregor
68e1136585
Provide an exception-specification for an implicitly-declared
...
copy-assignment operator.
llvm-svn: 107406
2010-07-01 17:48:08 +00:00
Douglas Gregor
f56ab7b6be
Move the implicit declaration of a class's copy-assignment operator
...
into a separate routine. No functionality change.
llvm-svn: 107402
2010-07-01 16:36:15 +00:00
Douglas Gregor
3311ed4f0e
Make loops infinitely faster. No functionality change.
...
llvm-svn: 107398
2010-07-01 15:29:53 +00:00
Douglas Gregor
2f3d9e8264
Add Sema test case for exception-specifiers implicitly added to destructors.
...
llvm-svn: 107395
2010-07-01 14:21:35 +00:00
Douglas Gregor
bac7490ffc
Remove unnecessary ASTContext parameter from
...
CXXRecordDecl::getDestructor(); no functionality change.
llvm-svn: 107394
2010-07-01 14:13:13 +00:00
Zhongxing Xu
bf81ed1fcf
ExplodedGraph never uses ASTContext, remove it.
...
llvm-svn: 107388
2010-07-01 07:10:59 +00:00
Chris Lattner
0e7929f30c
fix rdar://8147692 - yet another crash due to my abi work.
...
llvm-svn: 107387
2010-07-01 06:20:47 +00:00
Douglas Gregor
957551609c
Reinstate fix for PR7526, which was failing because, now that we
...
aren't dropping all exception specifications on destructors, the
exception specifications on implicitly-declared destructors were
detected as being wrong (which they were).
Introduce logic to provide a proper exception-specification for
implicitly-declared destructors. This also fixes PR6972.
Note that the other implicitly-declared special member functions also
need to get exception-specifications. I'll deal with that in a
subsequent commit.
llvm-svn: 107385
2010-07-01 05:10:53 +00:00
Douglas Gregor
d537dc022a
Update diagnostic on compatibility page to reflect reality
...
llvm-svn: 107382
2010-07-01 03:50:01 +00:00
Douglas Gregor
7c42659cee
When performing copy initialization via user-defined conversions,
...
don't allow two user-defined conversions. Fixes PR6595 (again).
llvm-svn: 107379
2010-07-01 03:43:00 +00:00
Douglas Gregor
3671ad4571
Revert r107374, which broke bootstrap.
...
llvm-svn: 107378
2010-07-01 03:28:42 +00:00
Douglas Gregor
c6e4c68371
When building the type of a destructor, make sure to keep the
...
exception specification. Fixes PR7526.
llvm-svn: 107374
2010-07-01 02:33:15 +00:00
Douglas Gregor
fb0c0d37b7
Extend the "cannot convert from base class pointer to derived class
...
pointer" diagnostic to handle references, too.
llvm-svn: 107372
2010-07-01 02:14:45 +00:00
Daniel Dunbar
223749db6c
Driver: .dSYM suffix should be appended, not replace the existing suffix.
...
llvm-svn: 107369
2010-07-01 01:36:31 +00:00
Daniel Dunbar
bb7ac52e02
Driver/IRgen: Add support for -momit-leaf-frame-pointer.
...
llvm-svn: 107367
2010-07-01 01:31:45 +00:00
Ted Kremenek
78f8c3014d
Update checker build.
...
llvm-svn: 107364
2010-07-01 01:06:36 +00:00
Douglas Gregor
a343430e00
Add test case that I forgot to commit with r107354 (the implementation
...
of C++ DR481).
llvm-svn: 107359
2010-07-01 00:21:50 +00:00
Douglas Gregor
5a5fcd83c5
Be a bit more careful with undefined CXXRecordDecls. Fixes
...
rdar://problem/8124080 and PR7118.
llvm-svn: 107358
2010-07-01 00:21:21 +00:00
Daniel Dunbar
3de064dfdf
Revert "IRgen: Make sure any prolog instructions get debug info.", the lexical
...
scope hasn't been set up yet so this isn't valid. It was just a cleanup to the
IR, so I'm going to ignore it for now.
llvm-svn: 107356
2010-07-01 00:16:31 +00:00
Douglas Gregor
dc13ded606
Implement C++ DR481, which clarifies that the scope of template
...
parameters starts at the end of the template-parameter rather than at
the point where the template parameter name is encounted. For example,
given:
typedef unsigned char T;
template<typename T = T> struct X0 { };
The "T" in the default argument refers to the typedef of "unsigned
char", rather than referring to the newly-introduced template type
parameter 'T'.
Addresses <rdar://problem/8122812>.
llvm-svn: 107354
2010-07-01 00:00:45 +00:00