]> granicus.if.org Git - clang/log
clang
15 years agoUpdate for LLVMContext+Module change.
Owen Anderson [Wed, 1 Jul 2009 17:00:06 +0000 (17:00 +0000)]
Update for LLVMContext+Module change.

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

15 years agoTwo fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.
Douglas Gregor [Wed, 1 Jul 2009 15:12:53 +0000 (15:12 +0000)]
Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.

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

15 years agoRework Sema::CheckConditionalOperands(). No functionality change.
Steve Naroff [Wed, 1 Jul 2009 14:36:47 +0000 (14:36 +0000)]
Rework Sema::CheckConditionalOperands(). No functionality change.

This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups).

The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause).

Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming).

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

15 years agoImplement Eli's feedback for vecto constant expressions;
Nate Begeman [Wed, 1 Jul 2009 07:50:47 +0000 (07:50 +0000)]
Implement Eli's feedback for vecto constant expressions;

For ExtVectorType, initializer is splatted to all elements.
For VectorType, initializer is bitcast to vector type.

Verified that for VectorType, output is identical to gcc.

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

15 years agouse new and simplified LLVM APIs. Patch by Jay Foad!
Chris Lattner [Wed, 1 Jul 2009 04:13:52 +0000 (04:13 +0000)]
use new and simplified LLVM APIs.  Patch by Jay Foad!

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

15 years agoFix for PR4192: fix the definition of int64_t on x86_64 Linux.
Eli Friedman [Wed, 1 Jul 2009 03:36:11 +0000 (03:36 +0000)]
Fix for PR4192: fix the definition of int64_t on x86_64 Linux.

Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:

#include <stdint.h>

int64_t x; long x;

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

15 years agoadd fixme.
Zhongxing Xu [Wed, 1 Jul 2009 02:12:57 +0000 (02:12 +0000)]
add fixme.

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

15 years agoCope with explicitly-specified function template arguments when there
Douglas Gregor [Wed, 1 Jul 2009 00:28:38 +0000 (00:28 +0000)]
Cope with explicitly-specified function template arguments when there
are fewer template arguments than there are template parameters for
that function.

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

15 years agoWhen explicit template arguments are provided for a function call,
Douglas Gregor [Tue, 30 Jun 2009 23:57:56 +0000 (23:57 +0000)]
When explicit template arguments are provided for a function call,
substitute those template arguments into the function parameter types
prior to template argument deduction. There's still a bit of work to
do to make this work properly when only some of the template arguments
are specified.

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

15 years agoPatch to support optional nested-name-specifier in in ctor-initializer
Fariborz Jahanian [Tue, 30 Jun 2009 23:26:25 +0000 (23:26 +0000)]
Patch to support optional nested-name-specifier in in ctor-initializer
list.

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

15 years agoPreliminary parsing and ASTs for template-ids that refer to function
Douglas Gregor [Tue, 30 Jun 2009 22:34:41 +0000 (22:34 +0000)]
Preliminary parsing and ASTs for template-ids that refer to function
templates, such as make<int&>. These template-ids are only barely
functional for function calls; much more to come.

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

15 years agoUpdate old CastRegion logic to not assume that ElementRegion's super region is a
Ted Kremenek [Tue, 30 Jun 2009 22:31:23 +0000 (22:31 +0000)]
Update old CastRegion logic to not assume that ElementRegion's super region is a
TypedRegion. While we plan on removing this code at some point, it serves as a
good reference implementation for use with BasicStore until we are sure the new
CastRegion logic (in RegionStore.cpp) is correct.

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

15 years agoFix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ParseDeclarationSpecifi...
Ted Kremenek [Tue, 30 Jun 2009 22:19:00 +0000 (22:19 +0000)]
Fix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ParseDeclarationSpecifiers ... from ParseObjCTypeName)

Another case where we should use SmallVector::data() instead of taking the
address of element 0 of a SmallVector when the SmallVector has no elements.

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

15 years agoDiagnose multiple initialization of anonymous union
Fariborz Jahanian [Tue, 30 Jun 2009 21:52:59 +0000 (21:52 +0000)]
Diagnose multiple initialization of anonymous union
fields in the ctor-initializer list.

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

15 years agoCombine two conditional branches into one. No functionality change.
Ted Kremenek [Tue, 30 Jun 2009 20:24:11 +0000 (20:24 +0000)]
Combine two conditional branches into one.  No functionality change.

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

