]> granicus.if.org Git - clang/log
clang
13 years agoProperly propagate #pragma diagnostic mappings from PCH but not command-line warning...
Argyrios Kyrtzidis [Fri, 14 Jan 2011 20:54:07 +0000 (20:54 +0000)]
Properly propagate #pragma diagnostic mappings from PCH but not command-line warning flags.
Addresses rdar://8435969&8852495

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

13 years agoRename 'RemoveDeadBindings()' to 'removeDeadBindings()'
Ted Kremenek [Fri, 14 Jan 2011 20:34:15 +0000 (20:34 +0000)]
Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'

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

13 years agoRename 'EnterStackFrame()' to 'enterStackFrame()'.
Ted Kremenek [Fri, 14 Jan 2011 20:34:10 +0000 (20:34 +0000)]
Rename 'EnterStackFrame()' to 'enterStackFrame()'.

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

13 years agoTeach RegionStore::EnterStackFrame() to handle
Ted Kremenek [Fri, 14 Jan 2011 20:29:43 +0000 (20:29 +0000)]
Teach RegionStore::EnterStackFrame() to handle
the case where the called function has fewer
formal arguments than actual arguments.  This
fixes a crash in the analyzer when doing
function call inlining.

Patch by Zhenbo Xu!

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

13 years agoWhen we're instantiating a direct variable initializer that has a pack
Douglas Gregor [Fri, 14 Jan 2011 17:12:22 +0000 (17:12 +0000)]
When we're instantiating a direct variable initializer that has a pack
expansion in it, we may end up instantiating to an empty
expression-list. In this case, the variable is uninitialized; tweak
the instantiation logic to handle this case. Fixes PR8977.

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

13 years agoKeep track of the number of expansions to be produced from a type pack
Douglas Gregor [Fri, 14 Jan 2011 17:04:44 +0000 (17:04 +0000)]
Keep track of the number of expansions to be produced from a type pack
expansion, when it is known due to the substitution of an out
parameter pack. This allows us to properly handle substitution into
pack expansions that involve multiple parameter packs at different
template parameter levels, even when this substitution happens one
level at a time (as with partial specializations of member class
templates and the signatures of member function templates).

Note that the diagnostic we provide when there is an arity mismatch
between an outer parameter pack and an inner parameter pack in this
case isn't as clear as the normal diagnostic for an arity
mismatch. However, this doesn't matter because these cases are very,
very rare and (even then) only typically occur in a SFINAE context.

The other kinds of pack expansions (expression, template, etc.) still
need to support optional tracking of the number of expansions, and we
need the moral equivalent of SubstTemplateTypeParmPackType for
substituted argument packs of template template and non-type template
parameters.

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

13 years agoSupport the zero-initialization of VLAs when that really means a zero
John McCall [Fri, 14 Jan 2011 10:37:58 +0000 (10:37 +0000)]
Support the zero-initialization of VLAs when that really means a zero
bit-pattern.  Continue punting on zero-initializing VLAs with a nonzero
pattern.

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

13 years agoWhen simplifying a cleanup's entry by merging it into a single predecessor,
John McCall [Fri, 14 Jan 2011 10:35:38 +0000 (10:35 +0000)]
When simplifying a cleanup's entry by merging it into a single predecessor,
replace all uses of the entry with the predecessor.  There are no cleanups
relying on this right now, but if we ever want a cleanup with a phi inside
it, this will be important.

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

13 years agotemporarily xfail, this was broken by r123418
Chris Lattner [Fri, 14 Jan 2011 05:30:12 +0000 (05:30 +0000)]
temporarily xfail, this was broken by r123418

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

13 years agoFix a few warnings stemming from my inability to properly fill out
Douglas Gregor [Fri, 14 Jan 2011 05:11:40 +0000 (05:11 +0000)]
Fix a few warnings stemming from my inability to properly fill out
switch() statements.

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

