]> granicus.if.org Git - clang/log
clang
14 years agoTemporarily revert 91553.
Ted Kremenek [Wed, 16 Dec 2009 19:46:44 +0000 (19:46 +0000)]
Temporarily revert 91553.

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

14 years agoRemove use of ObjCObjectRegion from BasicStoreManager.
Ted Kremenek [Wed, 16 Dec 2009 19:42:23 +0000 (19:42 +0000)]
Remove use of ObjCObjectRegion from BasicStoreManager.

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

14 years agoFix test case to unbreak testing
Douglas Gregor [Wed, 16 Dec 2009 19:18:40 +0000 (19:18 +0000)]
Fix test case to unbreak testing

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

14 years agoWhen value-initializing a class with no user-defined constructors but
Douglas Gregor [Wed, 16 Dec 2009 18:50:27 +0000 (18:50 +0000)]
When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.

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

14 years agoCompute the right extension for preprocessed Objective-C++ files.
Ted Kremenek [Wed, 16 Dec 2009 18:32:41 +0000 (18:32 +0000)]
Compute the right extension for preprocessed Objective-C++ files.

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

14 years agoDiagnose property of reference type as unsupported
Fariborz Jahanian [Wed, 16 Dec 2009 18:03:30 +0000 (18:03 +0000)]
Diagnose property of reference type as unsupported
instead of crashing for now.

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

14 years agoBaby steps towards fixing PR5589. If a class needs a vtable pointer, add one.
Anders Carlsson [Wed, 16 Dec 2009 17:27:20 +0000 (17:27 +0000)]
Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.

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

14 years agoadd some svn:ignore
Nuno Lopes [Wed, 16 Dec 2009 17:07:58 +0000 (17:07 +0000)]
add some svn:ignore

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

14 years agoimplement PR5654: add -fassume-sane-operator-new, which is enabled by default, and...
Nuno Lopes [Wed, 16 Dec 2009 16:59:22 +0000 (16:59 +0000)]
implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.

feel free to chage the name to this lengthy argument

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

14 years agoIn Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an Initializ...
Douglas Gregor [Wed, 16 Dec 2009 16:54:16 +0000 (16:54 +0000)]
In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence

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

14 years agoUpdate C++ status page to reflect reality
Douglas Gregor [Wed, 16 Dec 2009 16:23:48 +0000 (16:23 +0000)]
Update C++ status page to reflect reality

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

14 years agofix PR5689: add support for 'o' and 'V' asm input operands
Nuno Lopes [Wed, 16 Dec 2009 14:28:21 +0000 (14:28 +0000)]
fix PR5689: add support for 'o' and 'V' asm input operands

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

14 years agofix build
Nuno Lopes [Wed, 16 Dec 2009 14:20:08 +0000 (14:20 +0000)]
fix build

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

14 years agoShift things around so that it's easier to recover from a missing
John McCall [Wed, 16 Dec 2009 12:17:52 +0000 (12:17 +0000)]
Shift things around so that it's easier to recover from a missing
function in a C++ call using an arbitrary call-expression type.
Actually exploit this to fix the recovery implemented earlier.

The diagnostic is still iffy, though.

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

14 years agoFix pretty stack traces.
Daniel Dunbar [Wed, 16 Dec 2009 11:47:38 +0000 (11:47 +0000)]
Fix pretty stack traces.

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

14 years agoAdd a new kind of region: CXXObjectRegion. Currently it has only one
Zhongxing Xu [Wed, 16 Dec 2009 11:27:52 +0000 (11:27 +0000)]
Add a new kind of region: CXXObjectRegion. Currently it has only one
attribute: the object type.
Add initial support for visiting CXXThisExpr.
Fix a bunch of 80-col violations.

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