15 years agoMore diagnostics related to initialization of direct bases
Fariborz Jahanian [Tue, 30 Jun 2009 17:34:52 +0000 (17:34 +0000)]
More diagnostics related to initialization of direct bases
in ctor-initializer list.

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

15 years agoWhen recursively instantiating function templates, keep track of the
Douglas Gregor [Tue, 30 Jun 2009 17:20:14 +0000 (17:20 +0000)]
When recursively instantiating function templates, keep track of the
instantiation stack so that we provide a full instantiation
backtrace. Previously, we performed all of the instantiations implied
by the recursion, but each looked like a "top-level" instantiation.

The included test case tests the previous fix for the instantiation of
DeclRefExprs. Note that the "instantiated from" diagnostics still
don't tell us which template arguments we're instantiating with.

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

15 years agoReapply r74532, and inherit from OSTargetInfo instead of from Target.
Torok Edwin [Tue, 30 Jun 2009 17:10:35 +0000 (17:10 +0000)]
Reapply r74532, and inherit from OSTargetInfo instead of from Target.
'make test' passes now.

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

15 years agoRevert 74532 till I figure out why it breaks a bunch of tests.
Torok Edwin [Tue, 30 Jun 2009 17:00:25 +0000 (17:00 +0000)]
Revert 74532 till I figure out why it breaks a bunch of tests.

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

15 years agoUpdate C++ section data and directory structure to reflect N2914
Douglas Gregor [Tue, 30 Jun 2009 16:45:27 +0000 (16:45 +0000)]
Update C++ section data and directory structure to reflect N2914

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

15 years agoCompute ending of iterator in for-loop once.
Fariborz Jahanian [Tue, 30 Jun 2009 16:36:53 +0000 (16:36 +0000)]
Compute ending of iterator in for-loop once.

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

15 years agoUse templates instead of creating a new class for each OS/Target combination.
Torok Edwin [Tue, 30 Jun 2009 16:30:17 +0000 (16:30 +0000)]
Use templates instead of creating a new class for each OS/Target combination.
This unifies all the targets supported by an OS into a template.
It also cleans up the differences between the darwin targets.
Also __LP64__ wasn't needed for *BSD, since x86-64 target defines it anyway.

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

15 years agoRefactor ActOnDeclarationNameExpr into a "parsing action" part and a
Douglas Gregor [Tue, 30 Jun 2009 15:47:41 +0000 (15:47 +0000)]
Refactor ActOnDeclarationNameExpr into a "parsing action" part and a
"semantic analysis" part. Use the "semantic analysis" part when
performing template instantiation on a DeclRefExpr, rather than an ad
hoc list of rules to construct DeclRefExprs from the instantiation.

A test case for this change will come in with a large commit, which
illustrates what I was actually trying to work on.

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

15 years agoInstead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.
Zhongxing Xu [Tue, 30 Jun 2009 13:00:53 +0000 (13:00 +0000)]
Instead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.
Mark the super region of the binding of block level expr in the Environment
as live.

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

15 years agoWhen retrieving element region, if its super region has binding, return
Zhongxing Xu [Tue, 30 Jun 2009 12:32:59 +0000 (12:32 +0000)]
When retrieving element region, if its super region has binding, return
unknown for it.

Mark the super region of a live region as live, if the live region is pointed
to by a live pointer variable.

These fixes xfail_regionstore_wine_crash.c.

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

15 years agoBlock level expr should be visited. Otherwise variables in init expr of
Zhongxing Xu [Tue, 30 Jun 2009 12:11:58 +0000 (12:11 +0000)]
Block level expr should be visited. Otherwise variables in init expr of
DeclStmt would be dead before the DeclStmt.
For example:
int x = 0;
int y = x;
'x' would be dead before 'int y = x'.

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

15 years agoadd utility method.
Zhongxing Xu [Tue, 30 Jun 2009 11:52:40 +0000 (11:52 +0000)]
add utility method.

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

15 years agoadd utility methods.
Zhongxing Xu [Tue, 30 Jun 2009 11:50:39 +0000 (11:50 +0000)]
add utility methods.

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

15 years agoremove dead code.
Zhongxing Xu [Tue, 30 Jun 2009 07:50:26 +0000 (07:50 +0000)]
remove dead code.

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