13 years agoStart implementing support for substitution into pack expansions that
Douglas Gregor [Fri, 14 Jan 2011 02:55:32 +0000 (02:55 +0000)]
Start implementing support for substitution into pack expansions that
involve template parameter packs at multiple template levels that
occur within the signatures members of class templates (and partial
specializations thereof). This is a work-in-progress that is deficient
in several ways, notably:
  - It only works for template type parameter packs, but we need to
  also support non-type template parameter packs and template template
  parameter packs.
  - It doesn't keep track of the lengths of the substituted argument
  packs in the expansion, so it can't properly diagnose length
  mismatches.

However, this is a concrete step in the right direction.

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

13 years agoReplace a literal '8' with getCharWidth().
Ken Dyck [Fri, 14 Jan 2011 02:01:36 +0000 (02:01 +0000)]
Replace a literal '8' with getCharWidth().

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

13 years agoUnbreak the MSVC build.
Francois Pichet [Thu, 13 Jan 2011 23:35:06 +0000 (23:35 +0000)]
Unbreak the MSVC build.

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

13 years agoSave getObjCGCAttrKind and use it in two places
Fariborz Jahanian [Thu, 13 Jan 2011 21:35:27 +0000 (21:35 +0000)]
Save getObjCGCAttrKind and use it in two places
for efficiancy (still part of //rdar://8761767).
Per John's comment.

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

13 years agoRename 'CheckDeadStores.cpp' to 'DeadStoresChecker.cpp'.
Ted Kremenek [Thu, 13 Jan 2011 20:58:59 +0000 (20:58 +0000)]
Rename 'CheckDeadStores.cpp' to 'DeadStoresChecker.cpp'.

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

13 years agoRemove warning in dead stores checker for
Ted Kremenek [Thu, 13 Jan 2011 20:58:56 +0000 (20:58 +0000)]
Remove warning in dead stores checker for
dead stores within nested assignments.  I have
never seen an actual bug found by this specific
warning, and it can lead to many false positives.

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

13 years agoGenerate write-barriers for global objc
Fariborz Jahanian [Thu, 13 Jan 2011 20:00:54 +0000 (20:00 +0000)]
Generate write-barriers for global objc
assigns. // rdar://8761767

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

13 years agoMove name mangling support from CodeGen to AST. In the
Peter Collingbourne [Thu, 13 Jan 2011 18:57:25 +0000 (18:57 +0000)]
Move name mangling support from CodeGen to AST.  In the
process, perform a number of refactorings:

- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
  to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it

No (intended) functionality change.

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

13 years agoOnly apply the parameter pack matching of C++0x [temp.arg.template]p3
Douglas Gregor [Thu, 13 Jan 2011 18:47:47 +0000 (18:47 +0000)]
Only apply the parameter pack matching of C++0x [temp.arg.template]p3
when we're actually matching a template template argument to a
template template parameter. Otherwise, use strict matching.

Fixes <rdar://problem/8859985> clang++: variadics and out-of-line definitions.

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

13 years agoFix a test case
Douglas Gregor [Thu, 13 Jan 2011 18:03:24 +0000 (18:03 +0000)]
Fix a test case

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

13 years agoWhen your comments and your code are out-of-sync, the test case is wrong.
Douglas Gregor [Thu, 13 Jan 2011 17:44:36 +0000 (17:44 +0000)]
When your comments and your code are out-of-sync, the test case is wrong.

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

13 years agoAdd tests for name mangling of variadic templates.
Douglas Gregor [Thu, 13 Jan 2011 16:39:34 +0000 (16:39 +0000)]
Add tests for name mangling of variadic templates.

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

13 years agoCXXBaseObjectRegion is like FieldRegion. Need to blast through it when
Zhongxing Xu [Thu, 13 Jan 2011 12:46:31 +0000 (12:46 +0000)]
CXXBaseObjectRegion is like FieldRegion. Need to blast through it when
getting the base region. This makes the RemoveDeadBindings() correct.

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

13 years agoSupport inlining base initializers. We still haven't got it completely right,
Zhongxing Xu [Thu, 13 Jan 2011 12:30:12 +0000 (12:30 +0000)]
Support inlining base initializers. We still haven't got it completely right,
since the bindings are purged after they are set up. Need to investigate
RemoveDeadBindings algorithm.

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

13 years agoAdd comments.
Zhongxing Xu [Thu, 13 Jan 2011 07:59:59 +0000 (07:59 +0000)]
Add comments.

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

13 years agoFix a corner case in RegionStore where we assign
Ted Kremenek [Thu, 13 Jan 2011 06:58:15 +0000 (06:58 +0000)]
Fix a corner case in RegionStore where we assign
a struct value to a symbolic index into array.
RegionStore can't actually reason about this,
so we were getting bogus warnings about loading
uninitialized values from the array.  The solution
is invalidate the entire array when we cannot
represent the binding explicitly.

Fixes <rdar://problem/8848957>

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

13 years agoRename 'HasGeneratedNode' to 'hasGeneratedNode'
Ted Kremenek [Thu, 13 Jan 2011 04:36:46 +0000 (04:36 +0000)]
Rename 'HasGeneratedNode' to 'hasGeneratedNode'
and 'getBasePredecessor()' to 'getPredecessor()'.

Also remove a unneeded save-and-restore of
node builder's tag field.

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

13 years agoRemove unnecessary save-and-restore of the
Ted Kremenek [Thu, 13 Jan 2011 04:36:40 +0000 (04:36 +0000)]
Remove unnecessary save-and-restore of the
node builder's 'HasGeneratedNode' field.

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

13 years agoRemove CheckerContext's dependence on setting
Ted Kremenek [Thu, 13 Jan 2011 04:36:36 +0000 (04:36 +0000)]
Remove CheckerContext's dependence on setting
the node builder's "tag" ivar (which we would
like to remove).

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