14 years agoIntroduce a centralized routine in Sema for diagnosing failed lookups (when
John McCall [Wed, 16 Dec 2009 08:11:27 +0000 (08:11 +0000)]
Introduce a centralized routine in Sema for diagnosing failed lookups (when
used as expressions).  In dependent contexts, try to recover by doing a lookup
in previously-dependent base classes.  We get better diagnostics out, but
unfortunately the recovery fails:  we need to turn it into a method call
expression, not a bare call expression.  Thus this is still a WIP.

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

14 years agoUse GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this...
Anders Carlsson [Wed, 16 Dec 2009 07:05:41 +0000 (07:05 +0000)]
Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this change, we can now compile and link TableGen.

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

14 years agoHandle ImplicitValueInitExpr in AggExprEmitter.
Anders Carlsson [Wed, 16 Dec 2009 06:57:54 +0000 (06:57 +0000)]
Handle ImplicitValueInitExpr in AggExprEmitter.

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

14 years agoremove dead code.
Zhongxing Xu [Wed, 16 Dec 2009 06:39:03 +0000 (06:39 +0000)]
remove dead code.

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

14 years agoEliminate Sema::CheckValueInitialization; its callers now use
Douglas Gregor [Wed, 16 Dec 2009 06:35:08 +0000 (06:35 +0000)]
Eliminate Sema::CheckValueInitialization; its callers now use
InitializationSequence to perform the actual initialization.

Also, introduced the notion of a tree of initialized entities, so that
we can know where an initialization began when dealing with nested
initializations (as occur when performing list initialization). This
will, eventually, be useful for producing better diagnostics when list
initialization fails, because we can show the path from the top-level
object being initialized down to the actual subobject where
initialization failed.

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

14 years agoAdd abort() as a builtin. This has two effects: one, we warn for incorrect
Eli Friedman [Wed, 16 Dec 2009 06:28:21 +0000 (06:28 +0000)]
Add abort() as a builtin.  This has two effects: one, we warn for incorrect
declarations of abort(), and two, we mark it noreturn.  Missing the latter
shows up in one of the "embarassing" tests (from the thread on llvmdev
"detailed comparison of generated code size for LLVM and other compilers").

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

14 years agoMore FullExpr work.
Anders Carlsson [Wed, 16 Dec 2009 06:21:35 +0000 (06:21 +0000)]
More FullExpr work.

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

14 years agoMore work on the FullExpr class.
Anders Carlsson [Wed, 16 Dec 2009 06:10:22 +0000 (06:10 +0000)]
More work on the FullExpr class.

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

14 years agoTeach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier...
Ted Kremenek [Wed, 16 Dec 2009 06:06:43 +0000 (06:06 +0000)]
Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier()' will not always return a non-null IdentifierInfo*.

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

14 years agoTeach OSAtomicChecker that a FunctionDecl's name isn't always a simple IdentifierInfo*.
Ted Kremenek [Wed, 16 Dec 2009 06:03:24 +0000 (06:03 +0000)]
Teach OSAtomicChecker that a FunctionDecl's name isn't always a simple IdentifierInfo*.

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

14 years agoTeach NoReturnFunctionChecker that FunctionDecl::getIdentifier() is not guaranteed...
Ted Kremenek [Wed, 16 Dec 2009 05:58:28 +0000 (05:58 +0000)]
Teach NoReturnFunctionChecker that FunctionDecl::getIdentifier() is not guaranteed to return a non-null IdentifierInfo*.

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

14 years agoTeach CheckerVisitor about CXXOperatorCallExpr.
Ted Kremenek [Wed, 16 Dec 2009 05:52:19 +0000 (05:52 +0000)]
Teach CheckerVisitor about CXXOperatorCallExpr.

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

14 years agoTeach CFRecStmtDeclVisitor about CXXMethodDecl.
Ted Kremenek [Wed, 16 Dec 2009 05:50:26 +0000 (05:50 +0000)]
Teach CFRecStmtDeclVisitor about CXXMethodDecl.

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

14 years agoMangle CXXOperatorCallExprs, fixes PR5796.
Anders Carlsson [Wed, 16 Dec 2009 05:48:46 +0000 (05:48 +0000)]
Mangle CXXOperatorCallExprs, fixes PR5796.

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

14 years agoExpose C++ methods to GRExprEngine.
Zhongxing Xu [Wed, 16 Dec 2009 05:29:59 +0000 (05:29 +0000)]
Expose C++ methods to GRExprEngine.

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

14 years agoAdd logic for computing preprocessor file extensions for C++ files.
Ted Kremenek [Wed, 16 Dec 2009 05:02:47 +0000 (05:02 +0000)]
Add logic for computing preprocessor file extensions for C++ files.

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

14 years agoMake GRSubEngine.h standalone
Douglas Gregor [Wed, 16 Dec 2009 03:49:50 +0000 (03:49 +0000)]
Make GRSubEngine.h standalone

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

14 years agoFix semantic diagnostics that embed English works, from Nicola Gigante!
Douglas Gregor [Wed, 16 Dec 2009 03:45:30 +0000 (03:45 +0000)]
Fix semantic diagnostics that embed English works, from Nicola Gigante!

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

14 years agoRefine a little. WIP.
Mike Stump [Wed, 16 Dec 2009 03:25:12 +0000 (03:25 +0000)]
Refine a little.  WIP.

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

14 years agoAdd (initial?) static analyzer support for handling C++ references.
Ted Kremenek [Wed, 16 Dec 2009 03:18:58 +0000 (03:18 +0000)]
Add (initial?) static analyzer support for handling C++ references.
This change was a lot bigger than I originally anticipated; among
other things it requires us storing more information in the CFG to
record what block-level expressions need to be evaluated as lvalues.

The big change is that CFGBlocks no longer contain Stmt*'s by
CFGElements.  Currently CFGElements just wrap Stmt*, but they also
store a bit indicating whether the block-level expression should be
evalauted as an lvalue.  DeclStmts involving the initialization of a
reference require us treating the initialization expression as an
lvalue, even though that information isn't recorded in the AST.
Conceptually this change isn't that complicated, but it required
bubbling up the data through the CFGBuilder, to GRCoreEngine, and
eventually to GRExprEngine.

The addition of CFGElement is also useful for when we want to handle
more control-flow constructs or other data we want to keep in the CFG
that isn't represented well with just a block of statements.

In GRExprEngine, this patch introduces logic for evaluating the
lvalues of references, which currently retrieves the internal "pointer
value" that the reference represents.  EvalLoad does a two stage load
to catch null dereferences involving an invalid reference (although
this could possibly be caught earlier during the initialization of a
reference).

Symbols are currently symbolicated using the reference type, instead
of a pointer type, and special handling is required creating
ElementRegions that layer on SymbolicRegions (see the changes to
RegionStoreManager).

Along the way, the DeadStoresChecker also silences warnings involving
dead stores to references.  This was the original change I introduced
(which I wrote test cases for) that I realized caused GRExprEngine to
crash.

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

14 years agoAdd some documentation for recent checkins. WIP.
Mike Stump [Wed, 16 Dec 2009 03:18:14 +0000 (03:18 +0000)]
Add some documentation for recent checkins.  WIP.

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

14 years agoAdd an addition check for undefined behavior for when we hit a
Mike Stump [Wed, 16 Dec 2009 03:07:12 +0000 (03:07 +0000)]
Add an addition check for undefined behavior for when we hit a
__builtin_unreachable.  WIP.

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

14 years agoImplement additional undefined checks for additional loads and stores. WIP.
Mike Stump [Wed, 16 Dec 2009 02:57:00 +0000 (02:57 +0000)]
Implement additional undefined checks for additional loads and stores.  WIP.

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

14 years agoCheck in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action...
Anders Carlsson [Wed, 16 Dec 2009 02:09:40 +0000 (02:09 +0000)]
Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes.

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

14 years agoSuccessive anonymous namespaces name the same scope. I misinterpreted the
John McCall [Wed, 16 Dec 2009 02:06:49 +0000 (02:06 +0000)]
Successive anonymous namespaces name the same scope.  I misinterpreted the
standard the last time.  Fixes PR5766.

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

14 years agoSwitch the C++ new expression over to InitializationSequence, rather
Douglas Gregor [Wed, 16 Dec 2009 01:38:02 +0000 (01:38 +0000)]
Switch the C++ new expression over to InitializationSequence, rather
than using its own partial implementation of initialization.

Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.

Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.

Implemented support for default initialization in
InitializationSequence.

Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.

Taught CXXConstructExpr to store more location information.

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

14 years agoDiagnose attempting to assign to a sub-structure of an ivar
Fariborz Jahanian [Tue, 15 Dec 2009 23:59:41 +0000 (23:59 +0000)]
Diagnose attempting to assign to a sub-structure of an ivar
using objective-c property. (fixes radar 7449707)

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

14 years agoRemove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra veneer...
Ted Kremenek [Tue, 15 Dec 2009 23:23:27 +0000 (23:23 +0000)]
Remove ValueManager::getRegionValueSymbolValOrUnknown().  It was just extra veneer on top of getRegionValueSymbolVal().

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

14 years agoLink up member-class redeclarations during template instantiation.
John McCall [Tue, 15 Dec 2009 22:29:06 +0000 (22:29 +0000)]
Link up member-class redeclarations during template instantiation.
This test courtesy of LLVM.

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

14 years agoUpdate tests to use %clang instead of 'clang', and forcibly disable use of '
Daniel Dunbar [Tue, 15 Dec 2009 22:01:24 +0000 (22:01 +0000)]
Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

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

14 years agoFixes a code gen bug related to accessing a now
Fariborz Jahanian [Tue, 15 Dec 2009 21:34:52 +0000 (21:34 +0000)]
Fixes a code gen bug related to accessing a now
non-existing 'isa' field of a non-existing struct type
all related to legacy type definition for 'id' which we have
dropped in clang in favor of a built-in type.
(fixes radar 7470820).

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

14 years agoShouldDestroyTemporaries? I don't think so.
Anders Carlsson [Tue, 15 Dec 2009 20:51:39 +0000 (20:51 +0000)]
ShouldDestroyTemporaries? I don't think so.

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

14 years agoenable reuse of MacroArgs objects. This is a small (2.5%) win
Chris Lattner [Tue, 15 Dec 2009 20:48:12 +0000 (20:48 +0000)]
enable reuse of MacroArgs objects.  This is a small (2.5%) win
on PR5610 (2.185 -> 2.130s).  The big issue is that this is making
insanely huge macro argument lists with over a million tokens in it.
The reason that mallco and free are so expensive is that we are
actually going to the kernel to get it, and switching to a bump
pointer allocator won't change this in an interesting way.

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

14 years agoUpdate tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
Daniel Dunbar [Tue, 15 Dec 2009 20:14:24 +0000 (20:14 +0000)]
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
 - This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

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

14 years agoIf a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlyin...
Anders Carlsson [Tue, 15 Dec 2009 19:16:31 +0000 (19:16 +0000)]
If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.

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

14 years agoSupport OpenCL 1.1 odd-length vector component accessors.
Nate Begeman [Tue, 15 Dec 2009 18:13:04 +0000 (18:13 +0000)]
Support OpenCL 1.1 odd-length vector component accessors.

For hi/odd of an odd-length vector, the last component is undefined.  Since
we shuffle with an undef vector, no CodeGen needs to change to support this.

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

14 years agoAdd testcase for recent checkin.
Mike Stump [Tue, 15 Dec 2009 18:02:45 +0000 (18:02 +0000)]
Add testcase for recent checkin.

Patch by Chip Davis.

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

14 years agoImplement conditional block invocation rewrite
Fariborz Jahanian [Tue, 15 Dec 2009 17:30:20 +0000 (17:30 +0000)]
Implement conditional block invocation rewrite
and some clean up and a block rewriter test.

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

14 years agoFix some diagnostic-related FIXMEs, from Nicola Gigante
Douglas Gregor [Tue, 15 Dec 2009 16:44:32 +0000 (16:44 +0000)]
Fix some diagnostic-related FIXMEs, from Nicola Gigante

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

14 years agoElaborated types are specifier types, based on a patch from Cornelius
Douglas Gregor [Tue, 15 Dec 2009 16:28:32 +0000 (16:28 +0000)]
Elaborated types are specifier types, based on a patch from Cornelius

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

14 years agoAdd comments.
Zhongxing Xu [Tue, 15 Dec 2009 09:32:42 +0000 (09:32 +0000)]
Add comments.

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

14 years agoRemove displayProgress parameter.
Zhongxing Xu [Tue, 15 Dec 2009 09:09:49 +0000 (09:09 +0000)]
Remove displayProgress parameter.

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

14 years agomove isPodLike<clang::QualType> out to Type.h. We don't
Chris Lattner [Tue, 15 Dec 2009 07:30:12 +0000 (07:30 +0000)]
move isPodLike<clang::QualType> out to Type.h.  We don't
want some clients of QualType to think it's a pod and some to
not know it is.

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

14 years agoupdate to match LLVM API change:
Chris Lattner [Tue, 15 Dec 2009 07:26:51 +0000 (07:26 +0000)]
update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

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

14 years agoAdd -W[no-]variadic-macros support.
Daniel Dunbar [Tue, 15 Dec 2009 05:29:09 +0000 (05:29 +0000)]
Add -W[no-]variadic-macros support.

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

14 years agoForward -isysroot to clang -cc1.
Daniel Dunbar [Tue, 15 Dec 2009 04:55:58 +0000 (04:55 +0000)]
Forward -isysroot to clang -cc1.

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

14 years agoFix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
Daniel Dunbar [Tue, 15 Dec 2009 04:24:24 +0000 (04:24 +0000)]
Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
note_previous_decl was used where note_previous_declaration was intended. Better
names or PR5785 might be nice.

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

14 years agoUntil we can make the dead stores checker smarter, dont' emit dead store warnings...
Ted Kremenek [Tue, 15 Dec 2009 04:12:12 +0000 (04:12 +0000)]
Until we can make the dead stores checker smarter, dont' emit dead store warnings for C++ objects (whose constructors/destructors have possible side-effects).

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

14 years agoFix a small bug in ComputeMethodVtableIndices.
Eli Friedman [Tue, 15 Dec 2009 03:31:17 +0000 (03:31 +0000)]
Fix a small bug in ComputeMethodVtableIndices.

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

14 years agoReally fix this test.
Eli Friedman [Tue, 15 Dec 2009 03:22:41 +0000 (03:22 +0000)]
Really fix this test.

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

14 years agoThis patch should fix PR2461. It allows clang to apply the noreturn
Mike Stump [Tue, 15 Dec 2009 03:11:10 +0000 (03:11 +0000)]
This patch should fix PR2461. It allows clang to apply the noreturn
attribute to function pointers. It also fixes Sema to check function
pointers for the noreturn attribute when checking for fallthrough.

Patch by Chip Davis, with a slight fix to pass the testsuite.

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

14 years agoscan-build/ccc-analyzer: start analyzing C++ FTW.
Ted Kremenek [Tue, 15 Dec 2009 02:35:54 +0000 (02:35 +0000)]
scan-build/ccc-analyzer: start analyzing C++ FTW.

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

14 years agoFix test broken by my last commit.
Eli Friedman [Tue, 15 Dec 2009 02:20:06 +0000 (02:20 +0000)]
Fix test broken by my last commit.

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

14 years agoDiagnose the use of typedefs for template specialization types in the scope
John McCall [Tue, 15 Dec 2009 02:19:47 +0000 (02:19 +0000)]
Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
  typedef Temp<int> MyTemp;
  template <> MyTemp::foo;

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

14 years agoDon't force the emission of destructor definitions.
Eli Friedman [Tue, 15 Dec 2009 02:06:15 +0000 (02:06 +0000)]
Don't force the emission of destructor definitions.

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

14 years agoset up the machinery for a MacroArgs cache hanging off Preprocessor.
Chris Lattner [Tue, 15 Dec 2009 01:51:03 +0000 (01:51 +0000)]
set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time.  This doesn't actually use the
cache yet.

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

14 years agoStart the ball rolling on C++ support in the static analyzer. For
Ted Kremenek [Tue, 15 Dec 2009 01:38:04 +0000 (01:38 +0000)]
Start the ball rolling on C++ support in the static analyzer.  For
now, don't construct CFGs that contain C++ try/catch statements, and
have GRExprEngine abort a path if it encounters a C++ construct it
doesn't understand (which is mostly everything at this point).

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

14 years agoFix spacing.
Mike Stump [Tue, 15 Dec 2009 01:22:35 +0000 (01:22 +0000)]
Fix spacing.

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

14 years agoDriver: Pass -resource-dir to clang -cc1, since the driver presumably already found...
Daniel Dunbar [Tue, 15 Dec 2009 01:02:52 +0000 (01:02 +0000)]
Driver: Pass -resource-dir to clang -cc1, since the driver presumably already found itself.

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

14 years agoEnsure we preserve line information for each trap for
Mike Stump [Tue, 15 Dec 2009 00:59:40 +0000 (00:59 +0000)]
Ensure we preserve line information for each  trap for
-fcatch-undefined-behavior if we aren't optimizing.  WIP.

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

14 years agoSwitch codegen for -fcatch-undefined-bahavior over to __builtin_trap
Mike Stump [Tue, 15 Dec 2009 00:35:12 +0000 (00:35 +0000)]
Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.

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

14 years agoUpdate checker build.
Ted Kremenek [Tue, 15 Dec 2009 00:32:46 +0000 (00:32 +0000)]
Update checker build.

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

14 years agoAdd -resource-dir to clang -cc1, this allows the base directory for compiler
Daniel Dunbar [Tue, 15 Dec 2009 00:06:45 +0000 (00:06 +0000)]
Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

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

14 years agoImplement value initialization in InitializationSequence; untested
Douglas Gregor [Tue, 15 Dec 2009 00:01:57 +0000 (00:01 +0000)]
Implement value initialization in InitializationSequence; untested
WIP, yet again.

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

14 years agoAdd documentation for recently added code. WIP.
Mike Stump [Mon, 14 Dec 2009 23:53:10 +0000 (23:53 +0000)]
Add documentation for recently added code.  WIP.

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

14 years agoFix PR5716 by bandaging over the solution until we can come back to it.
John McCall [Mon, 14 Dec 2009 23:19:40 +0000 (23:19 +0000)]
Fix PR5716 by bandaging over the solution until we can come back to it.
I apologize for friend declarations.

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

14 years agoMake test more generic.
Fariborz Jahanian [Mon, 14 Dec 2009 22:17:35 +0000 (22:17 +0000)]
Make test more generic.

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

14 years agoFix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured...
Ted Kremenek [Mon, 14 Dec 2009 22:15:06 +0000 (22:15 +0000)]
Fix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured block variables that are passed by reference

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

14 years agoWe have to allow one to form an address for one past the end. WIP.
Mike Stump [Mon, 14 Dec 2009 22:14:31 +0000 (22:14 +0000)]
We have to allow one to form an address for one past the end.  WIP.

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

14 years agomove the VarargsElided member of MacrosArgs to shrink the MacroArgs struct
Chris Lattner [Mon, 14 Dec 2009 22:12:52 +0000 (22:12 +0000)]
move the VarargsElided member of MacrosArgs to shrink the MacroArgs struct
on 64-bit targets.  Pass Preprocessor into create/destroy methods of MacroArgs
even though it isn't used yet.

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

14 years agofix typo
Chris Lattner [Mon, 14 Dec 2009 22:02:43 +0000 (22:02 +0000)]
fix typo

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

14 years agoAdd support for detecting undefined shift behavior. WIP.
Mike Stump [Mon, 14 Dec 2009 21:58:14 +0000 (21:58 +0000)]
Add support for detecting undefined shift behavior.  WIP.

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

14 years agoPatch to fix 32-bit @try failure with internal assertion when compiling
Fariborz Jahanian [Mon, 14 Dec 2009 21:35:01 +0000 (21:35 +0000)]
Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).

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