15 years agoWe do not require the super region of element region be typed. So do not
Zhongxing Xu [Tue, 30 Jun 2009 07:41:27 +0000 (07:41 +0000)]
We do not require the super region of element region be typed. So do not
create TypedViewRegion for it.

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

15 years agoImplement PR4175, catching some questionable comparisons. Patch by
Chris Lattner [Tue, 30 Jun 2009 06:24:05 +0000 (06:24 +0000)]
Implement PR4175, catching some questionable comparisons.  Patch by
David Majnemer!

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

15 years agoDe-ASTContext-ify DeclContext.
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:36:12 +0000 (02:36 +0000)]
De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

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

15 years agoIntroduce DeclContext::getParentASTContext().
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:35:38 +0000 (02:35 +0000)]
Introduce DeclContext::getParentASTContext().

It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext.

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

15 years agoRemove the ASTContext parameter from the getBody() methods of Decl and subclasses.
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:35:26 +0000 (02:35 +0000)]
Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

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

15 years agoRemove the ASTContext parameter from the printing related methods of Decl.
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:35:04 +0000 (02:35 +0000)]
Remove the ASTContext parameter from the printing related methods of Decl.

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

15 years agoDecl::getTranslationUnitDecl() should return itself when the Decl is a TranslationUni...
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:34:53 +0000 (02:34 +0000)]
Decl::getTranslationUnitDecl() should return itself when the Decl is a TranslationUnitDecl.

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

15 years agoRemove the ASTContext parameter from the attribute-related methods of Decl.
Argyrios Kyrtzidis [Tue, 30 Jun 2009 02:34:44 +0000 (02:34 +0000)]
Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

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

15 years agoKey decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.
Chris Lattner [Tue, 30 Jun 2009 01:26:17 +0000 (01:26 +0000)]
Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.

This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control.  There are many fixme's, but I think things are slightly
better than they were before.

One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.

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

15 years agoTake care of Chris's comments.
Fariborz Jahanian [Tue, 30 Jun 2009 00:17:27 +0000 (00:17 +0000)]
Take care of Chris's comments.

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

15 years agoMake an error message more clear.
Anders Carlsson [Tue, 30 Jun 2009 00:06:57 +0000 (00:06 +0000)]
Make an error message more clear.

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

15 years agoA more detailed diagnosis of ill-formed ctor-initializer
Fariborz Jahanian [Tue, 30 Jun 2009 00:02:17 +0000 (00:02 +0000)]
A more detailed diagnosis of ill-formed ctor-initializer
list.

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

15 years agoUse true/false instead of 1/0.
Daniel Dunbar [Mon, 29 Jun 2009 23:58:47 +0000 (23:58 +0000)]
Use true/false instead of 1/0.

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

15 years agoImprovements to decltype. We now don't crash anymore when the expr is an overloaded...
Anders Carlsson [Mon, 29 Jun 2009 22:58:55 +0000 (22:58 +0000)]
Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl.

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

15 years agoDon't define __KPRINTF_ATTRIBUTE__ unconditionally on OpenBSD.
Daniel Dunbar [Mon, 29 Jun 2009 22:45:37 +0000 (22:45 +0000)]
Don't define __KPRINTF_ATTRIBUTE__ unconditionally on OpenBSD.

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

15 years agoImprove code generation for function template specializations:
Douglas Gregor [Mon, 29 Jun 2009 22:39:32 +0000 (22:39 +0000)]
Improve code generation for function template specializations:
  - Track implicit instantiations vs. the not-yet-supported explicit
  specializations
  - Give implicit instantiations of function templates (and member
  functions of class templates) linkonce_odr linkage.
  - Improve name mangling for function template specializations,
  including the template arguments of the instantiation and the return
  type of the function.

Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.

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

15 years agoDiagnose multiple initialzation of data-member/base
Fariborz Jahanian [Mon, 29 Jun 2009 22:33:26 +0000 (22:33 +0000)]
Diagnose multiple initialzation of data-member/base
in the ctor-initializer list. More to come.

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

15 years agoRemove some dead code
Anders Carlsson [Mon, 29 Jun 2009 21:39:57 +0000 (21:39 +0000)]
Remove some dead code

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

15 years agoKeep track of function template specializations, to eliminate
Douglas Gregor [Mon, 29 Jun 2009 20:59:39 +0000 (20:59 +0000)]
Keep track of function template specializations, to eliminate
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.

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