13 years agoEnsure an insertion point at the end of a statement-expression.
John McCall [Thu, 13 Jan 2011 02:03:06 +0000 (02:03 +0000)]
Ensure an insertion point at the end of a statement-expression.
Fixes PR8967.

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

13 years agooptimize out a temporary sys::Path
Chris Lattner [Thu, 13 Jan 2011 01:35:58 +0000 (01:35 +0000)]
optimize out a temporary sys::Path

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

13 years agoOnly add unnamed_addr to definitions.
Rafael Espindola [Thu, 13 Jan 2011 01:12:55 +0000 (01:12 +0000)]
Only add unnamed_addr to definitions.

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

13 years agoAllow us to transform pack expansion expressions.
Douglas Gregor [Thu, 13 Jan 2011 00:19:55 +0000 (00:19 +0000)]
Allow us to transform pack expansion expressions.

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

13 years agoImplement C++0x [temp.arg.template]p3, which allows slightly fuzzy
Douglas Gregor [Thu, 13 Jan 2011 00:08:50 +0000 (00:08 +0000)]
Implement C++0x [temp.arg.template]p3, which allows slightly fuzzy
matching of variadic template template parameters to template
arguments. This paragraph was the subject of ISO C++ committee
document N2555: Extending Variadic Template Template Parameters.

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

13 years agoreplace all uses of PathV1::IsSymlink with PathV2::is_symlink.
Michael J. Spencer [Wed, 12 Jan 2011 23:54:48 +0000 (23:54 +0000)]
replace all uses of PathV1::IsSymlink with PathV2::is_symlink.

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

13 years agoRefactor and simplify Sema::TemplateParameterListsAreEqual. We had a
Douglas Gregor [Wed, 12 Jan 2011 23:45:44 +0000 (23:45 +0000)]
Refactor and simplify Sema::TemplateParameterListsAreEqual. We had a
bunch of duplicated checks for parameter pack/non-pack mismatches.

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

13 years agoAdd the location of the right parenthesis of a C++ named cast
Douglas Gregor [Wed, 12 Jan 2011 22:41:29 +0000 (22:41 +0000)]
Add the location of the right parenthesis of a C++ named cast
(static_cast, dynamic_cast, reinterpret_cast, or const_cast) to
improve source-location information. Fixes PR8960.

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

