]> granicus.if.org Git - clang/log
clang
14 years agoLazily declare implicit copy constructors.
Douglas Gregor [Fri, 2 Jul 2010 23:41:54 +0000 (23:41 +0000)]
Lazily declare implicit copy constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRead/write CastExpr's CXXBaseSpecifierArray for PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 23:30:27 +0000 (23:30 +0000)]
Read/write CastExpr's CXXBaseSpecifierArray for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix broken PCH support for CXXDefaultArgExpr.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 23:30:15 +0000 (23:30 +0000)]
Fix broken PCH support for CXXDefaultArgExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107541 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce a new routine, LookupConstructors(), and use it for all
Douglas Gregor [Fri, 2 Jul 2010 23:12:18 +0000 (23:12 +0000)]
Introduce a new routine, LookupConstructors(), and use it for all
constructor-name lookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107536 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLazily declare copy-assignment operators.
Douglas Gregor [Fri, 2 Jul 2010 21:50:04 +0000 (21:50 +0000)]
Lazily declare copy-assignment operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake RecursiveASTVisitor traverse function parameter types in a function
Zhanyong Wan [Fri, 2 Jul 2010 21:02:30 +0000 (21:02 +0000)]
Make RecursiveASTVisitor traverse function parameter types in a function
prototype declaration.  Reviewed by chandlerc and csilvers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107511 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLazily declare the implicitly-declared destructor in a C++ class.
Douglas Gregor [Fri, 2 Jul 2010 20:37:36 +0000 (20:37 +0000)]
Lazily declare the implicitly-declared destructor in a C++ class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't visit implicitly defined functions (default constructors and the
Craig Silverstein [Fri, 2 Jul 2010 19:07:50 +0000 (19:07 +0000)]
Don't visit implicitly defined functions (default constructors and the
like).  Our goal with this visitor is to visit exactly what people type.

Reviewed by chandlerc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107497 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the "current scope" state from the Parser into Action. This
Douglas Gregor [Fri, 2 Jul 2010 17:43:08 +0000 (17:43 +0000)]
Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBy default, warn about commas at the end of an enumerator list in C++/C89.
Douglas Gregor [Fri, 2 Jul 2010 16:17:01 +0000 (16:17 +0000)]
By default, warn about commas at the end of an enumerator list in C++/C89.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 15:58:43 +0000 (15:58 +0000)]
Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.

<vector> header can be used correctly through PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107483 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide some test cases for C++ PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:48 +0000 (11:55 +0000)]
Provide some test cases for C++ PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107479 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisable Decl::CheckAccessDeclContext() temporarily.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:44 +0000 (11:55 +0000)]
Disable Decl::CheckAccessDeclContext() temporarily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107478 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix reading FunctionDecls from PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:40 +0000 (11:55 +0000)]
Fix reading FunctionDecls from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107477 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ClassTemplatePar...
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:37 +0000 (11:55 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107476 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFully read/write CXXRecordDecl for PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:32 +0000 (11:55 +0000)]
Fully read/write CXXRecordDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix reading of DependentNameType.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:24 +0000 (11:55 +0000)]
Fix reading of DependentNameType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107474 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow reading of InjectedClassNameType from PCH even when its decl is currently initi...
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:20 +0000 (11:55 +0000)]
Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107473 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix broken reading of member pointer from PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:15 +0000 (11:55 +0000)]
Fix broken reading of member pointer from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107472 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Allow a typedef type to be read from PCH even if its decl is currently initializing.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:11 +0000 (11:55 +0000)]
- Allow a typedef type to be read from PCH even if its decl is currently initializing.
- Fix creation of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107471 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix broken reading of "#lines" from PCH.
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:05 +0000 (11:55 +0000)]
Fix broken reading of "#lines" from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107470 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGenerally types expect an initialized TypeDecl; its safer and less complicated to...
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:55:01 +0000 (11:55 +0000)]
Generally types expect an initialized TypeDecl; its safer and less complicated to delay PCH reading the type of a TypeDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107469 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd some side-effect free Create methods for TypeDecl subclasses and use them for...
Argyrios Kyrtzidis [Fri, 2 Jul 2010 11:54:55 +0000 (11:54 +0000)]
Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCreate a ASTUnitTU class to interface ASTUnit to the Indexer.
Zhongxing Xu [Fri, 2 Jul 2010 11:52:15 +0000 (11:52 +0000)]
Create a ASTUnitTU class to interface ASTUnit to the Indexer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107467 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd -analyze-function option.
Zhongxing Xu [Fri, 2 Jul 2010 07:03:03 +0000 (07:03 +0000)]
add -analyze-function option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107463 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd -view-call-graph option to wpa.
Zhongxing Xu [Fri, 2 Jul 2010 06:58:30 +0000 (06:58 +0000)]
add -view-call-graph option to wpa.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107462 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange CallGraph::Prog to be a reference. idx::Program means to be a global object...
Zhongxing Xu [Fri, 2 Jul 2010 06:39:46 +0000 (06:39 +0000)]
Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107461 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle typedef function declarations correctly, such as
Craig Silverstein [Thu, 1 Jul 2010 23:46:26 +0000 (23:46 +0000)]
Handle typedef function declarations correctly, such as
       typedef int (*Myfunc)(int);
       Myfunc func;