15 years agoOpenBSD support.
Daniel Dunbar [Mon, 29 Jun 2009 20:52:51 +0000 (20:52 +0000)]
OpenBSD support.
 - Patch by Jonathan Gray!

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

15 years ago-Keep a reference to the ASTContext inside the TranslationUnitDecl.
Argyrios Kyrtzidis [Mon, 29 Jun 2009 17:38:40 +0000 (17:38 +0000)]
-Keep a reference to the ASTContext inside the TranslationUnitDecl.
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.

The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.

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

15 years agoRemove redundant leftover code.
Argyrios Kyrtzidis [Mon, 29 Jun 2009 17:38:09 +0000 (17:38 +0000)]
Remove redundant leftover code.

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

15 years agoFix the FloatingLiteral API to take the isexact flag by value instead of
Chris Lattner [Mon, 29 Jun 2009 17:34:55 +0000 (17:34 +0000)]
Fix the FloatingLiteral API to take the isexact flag by value instead of
by pointer.

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

15 years agoMove FunctionDecl::TemplateSpecializationInfo out into its own class,
Douglas Gregor [Mon, 29 Jun 2009 17:30:29 +0000 (17:30 +0000)]
Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.

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

15 years agoRemove ASTContext::getObjCQualifiedIdType().
Steve Naroff [Mon, 29 Jun 2009 16:22:52 +0000 (16:22 +0000)]
Remove ASTContext::getObjCQualifiedIdType().
Convert clients to use ASTContext::getObjCObjectPointerType().

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

15 years agoInvalidate the alloca region by setting its default value to conjured symbol.
Zhongxing Xu [Mon, 29 Jun 2009 06:43:40 +0000 (06:43 +0000)]
Invalidate the alloca region by setting its default value to conjured symbol.

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

15 years agoThe default answer for isBoundable() should be false.
Zhongxing Xu [Mon, 29 Jun 2009 05:44:14 +0000 (05:44 +0000)]
The default answer for isBoundable() should be false.

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

15 years agoMake the StackProtector bitfield use enums instead of obscure numbers.
Bill Wendling [Sun, 28 Jun 2009 23:01:01 +0000 (23:01 +0000)]
Make the StackProtector bitfield use enums instead of obscure numbers.

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

15 years agoMove the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470.
Anders Carlsson [Sun, 28 Jun 2009 19:55:58 +0000 (19:55 +0000)]
Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470.

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

15 years agomake these tests pass with the stack canary stuff even on targets where they default...
Chris Lattner [Sun, 28 Jun 2009 19:49:49 +0000 (19:49 +0000)]
make these tests pass with the stack canary stuff even on targets where they default to on.

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

15 years agoFix incorrect AST's being produced, noticed by Eli.
Nate Begeman [Sun, 28 Jun 2009 19:12:57 +0000 (19:12 +0000)]
Fix incorrect AST's being produced, noticed by Eli.
The issue this was working around is no longer present in TOT clang.

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

15 years agoNow this test case passes.
Zhongxing Xu [Sun, 28 Jun 2009 14:25:10 +0000 (14:25 +0000)]
Now this test case passes.

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

15 years agoAdjust retrieve handler priority. If a field is of array type, it should be
Zhongxing Xu [Sun, 28 Jun 2009 14:16:39 +0000 (14:16 +0000)]
Adjust retrieve handler priority. If a field is of array type, it should be
handled by RetrieveArray().

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

15 years agoInvalidate a field of struct type by setting its default value to conjured
Zhongxing Xu [Sun, 28 Jun 2009 13:59:24 +0000 (13:59 +0000)]
Invalidate a field of struct type by setting its default value to conjured
symbol.

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

15 years agoDo not crash on binding concrete integer location.
Zhongxing Xu [Sun, 28 Jun 2009 10:16:11 +0000 (10:16 +0000)]
Do not crash on binding concrete integer location.

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

15 years agoSimplify some code. As in region store, we always expect the location is a
Zhongxing Xu [Sun, 28 Jun 2009 09:26:15 +0000 (09:26 +0000)]
Simplify some code. As in region store, we always expect the location is a
memregion.

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

15 years agoAdd stack protector support to clang. This generates the 'ssp' and 'sspreq'
Bill Wendling [Sun, 28 Jun 2009 07:36:13 +0000 (07:36 +0000)]
Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.

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