13 years agoAdd IR generation support for SizeOfPackExpr.
Douglas Gregor [Wed, 12 Jan 2011 22:11:34 +0000 (22:11 +0000)]
Add IR generation support for SizeOfPackExpr.

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

13 years agoAdd some more partial-ordering tests, including one that changes with
Douglas Gregor [Wed, 12 Jan 2011 22:04:05 +0000 (22:04 +0000)]
Add some more partial-ordering tests, including one that changes with
the proposed resolution to core isue 692. I'm not certain which way
we'll go on this one.

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

13 years agowint_t is defined as 'unsigned int' on Linux. Fixes PR8938.
Douglas Gregor [Wed, 12 Jan 2011 21:19:25 +0000 (21:19 +0000)]
wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.

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

13 years agoUpdate Xcode project.
Anders Carlsson [Wed, 12 Jan 2011 19:36:11 +0000 (19:36 +0000)]
Update Xcode project.

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

13 years agoTeach TreeTransform how to transform a pack expansion type into
Douglas Gregor [Wed, 12 Jan 2011 17:07:58 +0000 (17:07 +0000)]
Teach TreeTransform how to transform a pack expansion type into
another pack expansion type. This can happen when rebuilding types in
the current instantiation.

Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>).

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

13 years agoPR3558: mark "logically const" accessor methods in ASTContext as const,
Jay Foad [Wed, 12 Jan 2011 09:06:06 +0000 (09:06 +0000)]
PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.

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

13 years agoAdd some documentation for C++ static analyzer.
Zhongxing Xu [Wed, 12 Jan 2011 07:20:03 +0000 (07:20 +0000)]
Add some documentation for C++ static analyzer.

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

13 years agoAdd cast expr kinds to CheckerVisitor.def.
Zhongxing Xu [Wed, 12 Jan 2011 06:24:01 +0000 (06:24 +0000)]
Add cast expr kinds to CheckerVisitor.def.

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

13 years agoFix a latent bug where, after emitting an expression statement, we would
John McCall [Wed, 12 Jan 2011 03:41:02 +0000 (03:41 +0000)]
Fix a latent bug where, after emitting an expression statement, we would
delete the block we began emitting into if it had no predecessors.  We never
want to do this, because there are several valid cases during statement
emission where an existing block has no known predecessors but will acquire
some later.  The case in my test case doesn't inherently fall into this
category, because we could safely emit the case-range code before the statement
body, but there are examples with labels that can't be fallen into
that would also demonstrate this bug.

rdar://problem/8837067

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

13 years agoDriver: Change -dumpversion to return a GCC compatible answer.
Daniel Dunbar [Wed, 12 Jan 2011 00:43:47 +0000 (00:43 +0000)]
Driver: Change -dumpversion to return a GCC compatible answer.
 - See comment for why.

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

13 years agoSlight bugfix to the attribute-distribution logic for GC attributes.
John McCall [Wed, 12 Jan 2011 00:34:59 +0000 (00:34 +0000)]
Slight bugfix to the attribute-distribution logic for GC attributes.
Slight optimization of getObjCGCAttrKind.

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

13 years agoSet unnamed_addr in every type info.
Rafael Espindola [Tue, 11 Jan 2011 23:55:05 +0000 (23:55 +0000)]
Set unnamed_addr in every type info.

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

13 years agoAdd a comment for r123231.
Francois Pichet [Tue, 11 Jan 2011 23:38:13 +0000 (23:38 +0000)]
Add a comment for r123231.

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

13 years agoAdd TemplateArgument::CreatePackCopy() to create a new parameter pack
Douglas Gregor [Tue, 11 Jan 2011 23:09:57 +0000 (23:09 +0000)]
Add TemplateArgument::CreatePackCopy() to create a new parameter pack
in ASTContext-allocated memory, copying the provided template
arguments. Use this new routine where we can. No functionality change.

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