14 years agoRemove accidental commit containing local paths for the LLVM-Code-Syntax test
Douglas Gregor [Mon, 14 Dec 2009 20:58:24 +0000 (20:58 +0000)]
Remove accidental commit containing local paths for the LLVM-Code-Syntax test

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

14 years agoMinor cleanups for constructor initialization in InitializationSequence
Douglas Gregor [Mon, 14 Dec 2009 20:57:13 +0000 (20:57 +0000)]
Minor cleanups for constructor initialization in InitializationSequence

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

14 years agoSimplifiy.
Mike Stump [Mon, 14 Dec 2009 20:52:00 +0000 (20:52 +0000)]
Simplifiy.

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

14 years agoConstructor initialization for InitializationSequence. Untested WIP.
Douglas Gregor [Mon, 14 Dec 2009 20:49:26 +0000 (20:49 +0000)]
Constructor initialization for InitializationSequence. Untested WIP.

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

14 years agoImprove template instantiation for object constructions in several ways:
Douglas Gregor [Mon, 14 Dec 2009 19:27:10 +0000 (19:27 +0000)]
Improve template instantiation for object constructions in several ways:

  - During instantiation, drop default arguments from constructor and
    call expressions; they'll be recomputed anyway, and we don't want
    to instantiate them twice.
  - Rewrote the instantiation of variable initializers to cope with
    non-dependent forms properly.

Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."

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

14 years agoMake test pass in all cases.
Fariborz Jahanian [Mon, 14 Dec 2009 18:38:32 +0000 (18:38 +0000)]
Make test pass in all cases.

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

14 years agoFixes an incomplete test case.
Fariborz Jahanian [Mon, 14 Dec 2009 18:18:29 +0000 (18:18 +0000)]
Fixes an incomplete test case.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 18:00:56 +0000 (18:00 +0000)]
Make tests use the new clang -cc1 flag.

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

14 years agoMake tests use the new clang cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:51:07 +0000 (17:51 +0000)]
Make tests use the new clang cc1 flag.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:47:10 +0000 (17:47 +0000)]
Make tests use the new clang -cc1 flag.

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

14 years agoMake tests use the new clang -cc1 flag.
Fariborz Jahanian [Mon, 14 Dec 2009 17:43:07 +0000 (17:43 +0000)]
Make tests use the new clang -cc1 flag.

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