15 years agoOpenCL 1.0 support:
Nate Begeman [Sun, 28 Jun 2009 02:36:38 +0000 (02:36 +0000)]
OpenCL 1.0 support:
Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations.
Fix problem Eli noticed where we were allowing pointer types to be splatted to
vector elements.

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

15 years agoImplement feedback from Eli re: the purpose of lax vector conversions
Nate Begeman [Sat, 27 Jun 2009 22:05:55 +0000 (22:05 +0000)]
Implement feedback from Eli re: the purpose of lax vector conversions

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

15 years agoImprove support for overloaded operator templates.
Douglas Gregor [Sat, 27 Jun 2009 21:05:07 +0000 (21:05 +0000)]
Improve support for overloaded operator templates.

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

15 years agoFix the parser error hanlding for __builtin_offsetof to actually print
Eli Friedman [Sat, 27 Jun 2009 20:38:33 +0000 (20:38 +0000)]
Fix the parser error hanlding for __builtin_offsetof to actually print
out an error for a malformed __builtin_offsetof.

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

15 years agoAdd a Last Updated field to the C++ status page
Douglas Gregor [Sat, 27 Jun 2009 19:33:58 +0000 (19:33 +0000)]
Add a Last Updated field to the C++ status page

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

15 years agoRenamed MarcDestructorReferenced -> MarkDestructorReferenced
Fariborz Jahanian [Sat, 27 Jun 2009 15:05:11 +0000 (15:05 +0000)]
Renamed MarcDestructorReferenced -> MarkDestructorReferenced

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