13 years agoSet unnamed_addr in VTTs.
Rafael Espindola [Tue, 11 Jan 2011 22:29:55 +0000 (22:29 +0000)]
Set unnamed_addr in VTTs.

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

13 years agoImplement partial ordering of class template partial specializations
Douglas Gregor [Tue, 11 Jan 2011 22:21:24 +0000 (22:21 +0000)]
Implement partial ordering of class template partial specializations
and function templates that contain variadic templates. This involves
three small-ish changes:

  (1) When transforming a pack expansion, if the transformed argument
  still contains unexpanded parameter packs, build a pack
  expansion. This can happen during the substitution that occurs into
  class template partial specialiation template arguments during
  partial ordering.

  (2) When performing template argument deduction where the argument
  is a pack expansion, match against the pattern of that pack
  expansion.

  (3) When performing template argument deduction against a non-pack
  parameter, or a non-expansion template argument, deduction fails if
  the argument itself is a pack expansion (C++0x
  [temp.deduct.type]p22).

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

13 years agoSet unnamed_addr for type infos that we are confortable marking as hidden. I
Rafael Espindola [Tue, 11 Jan 2011 21:44:37 +0000 (21:44 +0000)]
Set unnamed_addr for type infos that we are confortable marking as hidden. I
think it is safe to mark all type infos with unnamed_addr, but I am not sure.

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

13 years agoAdd unnamed_addr to vtables.
Rafael Espindola [Tue, 11 Jan 2011 21:10:26 +0000 (21:10 +0000)]
Add unnamed_addr to vtables.

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

13 years agoAdd back 122079 so we can ignore the argument some more.
Eric Christopher [Tue, 11 Jan 2011 20:37:13 +0000 (20:37 +0000)]
Add back 122079 so we can ignore the argument some more.

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

13 years ago[analyzer] Introduce ObjCSelfInitChecker, which checks initialization methods to...
Argyrios Kyrtzidis [Tue, 11 Jan 2011 19:45:25 +0000 (19:45 +0000)]
[analyzer] Introduce ObjCSelfInitChecker, which checks initialization methods to verify that they assign 'self' to the
result of an initialization call (e.g. [super init], or [self initWith..]) before using any instance variable or
returning 'self'.

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

13 years ago[analyzer] Support post-visiting ObjCIvarRefExprs for checkers.
Argyrios Kyrtzidis [Tue, 11 Jan 2011 19:45:20 +0000 (19:45 +0000)]
[analyzer] Support post-visiting ObjCIvarRefExprs for checkers.

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

13 years ago[analyzer] Add 'bool ignorePrefix' parameter to cocoa::deriveNamingConvention to...
Argyrios Kyrtzidis [Tue, 11 Jan 2011 19:45:16 +0000 (19:45 +0000)]
[analyzer] Add 'bool ignorePrefix' parameter to cocoa::deriveNamingConvention to control whether
the prefix should be ignored.

E.g. if ignorePrefix is true, "_init" and "init" selectors will both be result in InitRule, but if
ignorePrefix is false, only "init" will return InitRule.

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

13 years ago[analyzer] Add 'isLoad' parameter in Checker::visitLocation() to conveniently disting...
Argyrios Kyrtzidis [Tue, 11 Jan 2011 19:45:13 +0000 (19:45 +0000)]
[analyzer] Add 'isLoad' parameter in Checker::visitLocation() to conveniently distinguish between loads/stores.

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

13 years agoAdd another test for [temp.func.order]p5/[temp.deduct.partial]p11,
Douglas Gregor [Tue, 11 Jan 2011 17:51:55 +0000 (17:51 +0000)]
Add another test for [temp.func.order]p5/[temp.deduct.partial]p11,
from James Widman.

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

13 years agoImplement C++ [temp.func.order]p5 more directly, by passing down the
Douglas Gregor [Tue, 11 Jan 2011 17:34:58 +0000 (17:34 +0000)]
Implement C++ [temp.func.order]p5 more directly, by passing down the
number of explicit call arguments. This actually fixes an erroneous
test for [temp.deduct.partial]p11, where we were considering
parameters corresponding to arguments beyond those that were
explicitly provided.

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

