]> granicus.if.org Git - clang/log
clang
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

15 years agoOpenCL 1.0 support: attributes
Nate Begeman [Fri, 26 Jun 2009 06:32:41 +0000 (06:32 +0000)]
OpenCL 1.0 support: attributes

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

15 years agoAdd NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAli...
Anders Carlsson [Fri, 26 Jun 2009 06:29:23 +0000 (06:29 +0000)]
Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl.

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

15 years agoSee through UsingDecls in more places.
Anders Carlsson [Fri, 26 Jun 2009 05:26:50 +0000 (05:26 +0000)]
See through UsingDecls in more places.

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

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

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

15 years agoFix build break.
Zhongxing Xu [Fri, 26 Jun 2009 05:13:13 +0000 (05:13 +0000)]
Fix build break.

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

15 years agoImprove error recovery in C++: when we hit 'implicit int' cases in C++,
Chris Lattner [Fri, 26 Jun 2009 04:45:06 +0000 (04:45 +0000)]
Improve error recovery in C++: when we hit 'implicit int' cases in C++,
these are usually because the parser was thoroughly confused.  In addition
to typing the value being declared as an int and hoping for the best, we
mark the value as invalid so we don't get chains of errors when it is
used downstream.  In C, implicit int actually is valid, so typing the thing
as int is good and marking it invalid is bad. :)

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

15 years agofix PR4452, a crash on invalid. The error recovery is still terrible in this case
Chris Lattner [Fri, 26 Jun 2009 04:27:47 +0000 (04:27 +0000)]
fix PR4452, a crash on invalid.  The error recovery is still terrible in this case
but at least we don't crash :)

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

15 years agooink is dead.
Chris Lattner [Fri, 26 Jun 2009 04:10:17 +0000 (04:10 +0000)]
oink is dead.

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

15 years agoFix another assert related to using decls.
Anders Carlsson [Fri, 26 Jun 2009 03:54:13 +0000 (03:54 +0000)]
Fix another assert related to using decls.

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

15 years agorearrange more code, this avoids a token lookahead for foo<
Chris Lattner [Fri, 26 Jun 2009 03:52:38 +0000 (03:52 +0000)]
rearrange more code, this avoids a token lookahead for foo<

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

15 years agomove some code around, no functionality change.
Chris Lattner [Fri, 26 Jun 2009 03:47:46 +0000 (03:47 +0000)]
move some code around, no functionality change.

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

15 years agosimplify some code.
Chris Lattner [Fri, 26 Jun 2009 03:45:46 +0000 (03:45 +0000)]
simplify some code.

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

15 years agoWhen creating LookupResults, see through UsingDecls. Fixes PR4450.
Anders Carlsson [Fri, 26 Jun 2009 03:37:05 +0000 (03:37 +0000)]
When creating LookupResults, see through UsingDecls. Fixes PR4450.

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

15 years agoFix PR4448.
Anders Carlsson [Fri, 26 Jun 2009 03:02:18 +0000 (03:02 +0000)]
Fix PR4448.

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

15 years agoOpenCL 1.0 support: explicit casts to ext-vector types
Nate Begeman [Fri, 26 Jun 2009 00:50:28 +0000 (00:50 +0000)]
OpenCL 1.0 support: explicit casts to ext-vector types

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

15 years agoRemove '#include <sstream>' from libAnalysis.
Ted Kremenek [Fri, 26 Jun 2009 00:43:22 +0000 (00:43 +0000)]
Remove '#include <sstream>' from libAnalysis.

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

15 years agoUpdate method signature.
Ted Kremenek [Fri, 26 Jun 2009 00:41:43 +0000 (00:41 +0000)]
Update method signature.

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

15 years agoUnbreak build.
Ted Kremenek [Fri, 26 Jun 2009 00:25:05 +0000 (00:25 +0000)]
Unbreak build.

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

15 years agoAdd missing header file.
Ted Kremenek [Fri, 26 Jun 2009 00:15:05 +0000 (00:15 +0000)]
Add missing header file.

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

15 years agoImplicit instantiation for function template specializations.
Douglas Gregor [Fri, 26 Jun 2009 00:10:03 +0000 (00:10 +0000)]
Implicit instantiation for function template specializations.

For a FunctionDecl that has been instantiated due to template argument
deduction, we now store the primary template from which it was
instantiated and the deduced template arguments. From this
information, we can instantiate the body of the function template.

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

15 years agoRemove orphaned header file.
Ted Kremenek [Fri, 26 Jun 2009 00:08:20 +0000 (00:08 +0000)]
Remove orphaned header file.

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

15 years agoIntroduce a new concept to the static analyzer: SValuator.
Ted Kremenek [Fri, 26 Jun 2009 00:05:51 +0000 (00:05 +0000)]
Introduce a new concept to the static analyzer: SValuator.

GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.

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

15 years agoOpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL
Nate Begeman [Thu, 25 Jun 2009 23:25:15 +0000 (23:25 +0000)]
OpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL

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