15 years agoFix screwup with my previous patch which broke tests. (The patch is
Eli Friedman [Sat, 27 Jun 2009 08:17:02 +0000 (08:17 +0000)]
Fix screwup with my previous patch which broke tests.  (The patch is
making sure we return true when annotating a function template with
explicit template arguments, but not when we don't annotate anything.)

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

15 years agoFix a crash with constructs like x<false>() in C++. No testcase because
Eli Friedman [Sat, 27 Jun 2009 06:24:06 +0000 (06:24 +0000)]
Fix a crash with constructs like x<false>() in C++.  No testcase because
it doesn't actually work yet; we just error out a bit more gracefully.

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

15 years agoFix a bogus error overloading an operator where the only class
Eli Friedman [Sat, 27 Jun 2009 05:59:59 +0000 (05:59 +0000)]
Fix a bogus error overloading an operator where the only class
parameter has a dependent type.

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

15 years agoImplement support for the format_arg attribute. Fixes PR4442.
Anders Carlsson [Sat, 27 Jun 2009 04:05:33 +0000 (04:05 +0000)]
Implement support for the format_arg attribute. Fixes PR4442.

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

15 years agoMake it possible for using decls to point to operators. Fixes PR4441.
Anders Carlsson [Sat, 27 Jun 2009 00:27:47 +0000 (00:27 +0000)]
Make it possible for using decls to point to operators. Fixes PR4441.

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

15 years agoRemove the last 'GetXXX' methods from GRStateManager.
Ted Kremenek [Sat, 27 Jun 2009 00:24:54 +0000 (00:24 +0000)]
Remove the last 'GetXXX' methods from GRStateManager.

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

15 years agoMake a note of improvements to function templates
Douglas Gregor [Sat, 27 Jun 2009 00:08:54 +0000 (00:08 +0000)]
Make a note of improvements to function templates

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

15 years agoPatch to mark destructors when they are used.
Fariborz Jahanian [Fri, 26 Jun 2009 23:49:16 +0000 (23:49 +0000)]
Patch to mark destructors when they are used.

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

15 years agoFix test.
Anders Carlsson [Fri, 26 Jun 2009 23:44:14 +0000 (23:44 +0000)]
Fix test.

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

15 years agoSet the rest of the flags we need to perform template argument
Douglas Gregor [Fri, 26 Jun 2009 23:27:24 +0000 (23:27 +0000)]
Set the rest of the flags we need to perform template argument
deduction using a base class of the argument type. No actual
functionality change; this is just a hook.

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

15 years agoDuring template argument deduction from a function call, allow
Douglas Gregor [Fri, 26 Jun 2009 23:10:12 +0000 (23:10 +0000)]
During template argument deduction from a function call, allow
deduction from pointer and pointer-to-member types to work even in the
presence of a qualification conversion (C++ [temp.deduct.type]p3
bullet 2).

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

15 years agoMore auto work.
Anders Carlsson [Fri, 26 Jun 2009 22:18:59 +0000 (22:18 +0000)]
More auto work.

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

15 years agoFix test.
Anders Carlsson [Fri, 26 Jun 2009 21:54:43 +0000 (21:54 +0000)]
Fix test.

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

15 years agoA little template argument deduction test uncovered an "oops". As part
Douglas Gregor [Fri, 26 Jun 2009 21:40:05 +0000 (21:40 +0000)]
A little template argument deduction test uncovered an "oops". As part
of template instantiation, we were dropping cv-qualifiers on the
instantiated type in a few places. This change reshuffles the
type-instantiation code a little bit so that there's a single place
where we add qualifiers to the instantiated type, so that we won't end
up with this same bug in the future.

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

15 years agoOpenCL 1.0 Support: fix a bug with lvalue swizzles
Nate Begeman [Fri, 26 Jun 2009 21:12:50 +0000 (21:12 +0000)]
OpenCL 1.0 Support: fix a bug with lvalue swizzles

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

15 years agoTemplate argument deduction is no longer responsible for checking
Douglas Gregor [Fri, 26 Jun 2009 20:57:09 +0000 (20:57 +0000)]
Template argument deduction is no longer responsible for checking
non-dependent parameter types. Instead, class template partial
specializations perform a final check of all of the instantiated
arguments. This model is cleaner, and works better for function
templates where the "final check" occurs during overload resolution.

Also, cope with cv-qualifiers when the parameter type was originally a
reference type, so that the deduced argument can be more qualified
than the transformed argument.

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

15 years agoCan't have arrays of auto.
Anders Carlsson [Fri, 26 Jun 2009 19:33:28 +0000 (19:33 +0000)]
Can't have arrays of auto.

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

15 years agoAn auto variable can't appear in its own initializer.
Anders Carlsson [Fri, 26 Jun 2009 19:16:07 +0000 (19:16 +0000)]
An auto variable can't appear in its own initializer.

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

15 years agoImplement enough of the 'auto' keyword so we can claim to support N2546.
Anders Carlsson [Fri, 26 Jun 2009 18:41:36 +0000 (18:41 +0000)]
Implement enough of the 'auto' keyword so we can claim to support N2546.

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

15 years agotypo
Devang Patel [Fri, 26 Jun 2009 18:33:42 +0000 (18:33 +0000)]
typo

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

15 years agoRevrt PR4228 fix for now.
Devang Patel [Fri, 26 Jun 2009 18:32:22 +0000 (18:32 +0000)]
Revrt PR4228 fix for now.

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

15 years agoSimplify, and fix a possible crash (never happens however, because we don't ever
Daniel Dunbar [Fri, 26 Jun 2009 18:32:06 +0000 (18:32 +0000)]
Simplify, and fix a possible crash (never happens however, because we don't ever
take this path with non-builtin floating point types).

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

15 years agoFix bar title in graphs.
Daniel Dunbar [Fri, 26 Jun 2009 18:29:52 +0000 (18:29 +0000)]
Fix bar title in graphs.

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

15 years agoImprove template argument deduction for reference parameters when
Douglas Gregor [Fri, 26 Jun 2009 18:27:22 +0000 (18:27 +0000)]
Improve template argument deduction for reference parameters when
deducing template arguments from a function call. Plus, add a bunch of
tests.

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

15 years agoOpenCL 1.0 Support:
Nate Begeman [Fri, 26 Jun 2009 18:22:18 +0000 (18:22 +0000)]
OpenCL 1.0 Support:
Add support for scalar to vector and partially initialized vector constant initializers.

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

15 years agoUpdate performance numbers (missed a link)
Daniel Dunbar [Fri, 26 Jun 2009 18:15:47 +0000 (18:15 +0000)]
Update performance numbers (missed a link)

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

15 years agoUpdate performance numbers.
Daniel Dunbar [Fri, 26 Jun 2009 18:14:41 +0000 (18:14 +0000)]
Update performance numbers.

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

15 years agoMinor change per Doug's comments.
Fariborz Jahanian [Fri, 26 Jun 2009 16:08:57 +0000 (16:08 +0000)]
Minor change per Doug's comments.
- Fariborz

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