13 years agoRemove special handling for opaque Neon vector types.
Bob Wilson [Tue, 11 Jan 2011 16:53:49 +0000 (16:53 +0000)]
Remove special handling for opaque Neon vector types.
Clang does not wrap the vectors in structs anymore so this isn't needed.

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

13 years agoRemove ProgramPoint parameter from GenericNodeBuilder::generateNode().
Ted Kremenek [Tue, 11 Jan 2011 16:53:44 +0000 (16:53 +0000)]
Remove ProgramPoint parameter from GenericNodeBuilder::generateNode().

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

13 years agoAdd example from C++0x [temp.deduct.type]p21, which already works
Douglas Gregor [Tue, 11 Jan 2011 15:36:52 +0000 (15:36 +0000)]
Add example from C++0x [temp.deduct.type]p21, which already works

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

13 years agoAdded warning about invalid register specification for local variables.
Abramo Bagnara [Tue, 11 Jan 2011 15:16:52 +0000 (15:16 +0000)]
Added warning about invalid register specification for local variables.

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

13 years agoIn Microsoft mode, force 64 bit hex integer constants to signed type if the LL or...
Francois Pichet [Tue, 11 Jan 2011 12:23:00 +0000 (12:23 +0000)]
In Microsoft mode, force 64 bit hex integer constants to signed type if the LL or i64 suffix is used. This MSVC behavior.

For example:

void f(long long){ printf("long long"); }
void f(unsigned long long) { printf("unsigned long long"); }
int main() {
   f(0xffffffffffffffffLL);
}
Will print "long long" using MSVC.

This patch also fixes 16 compile errors related to overloading issues when parsing the MSVC 2008 C++ standard lib.

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

13 years agoMicrosoft integer suffix changes:
Francois Pichet [Tue, 11 Jan 2011 11:57:53 +0000 (11:57 +0000)]
Microsoft integer suffix changes:
i64 is like LL
i32 is like L

Also set isMicrosoftInteger to true only if the suffix is well formed.

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

13 years agoRename GenericNodeBuilder to GenericNodeBuilderRefCount to avoid namespace clash...
Francois Pichet [Tue, 11 Jan 2011 10:41:37 +0000 (10:41 +0000)]
Rename GenericNodeBuilder to GenericNodeBuilderRefCount to avoid namespace clash using MSVC.

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

13 years agoRework ExprEngine::processCFGBlockEntrance()
Ted Kremenek [Tue, 11 Jan 2011 06:37:47 +0000 (06:37 +0000)]
Rework ExprEngine::processCFGBlockEntrance()
to use a node builder.  This paves the way
for Checkers to interpose (via a "visit" method)
at the entrance to blocks.

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

13 years agoRemove several silly methods from ento::CoreEngine
Ted Kremenek [Tue, 11 Jan 2011 04:49:40 +0000 (04:49 +0000)]
Remove several silly methods from ento::CoreEngine
that just forwarded to ento::SubEngine.

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

13 years agoEnsure that the result type of an Objective-C class message send is
Douglas Gregor [Tue, 11 Jan 2011 03:23:19 +0000 (03:23 +0000)]
Ensure that the result type of an Objective-C class message send is
complete. However, if it returns a reference type, don't require the
type it refers to to be complete. Fixes <rdar://problem/8807070>.

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

13 years agoWhen mapping from a function parameter pack to the set of function
Douglas Gregor [Tue, 11 Jan 2011 03:14:20 +0000 (03:14 +0000)]
When mapping from a function parameter pack to the set of function
parameters it expanded to, map exactly the number of function
parameters that were expanded rather than just running to the end of
the instantiated parameter list. This finishes the implementation of
the last sentence of C++0x [temp.deduct.call]p1.

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

13 years agoRename misc. methods in ento::Worklist to start
Ted Kremenek [Tue, 11 Jan 2011 02:34:50 +0000 (02:34 +0000)]
Rename misc. methods in ento::Worklist to start
with lowercase letter.

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