Reviewed by chandlerc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107450 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a new routine Sema::LookupDestructor and make all destructor-lookup calls use...
Douglas Gregor [Thu, 1 Jul 2010 22:47:18 +0000 (22:47 +0000)]
Add a new routine Sema::LookupDestructor and make all destructor-lookup calls use that routine

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107444 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide exception specifications for implicitly-declared default constructors.
Douglas Gregor [Thu, 1 Jul 2010 22:31:05 +0000 (22:31 +0000)]
Provide exception specifications for implicitly-declared default constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the implicit declaration of a default constructor into a separate
Douglas Gregor [Thu, 1 Jul 2010 22:02:46 +0000 (22:02 +0000)]
Move the implicit declaration of a default constructor into a separate
routine; no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107434 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide exception specifications for implicitly-declared copy constructors.
Douglas Gregor [Thu, 1 Jul 2010 20:59:04 +0000 (20:59 +0000)]
Provide exception specifications for implicitly-declared copy constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107429 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Pass the target instance to the AsmParser constructor.
Daniel Dunbar [Thu, 1 Jul 2010 20:41:59 +0000 (20:41 +0000)]
MC: Pass the target instance to the AsmParser constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107427 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR 7475 by enhancing the static analyzer to also invalidate bindings for non...
Ted Kremenek [Thu, 1 Jul 2010 20:16:50 +0000 (20:16 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107423 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an ivar to SymbolReaper for the current statement, and then stop passing the...
Jordy Rose [Thu, 1 Jul 2010 20:09:55 +0000 (20:09 +0000)]
Add an ivar to SymbolReaper for the current statement, and then stop passing the current statement around everywhere. Preparation for symbolic extents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107422 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest implicit declaration of copy assignment operator with non-const argument
Douglas Gregor [Thu, 1 Jul 2010 20:08:52 +0000 (20:08 +0000)]
Test implicit declaration of copy assignment operator with non-const argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107421 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the implicit declaration of a constructor out to a separate
Douglas Gregor [Thu, 1 Jul 2010 19:09:28 +0000 (19:09 +0000)]
Move the implicit declaration of a constructor out to a separate
method. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107415 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach DeclareImplicitCopyConstructor how to cope with virtual bases
Douglas Gregor [Thu, 1 Jul 2010 18:27:03 +0000 (18:27 +0000)]
Teach DeclareImplicitCopyConstructor how to cope with virtual bases
and multi-dimensional array fields. Fixes several bugs found by
inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107411 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove declaration of a class's implicit copy constructor into a
Douglas Gregor [Thu, 1 Jul 2010 17:57:27 +0000 (17:57 +0000)]
Move declaration of a class's implicit copy constructor into a
separate function. Aside from making the loops infinitely faster, no
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107407 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide an exception-specification for an implicitly-declared
Douglas Gregor [Thu, 1 Jul 2010 17:48:08 +0000 (17:48 +0000)]
Provide an exception-specification for an implicitly-declared
copy-assignment operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the implicit declaration of a class's copy-assignment operator
Douglas Gregor [Thu, 1 Jul 2010 16:36:15 +0000 (16:36 +0000)]
Move the implicit declaration of a class's copy-assignment operator
into a separate routine. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107402 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake loops infinitely faster. No functionality change.
Douglas Gregor [Thu, 1 Jul 2010 15:29:53 +0000 (15:29 +0000)]
Make loops infinitely faster. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107398 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd Sema test case for exception-specifiers implicitly added to destructors.
Douglas Gregor [Thu, 1 Jul 2010 14:21:35 +0000 (14:21 +0000)]
Add Sema test case for exception-specifiers implicitly added to destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107395 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unnecessary ASTContext parameter from
Douglas Gregor [Thu, 1 Jul 2010 14:13:13 +0000 (14:13 +0000)]
Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExplodedGraph never uses ASTContext, remove it.
Zhongxing Xu [Thu, 1 Jul 2010 07:10:59 +0000 (07:10 +0000)]
ExplodedGraph never uses ASTContext, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107388 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix rdar://8147692 - yet another crash due to my abi work.
Chris Lattner [Thu, 1 Jul 2010 06:20:47 +0000 (06:20 +0000)]
fix rdar://8147692 - yet another crash due to my abi work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107387 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReinstate fix for PR7526, which was failing because, now that we
Douglas Gregor [Thu, 1 Jul 2010 05:10:53 +0000 (05:10 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107385 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate diagnostic on compatibility page to reflect reality
Douglas Gregor [Thu, 1 Jul 2010 03:50:01 +0000 (03:50 +0000)]
Update diagnostic on compatibility page to reflect reality

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107382 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen performing copy initialization via user-defined conversions,
Douglas Gregor [Thu, 1 Jul 2010 03:43:00 +0000 (03:43 +0000)]
When performing copy initialization via user-defined conversions,
don't allow two user-defined conversions. Fixes PR6595 (again).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107379 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r107374, which broke bootstrap.
Douglas Gregor [Thu, 1 Jul 2010 03:28:42 +0000 (03:28 +0000)]
Revert r107374, which broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107378 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen building the type of a destructor, make sure to keep the
Douglas Gregor [Thu, 1 Jul 2010 02:33:15 +0000 (02:33 +0000)]
When building the type of a destructor, make sure to keep the
exception specification. Fixes PR7526.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107374 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtend the "cannot convert from base class pointer to derived class
Douglas Gregor [Thu, 1 Jul 2010 02:14:45 +0000 (02:14 +0000)]
Extend the "cannot convert from base class pointer to derived class
pointer" diagnostic to handle references, too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107372 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: .dSYM suffix should be appended, not replace the existing suffix.
Daniel Dunbar [Thu, 1 Jul 2010 01:36:31 +0000 (01:36 +0000)]
Driver: .dSYM suffix should be appended, not replace the existing suffix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107369 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver/IRgen: Add support for -momit-leaf-frame-pointer.
Daniel Dunbar [Thu, 1 Jul 2010 01:31:45 +0000 (01:31 +0000)]
Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate checker build.
Ted Kremenek [Thu, 1 Jul 2010 01:06:36 +0000 (01:06 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107364 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd test case that I forgot to commit with r107354 (the implementation
Douglas Gregor [Thu, 1 Jul 2010 00:21:50 +0000 (00:21 +0000)]
Add test case that I forgot to commit with r107354 (the implementation
of C++ DR481).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107359 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBe a bit more careful with undefined CXXRecordDecls. Fixes
Douglas Gregor [Thu, 1 Jul 2010 00:21:21 +0000 (00:21 +0000)]
Be a bit more careful with undefined CXXRecordDecls. Fixes
rdar://problem/8124080 and PR7118.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107358 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert "IRgen: Make sure any prolog instructions get debug info.", the lexical
Daniel Dunbar [Thu, 1 Jul 2010 00:16:31 +0000 (00:16 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107356 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement C++ DR481, which clarifies that the scope of template
Douglas Gregor [Thu, 1 Jul 2010 00:00:45 +0000 (00:00 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver/Darwin: Add one -L for the DarwinClang toolchain to point into the gcc
Daniel Dunbar [Wed, 30 Jun 2010 23:56:13 +0000 (23:56 +0000)]
Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gcc
library directory, as we still rely on a few libraries that are hiding there (in
particular libstdc++.dylib).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107353 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove diagnostic when we fail to pick an overload because it would
Douglas Gregor [Wed, 30 Jun 2010 23:01:39 +0000 (23:01 +0000)]
Improve diagnostic when we fail to pick an overload because it would
require a base-to-derived pointer conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107349 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix vector literal/cast confusion - bug 6895.
John Thompson [Wed, 30 Jun 2010 22:55:51 +0000 (22:55 +0000)]
Fix vector literal/cast confusion - bug 6895.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107347 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWording tweak from Dan.
Douglas Gregor [Wed, 30 Jun 2010 22:43:03 +0000 (22:43 +0000)]
Wording tweak from Dan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107344 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWording tweak from Dan.
Douglas Gregor [Wed, 30 Jun 2010 22:38:37 +0000 (22:38 +0000)]
Wording tweak from Dan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107343 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotypo.
Benjamin Kramer [Wed, 30 Jun 2010 22:29:56 +0000 (22:29 +0000)]
typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107342 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRuntime: Always build compiler-rt using the Clang we just built, instead of the
Daniel Dunbar [Wed, 30 Jun 2010 22:10:41 +0000 (22:10 +0000)]
Runtime: Always build compiler-rt using the Clang we just built, instead of the
system CC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107328 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove lib/Runtime to runtime/, and build after everything else.
Daniel Dunbar [Wed, 30 Jun 2010 22:10:38 +0000 (22:10 +0000)]
Move lib/Runtime to runtime/, and build after everything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107327 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove redundant and incomplete bits from the users manual w.r.t. language conformance
Douglas Gregor [Wed, 30 Jun 2010 22:04:24 +0000 (22:04 +0000)]
Remove redundant and incomplete bits from the users manual w.r.t. language conformance

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107326 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNew language-compatibility page, including language-compatibility information for...
Douglas Gregor [Wed, 30 Jun 2010 22:01:08 +0000 (22:01 +0000)]
New language-compatibility page, including language-compatibility information for the various language dialects Clang supports in a single, easy-to-find page

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107325 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolibclang: When invoking external clang process to get code completion results,
Daniel Dunbar [Wed, 30 Jun 2010 21:40:01 +0000 (21:40 +0000)]
libclang: When invoking external clang process to get code completion results,
pass -ccc-clang-cxx to force C++ support (even if the binary was built without
it).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107324 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Fix debug info regression in r106970; when we eliminate the return value
Daniel Dunbar [Wed, 30 Jun 2010 21:27:58 +0000 (21:27 +0000)]
IRgen: Fix debug info regression in r106970; when we eliminate the return value
store make sure to move the debug metadata from the store (which is actual
'return' statement location) to the return instruction (which otherwise would
have the function end location as its debug info).
 - Tested by gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107322 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRgen: Make sure any prolog instructions get debug info.
Daniel Dunbar [Wed, 30 Jun 2010 21:27:56 +0000 (21:27 +0000)]
IRgen: Make sure any prolog instructions get debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107320 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRewriter: Use the appropriate printing context instead of the default
Daniel Dunbar [Wed, 30 Jun 2010 19:16:53 +0000 (19:16 +0000)]
Rewriter: Use the appropriate printing context instead of the default
constructed one -- this is necessary to ensure types get printed correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107312 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAST: Propogate printing policy to types in a bunch more places.
Daniel Dunbar [Wed, 30 Jun 2010 19:16:48 +0000 (19:16 +0000)]
AST: Propogate printing policy to types in a bunch more places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107311 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReapply:
Chris Lattner [Wed, 30 Jun 2010 19:14:05 +0000 (19:14 +0000)]
Reapply:
r107173, "fix PR7519: after thrashing around and remembering how all this stuff"
r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead"

This includes a fix to make ConvertTypeForMem handle the "recursive" case, and call
it as such when lowering function types which have an indirect result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107310 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse isFunctionOrMethod for vars declared locallly
Fariborz Jahanian [Wed, 30 Jun 2010 18:57:21 +0000 (18:57 +0000)]
Use isFunctionOrMethod for vars declared locallly
in method/blocks to decide not to mangle them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107309 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a return to silence a warning. Alternately a default: return false
Eric Christopher [Wed, 30 Jun 2010 18:36:32 +0000 (18:36 +0000)]
Add a return to silence a warning.  Alternately a default: return false
would work.

Sebastian: figure out which one you want :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107305 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix RecursiveASTVisitor to traverse the ctor initializer list before
Zhanyong Wan [Wed, 30 Jun 2010 18:34:52 +0000 (18:34 +0000)]
Fix RecursiveASTVisitor to traverse the ctor initializer list before
traversing the ctor body when traversing a CXXConstructorDecl.
Reviewed by chandlerc and csilvers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107304 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoextern variable declared locally to objective-c++ method
Fariborz Jahanian [Wed, 30 Jun 2010 18:27:47 +0000 (18:27 +0000)]
extern variable declared locally to objective-c++ method
should not be mangled either. Fixes radar 8016412.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107303 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake both old and new versions of reference binding use the new classification functi...
Sebastian Redl [Wed, 30 Jun 2010 18:13:39 +0000 (18:13 +0000)]
Make both old and new versions of reference binding use the new classification functions, and updated them for N3092.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107301 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClean up the diagnostic complaining about the element type of a vector
Douglas Gregor [Wed, 30 Jun 2010 17:30:41 +0000 (17:30 +0000)]
Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107299 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoComplain about the application of a transparent_union attribute to a
Douglas Gregor [Wed, 30 Jun 2010 17:24:13 +0000 (17:24 +0000)]
Complain about the application of a transparent_union attribute to a
union whose first field has integral vector type. Also, clean up this
diagnostic a bit. Thanks to Eli for spotting this change in semantics
last week.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107296 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreduce nesting.
Chris Lattner [Wed, 30 Jun 2010 16:58:07 +0000 (16:58 +0000)]
reduce nesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107292 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd header file needed to compile with g++-4.6, which has undergone some more
Duncan Sands [Wed, 30 Jun 2010 16:54:05 +0000 (16:54 +0000)]
Add header file needed to compile with g++-4.6, which has undergone some more
header trimming (needed for std::uninitialized_copy).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107291 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a comment typo.
Sebastian Redl [Wed, 30 Jun 2010 16:41:54 +0000 (16:41 +0000)]
Fix a comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107290 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNasty rewriter bug which turns out to have an easy fix in
Fariborz Jahanian [Wed, 30 Jun 2010 16:31:08 +0000 (16:31 +0000)]
Nasty rewriter bug which turns out to have an easy fix in
rewriting a c-style cast expression in statement printer.
Fixes radar 8143056.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107289 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix rdar://8139785 "implement warning on dead expression in comma operator"
Argyrios Kyrtzidis [Wed, 30 Jun 2010 10:53:14 +0000 (10:53 +0000)]
Fix rdar://8139785 "implement warning on dead expression in comma operator"

As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g:

x || test_logical_foo1();

emitted a bogus "expression result unused" for 'x'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.
Argyrios Kyrtzidis [Wed, 30 Jun 2010 08:49:30 +0000 (08:49 +0000)]
Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107268 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport DependentSizedArrayType for PCH.
Argyrios Kyrtzidis [Wed, 30 Jun 2010 08:49:25 +0000 (08:49 +0000)]
Support DependentSizedArrayType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107267 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport ParenListExpr for PCH.
Argyrios Kyrtzidis [Wed, 30 Jun 2010 08:49:18 +0000 (08:49 +0000)]
Support ParenListExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the constructor explicit.
Argyrios Kyrtzidis [Wed, 30 Jun 2010 08:49:12 +0000 (08:49 +0000)]
Make the constructor explicit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107265 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMangle arrays in the Microsoft C++ Mangler. It's not quite finished (it
Charles Davis [Wed, 30 Jun 2010 08:09:57 +0000 (08:09 +0000)]
Mangle arrays in the Microsoft C++ Mangler. It's not quite finished (it
doesn't mangle array parameters right), but I think that should be fixed
in Sema (Doug, John, what do you think?).

Also, stub out the remaining mangleType() routines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107264 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCorrectly implement the CheckerVisit optimization introduced in r106884, but this...
Ted Kremenek [Wed, 30 Jun 2010 07:28:52 +0000 (07:28 +0000)]
Correctly implement the CheckerVisit optimization introduced in r106884, but this time actually used the cached checker list when calling back to Checker visit methods.  This reduces the analysis time for sqlite3.c by 8%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107259 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHeaders: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't always
Daniel Dunbar [Wed, 30 Jun 2010 06:30:56 +0000 (06:30 +0000)]
Headers: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't always
'long'. The practical upshot is so that the uint64_t we define in our stdint.h
ends up being compatible with that defined by gcc (at least on Darwin), which
otherwise could lead to type incompatibilities with other system headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHeaders: Change [u]intmax_t to be defined in terms of __[U]INTMAX_TYPE__, instead...
Daniel Dunbar [Wed, 30 Jun 2010 06:30:50 +0000 (06:30 +0000)]
Headers: Change [u]intmax_t to be defined in terms of __[U]INTMAX_TYPE__, instead of intN_t.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReapply r107235, this time with both my typo fixed, and a logical bug fixed.
Chandler Carruth [Wed, 30 Jun 2010 02:59:29 +0000 (02:59 +0000)]
Reapply r107235, this time with both my typo fixed, and a logical bug fixed.
Previously we relied on the presence of a member which needs no initialization
to prevent us from creating an additional initialization of the outer anonymous
union field. We have already correctly marked that field as initialized by the
member of the union (repeatedly due to the original bug this patch fixes) so we
simply need to bail out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107242 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r107235, it had a silly typo in it, and fixing the typo breaks something
Chandler Carruth [Wed, 30 Jun 2010 02:06:16 +0000 (02:06 +0000)]
Revert r107235, it had a silly typo in it, and fixing the typo breaks something
else. Get the build bots happy while I debug. Very sorry for the delay fixing
this...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107239 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPointers casted as integers still count as locations to SimpleSValuator, so don't...
Jordy Rose [Wed, 30 Jun 2010 01:35:20 +0000 (01:35 +0000)]
Pointers casted as integers still count as locations to SimpleSValuator, so don't crash if we do a funny thing like ((int)ptr)&1. Fixes PR7527.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107236 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR7402: We were creating implicit member initializers for every field in an
Chandler Carruth [Wed, 30 Jun 2010 00:54:29 +0000 (00:54 +0000)]
Fix PR7402: We were creating implicit member initializers for every field in an
anonymous union under the presumption that they didn't do anything. While this
is true, our checks for redundant initialization of an anonymous union still
fire when these overlap with explicit user initialization. A cleaner approach
is to avoid initializing multiple members of a union altogether, but this still
is in a rather fuzzy are especially when C++0x allows non-POD types into
unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107235 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r107173, "fix PR7519: after thrashing around and remembering how all this...
Daniel Dunbar [Wed, 30 Jun 2010 00:22:35 +0000 (00:22 +0000)]
Revert r107173, "fix PR7519: after thrashing around and remembering how all this stuff", it broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107232 91177308-0d34-0410-b5e6-96231b3b80d8