13 years agoRename misc. methods in GRSubEngine to start
Ted Kremenek [Tue, 11 Jan 2011 02:34:45 +0000 (02:34 +0000)]
Rename misc. methods in GRSubEngine to start
with a lower-case letter.  No functionality change.

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

13 years agoImplement the last bullet of [temp.deduct.type]p5 and part of the last
Douglas Gregor [Tue, 11 Jan 2011 01:52:23 +0000 (01:52 +0000)]
Implement the last bullet of [temp.deduct.type]p5 and part of the last
sentence of [temp.deduct.call]p1, both of which concern the
non-deducibility of parameter packs not at the end of a
parameter-type-list. The latter isn't fully implemented yet; see the
new FIXME.

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

13 years agoReplace all uses of PathV1::isDirectory with PathV2::fs::is_directory.
Michael J. Spencer [Tue, 11 Jan 2011 01:21:20 +0000 (01:21 +0000)]
Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory.

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

13 years agoMake sure that we parse a '>>' that closes two template argument lists
Douglas Gregor [Tue, 11 Jan 2011 00:45:18 +0000 (00:45 +0000)]
Make sure that we parse a '>>' that closes two template argument lists
appropritely when there are no other template arguments.

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

13 years agoWhen we're inside a functional cast, '>' is an operator. Fixes PR8912.
Douglas Gregor [Tue, 11 Jan 2011 00:33:19 +0000 (00:33 +0000)]
When we're inside a functional cast, '>' is an operator. Fixes PR8912.

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

13 years agoFix debug info for __block variable referenced outside of block.
Devang Patel [Tue, 11 Jan 2011 00:30:27 +0000 (00:30 +0000)]
Fix debug info for __block variable referenced outside of block.

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

13 years agoAdd testing for unexpanded parameter packs in all of the C++
Douglas Gregor [Tue, 11 Jan 2011 00:27:36 +0000 (00:27 +0000)]
Add testing for unexpanded parameter packs in all of the C++
expression kinds. This is (indirectly) a test verifying that the
recursive AST visitor is visiting the children of these expression
nodes.

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

13 years agoAdd unnamed_addr to constructors and destructors.
Rafael Espindola [Tue, 11 Jan 2011 00:26:26 +0000 (00:26 +0000)]
Add unnamed_addr to constructors and destructors.

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

13 years agoMove DefaultABIInfo::classifyReturnType where it belongs. No functional change.
Bob Wilson [Mon, 10 Jan 2011 23:54:17 +0000 (23:54 +0000)]
Move DefaultABIInfo::classifyReturnType where it belongs.  No functional change.

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

13 years agoOnly traverse template argument locations if we actually have explicit
Matt Beaumont-Gay [Mon, 10 Jan 2011 23:53:06 +0000 (23:53 +0000)]
Only traverse template argument locations if we actually have explicit
template arguments.

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

13 years agoAdd unnamed_addr when creating artificial string globals. For example, in
Rafael Espindola [Mon, 10 Jan 2011 22:34:03 +0000 (22:34 +0000)]
Add unnamed_addr when creating artificial string globals. For example, in

static const char foo[] = "foo";
static const char *bar = "bar";

the global created to hold "bar" will have it, but foo will not.

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

13 years agoImplement more of C++0x [temp.arg.explicit]p9, allowing extension of
Douglas Gregor [Mon, 10 Jan 2011 20:53:55 +0000 (20:53 +0000)]
Implement more of C++0x [temp.arg.explicit]p9, allowing extension of
pack expansions in template argument lists and function parameter
lists. The implementation of this paragraph should be complete
*except* for cases where we're substituting into one of the unexpanded
packs in a pack expansion; that's a general issue I haven't solved yet.

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

13 years agoFix a comment typo.
Bob Wilson [Mon, 10 Jan 2011 18:23:55 +0000 (18:23 +0000)]
Fix a comment typo.

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

13 years agoNEON vector support for ARM is in pretty good shape now. Update the docs.
Bob Wilson [Mon, 10 Jan 2011 17:55:14 +0000 (17:55 +0000)]
NEON vector support for ARM is in pretty good shape now.  Update the docs.

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

13 years agoRepent for my copy-and-paste sins, factoring out the code that forms
Douglas Gregor [Mon, 10 Jan 2011 17:53:52 +0000 (17:53 +0000)]
Repent for my copy-and-paste sins, factoring out the code that forms
argument packs from a set of deduced arguments, then checks that those
argument packs match previously-deduced argument packs.

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

13 years agoFactor out the code to set up template argument deduction for a set of
Douglas Gregor [Mon, 10 Jan 2011 17:35:05 +0000 (17:35 +0000)]
Factor out the code to set up template argument deduction for a set of
template argument packs. This also ensures that explicitly-specified
template arguments get properly represented in those cases.

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

13 years agoRemove dead code.
Zhongxing Xu [Mon, 10 Jan 2011 11:28:29 +0000 (11:28 +0000)]
Remove dead code.

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

13 years agoFix CMakeLists.txt.
Zhongxing Xu [Mon, 10 Jan 2011 09:33:41 +0000 (09:33 +0000)]
Fix CMakeLists.txt.

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

13 years agoRevert r123160. There are linking dependency problems.
Zhongxing Xu [Mon, 10 Jan 2011 09:23:01 +0000 (09:23 +0000)]
Revert r123160. There are linking dependency problems.

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

13 years agoWork-in-progress implementation of C++0x [temp.arg.explicit]p9, which
Douglas Gregor [Mon, 10 Jan 2011 07:32:04 +0000 (07:32 +0000)]
Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which
allows an argument pack determines via explicit specification of
function template arguments to be extended by further, deduced
arguments. For example:

template<class ... Types> void f(Types ... values);
void g() {
  f<int*, float*>(0, 0, 0);   // Types is deduced to the sequence int*, float*, int
}

There are a number of FIXMEs in here that indicate places where we
need to implement + test retained expansions, plus a number of other
places in deduction where we need to correctly cope with the
explicitly-specified arguments when deducing an argument
pack. Furthermore, it appears that the RecursiveASTVisitor needs to be
auditied; it's missing some traversals (especially w.r.t. template
arguments) that cause it not to find unexpanded parameter packs when
it should.

The good news, however, is that the tr1::tuple implementation now
works fully, and the tr1::bind example (both from N2080) is actually
working now.

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

13 years agoUnbreak the CMake build.
Douglas Gregor [Mon, 10 Jan 2011 07:26:53 +0000 (07:26 +0000)]
Unbreak the CMake build.

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

13 years agoExprEngine.cpp and AnalysisConsumer.cpp should not be in the Checkers directory.
Zhongxing Xu [Mon, 10 Jan 2011 05:52:42 +0000 (05:52 +0000)]
ExprEngine.cpp and AnalysisConsumer.cpp should not be in the Checkers directory.

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

13 years agoAdd some expression kinds to CheckerVisitor.def.
Zhongxing Xu [Mon, 10 Jan 2011 05:39:35 +0000 (05:39 +0000)]
Add some expression kinds to CheckerVisitor.def.

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

13 years agoIn C++, assignment and compound assignment operators return an lvalue.
Zhongxing Xu [Mon, 10 Jan 2011 03:54:19 +0000 (03:54 +0000)]
In C++, assignment and compound assignment operators return an lvalue.

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

13 years agoThe isPrefix() checking is redundant. Lvalue incremental/decremental expressions
Zhongxing Xu [Mon, 10 Jan 2011 03:22:57 +0000 (03:22 +0000)]
The isPrefix() checking is redundant. Lvalue incremental/decremental expressions
are all prefixes.

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

13 years agoReplace all uses of PathV1::exists with PathV2::fs::exists.
Michael J. Spencer [Mon, 10 Jan 2011 02:34:13 +0000 (02:34 +0000)]
Replace all uses of PathV1::exists with PathV2::fs::exists.

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