]> granicus.if.org Git - clang/log
clang
15 years agoFix regression introduced in r80786 and reported in PR 4867. We should use
Ted Kremenek [Thu, 3 Sep 2009 01:48:03 +0000 (01:48 +0000)]
Fix regression introduced in r80786 and reported in PR 4867. We should use
'dyn_cast' instead of 'cast' as the denominator value could be UnknownVal (and
is not guaranteed to be a DefinedVal).

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

15 years agoremove a debug output I introduced in the last commit.
Zhongxing Xu [Thu, 3 Sep 2009 01:31:59 +0000 (01:31 +0000)]
remove a debug output I introduced in the last commit.

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

15 years agoUpdate.
Mike Stump [Thu, 3 Sep 2009 01:30:36 +0000 (01:30 +0000)]
Update.

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

15 years agoAdd CastExpr::getCastKindName and use it in the StmtDumper.
Anders Carlsson [Thu, 3 Sep 2009 00:59:21 +0000 (00:59 +0000)]
Add CastExpr::getCastKindName and use it in the StmtDumper.

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

15 years agoRemove redundant local variable (use newly created instance data).
Steve Naroff [Thu, 3 Sep 2009 00:43:52 +0000 (00:43 +0000)]
Remove redundant local variable (use newly created instance data).

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

15 years agoThis patch does the following.
Fariborz Jahanian [Thu, 3 Sep 2009 00:43:07 +0000 (00:43 +0000)]
This patch does the following.
1) Issue digsnostics in non-fragile ABI, when an expression
   evaluates to an interface type (except when it is used to
   access a non-fragile ivar).
2) Issue unsupported error in fragile ABI when an expression
   evaluates to an interface type (except when it is used to
   access a fragile ivar).

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

15 years agoVisit function/method bodies and issue callback for parameters and local variables.
Steve Naroff [Thu, 3 Sep 2009 00:32:06 +0000 (00:32 +0000)]
Visit function/method bodies and issue callback for parameters and local variables.
Add clang_getTranslationUnitSpelling().

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

15 years agoAdd a wicked little test-case that illustrates what we have to deal
Douglas Gregor [Wed, 2 Sep 2009 23:58:38 +0000 (23:58 +0000)]
Add a wicked little test-case that illustrates what we have to deal
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.

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

15 years agoDon't try to CodeGen using directives, from Anders Johnsen
Douglas Gregor [Wed, 2 Sep 2009 23:49:23 +0000 (23:49 +0000)]
Don't try to CodeGen using directives, from Anders Johnsen

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

15 years agoInitialize targets before parsing command line options, so --version shows registered...
Daniel Dunbar [Wed, 2 Sep 2009 23:20:15 +0000 (23:20 +0000)]
Initialize targets before parsing command line options, so --version shows registered targets.

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

15 years agoMinor refactoring of my last patch.
Fariborz Jahanian [Wed, 2 Sep 2009 23:11:48 +0000 (23:11 +0000)]
Minor refactoring of my last patch.

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

15 years agoReferenced instatiated default constructors
Fariborz Jahanian [Wed, 2 Sep 2009 23:02:57 +0000 (23:02 +0000)]
Referenced instatiated default constructors
must be defined. Fixed pr4853.

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

15 years agoRewrite of our handling of name lookup in C++ member access expressions, e.g.,
Douglas Gregor [Wed, 2 Sep 2009 22:59:36 +0000 (22:59 +0000)]
Rewrite of our handling of name lookup in C++ member access expressions, e.g.,

  x->Base::f

We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.

We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.

I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.

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

15 years agoAdded a FIXME to the test case.
Fariborz Jahanian [Wed, 2 Sep 2009 21:24:14 +0000 (21:24 +0000)]
Added a FIXME to the test case.

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

15 years agoFix an assertion when initializing a union using a member initializer. (We weren...
Anders Carlsson [Wed, 2 Sep 2009 21:14:47 +0000 (21:14 +0000)]
Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).

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

15 years agoChanged abi mode for these test which are dereferencing
Fariborz Jahanian [Wed, 2 Sep 2009 21:06:27 +0000 (21:06 +0000)]
Changed abi mode for these test which are dereferencing
an interface pointer.

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

15 years agoFix a crash when referencing static data members.
Anders Carlsson [Wed, 2 Sep 2009 21:01:21 +0000 (21:01 +0000)]
Fix a crash when referencing static data members.

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

15 years agoUpdate checker build.
Ted Kremenek [Wed, 2 Sep 2009 20:27:08 +0000 (20:27 +0000)]
Update checker build.

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

15 years agoFix warnings.
Eli Friedman [Wed, 2 Sep 2009 20:07:26 +0000 (20:07 +0000)]
Fix warnings.

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

15 years agoBorrow a friend class's previous declaration's access specifier regardless of
John McCall [Wed, 2 Sep 2009 19:32:14 +0000 (19:32 +0000)]
Borrow a friend class's previous declaration's access specifier regardless of
whether the current context is dependent.

Thanks to Anders for pointing this out.

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

15 years agoFix a codegen crash when a class template has a constructor that does member initiali...
Anders Carlsson [Wed, 2 Sep 2009 19:17:55 +0000 (19:17 +0000)]
Fix a codegen crash when a class template has a constructor that does member initialization of an anonymous union.

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

15 years agoFix some newly added bugs uncovered by the RELEASE build.
Steve Naroff [Wed, 2 Sep 2009 18:58:52 +0000 (18:58 +0000)]
Fix some newly added bugs uncovered by the RELEASE build.

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

15 years agoStart issuing callback for references (add some predicates, refactor some code).
Steve Naroff [Wed, 2 Sep 2009 18:26:48 +0000 (18:26 +0000)]
Start issuing callback for references (add some predicates, refactor some code).

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

15 years agoPacked unions should be packed. Fixes an assert Daniel reported.
Anders Carlsson [Wed, 2 Sep 2009 17:51:33 +0000 (17:51 +0000)]
Packed unions should be packed. Fixes an assert Daniel reported.

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

15 years agoAllow null initialization of scalara data members
Fariborz Jahanian [Wed, 2 Sep 2009 17:10:17 +0000 (17:10 +0000)]
Allow null initialization of scalara data members
in constructors's initializer list. pr4854

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

15 years agoFlesh out CXCursorKind...
Steve Naroff [Wed, 2 Sep 2009 13:28:54 +0000 (13:28 +0000)]
Flesh out CXCursorKind...

- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).

Add client data to clang_loadDeclaration() and implement.

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

15 years agoRefactor the check for bad divide into a checker.
Zhongxing Xu [Wed, 2 Sep 2009 13:26:26 +0000 (13:26 +0000)]
Refactor the check for bad divide into a checker.

Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.

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

15 years agoDocument how we intepret C++ DR 382
Douglas Gregor [Wed, 2 Sep 2009 13:12:51 +0000 (13:12 +0000)]
Document how we intepret C++ DR 382

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

15 years agoAdd a few more typename-specifier tests that involve simple-template-ids in the neste...
Douglas Gregor [Wed, 2 Sep 2009 13:07:20 +0000 (13:07 +0000)]
Add a few more typename-specifier tests that involve simple-template-ids in the nested-name-specifier

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

15 years agoWhen parsing typename specifiers (with either the identifier or
Douglas Gregor [Wed, 2 Sep 2009 13:05:45 +0000 (13:05 +0000)]
When parsing typename specifiers (with either the identifier or
simple-template-id form), check whether the scope specifier is
computable as a declaration context rather than checking whether it is
dependent, so that we properly cope with members of the current
instantiation.

Improve testing for typename specifiers that terminate in a
simpe-template-id.

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

15 years agoRefactor bad callee check into a Checker.
Zhongxing Xu [Wed, 2 Sep 2009 08:10:35 +0000 (08:10 +0000)]
Refactor bad callee check into a Checker.
Now bad callee is checked as a PreVisit to the CallExpr.

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

15 years agoStill use BadArg bugtype in the checker. This saves us implement registerInitialVisitors
Zhongxing Xu [Wed, 2 Sep 2009 07:09:39 +0000 (07:09 +0000)]
Still use BadArg bugtype in the checker. This saves us implement registerInitialVisitors
in the BugReport.

When all internal bug checking logic are moved to checkers, BuiltinBug will
not reference GRExprEngine, and FlushReports() will be not necessary, since
all bugs are emitted into the equivalent classes immediately.

For now just add a ctor with no arguments.

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

15 years agoReplace uses of ImmutableSet in SymbolReaper with DenseSet. This was
Ted Kremenek [Wed, 2 Sep 2009 06:03:18 +0000 (06:03 +0000)]
Replace uses of ImmutableSet in SymbolReaper with DenseSet.  This was
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region.  On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s.  For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).

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

15 years agoImplement: <rdar://problem/6337100> CWE-338: Use of cryptographically weak prng
Ted Kremenek [Wed, 2 Sep 2009 02:47:41 +0000 (02:47 +0000)]
Implement: <rdar://problem/6337100> CWE-338: Use of cryptographically weak prng
Patch by Geoff Keating!

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

15 years agoWhen adding a friend class declaration to the lookup tables, use the access specifier
John McCall [Wed, 2 Sep 2009 02:15:17 +0000 (02:15 +0000)]
When adding a friend class declaration to the lookup tables, use the access specifier
of any previous declaration in case we replace it in a class's declaration table.
Fixes bug 4858.  This sort of thing makes me reconsider putting friend declarations in
declaration lists.

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

15 years agoFix a little crasher in friend decls. Thanks again to Eli for finding this.
John McCall [Wed, 2 Sep 2009 01:07:03 +0000 (01:07 +0000)]
Fix a little crasher in friend decls.  Thanks again to Eli for finding this.

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

15 years agoAdd mangling for covariant thunks.
Mike Stump [Wed, 2 Sep 2009 00:56:18 +0000 (00:56 +0000)]
Add mangling for covariant thunks.

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

15 years agoEnsure that the tag decls of friend decls aren't added to the friending class's
John McCall [Wed, 2 Sep 2009 00:55:30 +0000 (00:55 +0000)]
Ensure that the tag decls of friend decls aren't added to the friending class's
decl list, and remove some workarounds that were due to this.  Thanks to Eli for
pointing this out and providing the test case.

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

15 years agoShorten name.
Mike Stump [Wed, 2 Sep 2009 00:28:47 +0000 (00:28 +0000)]
Shorten name.

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

15 years agoAdd mangling for thunks.
Mike Stump [Wed, 2 Sep 2009 00:25:38 +0000 (00:25 +0000)]
Add mangling for thunks.

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

15 years agoTest for my last patch.
Fariborz Jahanian [Wed, 2 Sep 2009 00:05:10 +0000 (00:05 +0000)]
Test for my last patch.

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

15 years agoIt is illegal to derefrercne to an interface in
Fariborz Jahanian [Wed, 2 Sep 2009 00:00:05 +0000 (00:00 +0000)]
It is illegal to derefrercne to an interface in
objc's non-fragile ABI.

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

15 years agoMore overriding base work and some cleanups. WIP.
Mike Stump [Tue, 1 Sep 2009 23:22:44 +0000 (23:22 +0000)]
More overriding base work and some cleanups.  WIP.

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

15 years agoAfter a conversation with Doug. I added a fix me to
Fariborz Jahanian [Tue, 1 Sep 2009 23:08:16 +0000 (23:08 +0000)]
After a conversation with Doug. I added a fix me to
where we build the constructor's initializer list.

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

15 years agoSplit out overriding. WIP.
Mike Stump [Tue, 1 Sep 2009 22:20:28 +0000 (22:20 +0000)]
Split out overriding.  WIP.

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

15 years agoTestcase for recent checkin.
Mike Stump [Tue, 1 Sep 2009 22:01:25 +0000 (22:01 +0000)]
Testcase for recent checkin.

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

15 years agoHandle member expressions that return references correctly.
Anders Carlsson [Tue, 1 Sep 2009 21:18:52 +0000 (21:18 +0000)]
Handle member expressions that return references correctly.

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

15 years agoAssert that we don't have any virtual bases. We can emit dtors for polymorphics class...
Anders Carlsson [Tue, 1 Sep 2009 21:12:16 +0000 (21:12 +0000)]
Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.

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

15 years agoIn CXXBaseOrMemberInitializer, don't confuse CtorTocall with
Douglas Gregor [Tue, 1 Sep 2009 21:04:42 +0000 (21:04 +0000)]
In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
AnonUnionMember. Fixes PR4826.

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

15 years agoUse the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.
Anders Carlsson [Tue, 1 Sep 2009 20:52:42 +0000 (20:52 +0000)]
Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.

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

15 years agoAdd a CK_FunctionToPointerDecay cast kind.
Anders Carlsson [Tue, 1 Sep 2009 20:37:18 +0000 (20:37 +0000)]
Add a CK_FunctionToPointerDecay cast kind.

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

15 years agoWe can generate constructors/destructors with base classes and non-trivial fields...
Anders Carlsson [Tue, 1 Sep 2009 18:33:46 +0000 (18:33 +0000)]
We can generate constructors/destructors with base classes and non-trivial fields just fine now.

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

15 years agoAdd test case from <rdar://problem/7184450>.
Ted Kremenek [Tue, 1 Sep 2009 18:33:16 +0000 (18:33 +0000)]
Add test case from <rdar://problem/7184450>.

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

15 years agoImplement proper substitution for OverloadedFunctionDecls, but substituting each...
Douglas Gregor [Tue, 1 Sep 2009 17:53:10 +0000 (17:53 +0000)]
Implement proper substitution for OverloadedFunctionDecls, but substituting each of the functions in the overload set

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

15 years agoAdd DeclContext::Equals to compare declaration contexts based on their primary contex...
Douglas Gregor [Tue, 1 Sep 2009 17:22:34 +0000 (17:22 +0000)]
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons

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

15 years agoTweak comment based on Daniel's recently added '-emit-ast' option.
Steve Naroff [Tue, 1 Sep 2009 17:13:31 +0000 (17:13 +0000)]
Tweak comment based on Daniel's recently added '-emit-ast' option.

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

15 years ago"The attached patch moves AttributeList::addAttributeList outside the
Douglas Gregor [Tue, 1 Sep 2009 17:10:19 +0000 (17:10 +0000)]
"The attached patch moves AttributeList::addAttributeList outside the
class so as to accomodate one or both parameters being NULL, " from Sean Hunt!

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

15 years agoFixed a property getter ir-gen crash.
Fariborz Jahanian [Tue, 1 Sep 2009 17:02:21 +0000 (17:02 +0000)]
Fixed a property getter ir-gen crash.

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

15 years agoFix a crasher involving template instantiation of non-dependent
Douglas Gregor [Tue, 1 Sep 2009 16:58:52 +0000 (16:58 +0000)]
Fix a crasher involving template instantiation of non-dependent
expressions making use of an overloaded operator. Thanks for the test
case, Anders!

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

15 years agoAdd driver support for -emit-ast and AST compilation steps.
Daniel Dunbar [Tue, 1 Sep 2009 16:57:46 +0000 (16:57 +0000)]
Add driver support for -emit-ast and AST compilation steps.
 - <rdar://problem/7185031> Add 'clang' option '-emit-ast'

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

15 years agoTip-toe around strict-aliasing violation. Fixes PR4061.
Douglas Gregor [Tue, 1 Sep 2009 16:13:00 +0000 (16:13 +0000)]
Tip-toe around strict-aliasing violation. Fixes PR4061.

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

15 years agoAdd explicit "blind" client data to callback function (since we aren't using blocks).
Steve Naroff [Tue, 1 Sep 2009 15:55:40 +0000 (15:55 +0000)]
Add explicit "blind" client data to callback function (since we aren't using blocks).

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

15 years agoMove C++ test over to CodeGenCXX, since it requires CodeGen to reproduce
Douglas Gregor [Tue, 1 Sep 2009 15:39:05 +0000 (15:39 +0000)]
Move C++ test over to CodeGenCXX, since it requires CodeGen to reproduce

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

15 years agoDon't assume that a base is always a RecordType, it can also be a TemplateSpecializat...
Anders Carlsson [Tue, 1 Sep 2009 06:22:14 +0000 (06:22 +0000)]
Don't assume that a base is always a RecordType, it can also be a TemplateSpecializationType. Also, make sure to get the instantiated union member.

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

15 years agoAdd pretty stack traces when instantiating functions and static data members.
Anders Carlsson [Tue, 1 Sep 2009 05:12:24 +0000 (05:12 +0000)]
Add pretty stack traces when instantiating functions and static data members.

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

15 years agoHandle member initializers that point to fields in anonymous structs.
Anders Carlsson [Tue, 1 Sep 2009 04:31:02 +0000 (04:31 +0000)]
Handle member initializers that point to fields in anonymous structs.

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

15 years agoDon't assert when instantiating member references to fields in anonymous structs.
Anders Carlsson [Tue, 1 Sep 2009 04:26:58 +0000 (04:26 +0000)]
Don't assert when instantiating member references to fields in anonymous structs.

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

15 years agoPR4836, part 2: CodeGen for __builtin_isnan.
Eli Friedman [Tue, 1 Sep 2009 04:19:44 +0000 (04:19 +0000)]
PR4836, part 2: CodeGen for __builtin_isnan.

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

15 years agoPreliminary AST representation and semantic analysis for
Douglas Gregor [Tue, 1 Sep 2009 00:37:14 +0000 (00:37 +0000)]
Preliminary AST representation and semantic analysis for
explicitly-specified template argument lists in member reference
expressions, e.g.,

  x->f<int>()

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

15 years agoForce triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).
Daniel Dunbar [Tue, 1 Sep 2009 00:36:20 +0000 (00:36 +0000)]
Force triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).

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

15 years agoSentence-case bug category.
Ted Kremenek [Tue, 1 Sep 2009 00:17:12 +0000 (00:17 +0000)]
Sentence-case bug category.

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

15 years agoRemember to write the qualifier of a MemberExpr to the PCH file when we get to C...
Douglas Gregor [Mon, 31 Aug 2009 23:44:04 +0000 (23:44 +0000)]
Remember to write the qualifier of a MemberExpr to the PCH file when we get to C++ PCH

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

15 years agoEliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
Douglas Gregor [Mon, 31 Aug 2009 23:41:50 +0000 (23:41 +0000)]
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.

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

15 years agoFix bug 4784 and allow friend declarations to properly extend
John McCall [Mon, 31 Aug 2009 22:39:49 +0000 (22:39 +0000)]
Fix bug 4784 and allow friend declarations to properly extend
existing declaration chains.

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

15 years agoRename DIBlock as DILexicalBlock.
Devang Patel [Mon, 31 Aug 2009 22:00:32 +0000 (22:00 +0000)]
Rename DIBlock as DILexicalBlock.

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

15 years agoRename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
Douglas Gregor [Mon, 31 Aug 2009 21:41:48 +0000 (21:41 +0000)]
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
also be adding explicit template arguments as an additional
"adornment". No functionality change.

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

15 years agoAdd parsing for references to member function templates with explicit
Douglas Gregor [Mon, 31 Aug 2009 21:16:32 +0000 (21:16 +0000)]
Add parsing for references to member function templates with explicit
template argument lists, e.g., x.f<int>().

Semantic analysis will be a separate commit.

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

15 years agoPR4836, part 1: add Sema support for __builtin_isnan and friends; they
Eli Friedman [Mon, 31 Aug 2009 20:06:00 +0000 (20:06 +0000)]
PR4836, part 1: add Sema support for __builtin_isnan and friends; they
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.

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

15 years agoImplement template instantiation for member operator access.
Douglas Gregor [Mon, 31 Aug 2009 20:00:26 +0000 (20:00 +0000)]
Implement template instantiation for member operator access.

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

15 years agoSupport explicit C++ member operator syntax, from James Porter!
Douglas Gregor [Mon, 31 Aug 2009 19:52:13 +0000 (19:52 +0000)]
Support explicit C++ member operator syntax, from James Porter!

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

15 years agoRe-implemented generation of objc_memmove_collectable
Fariborz Jahanian [Mon, 31 Aug 2009 19:33:16 +0000 (19:33 +0000)]
Re-implemented generation of objc_memmove_collectable
API for copying GC'able aggregates (Next runtime only).

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

15 years agoFix a -Asserts warning.
Daniel Dunbar [Mon, 31 Aug 2009 19:16:38 +0000 (19:16 +0000)]
Fix a -Asserts warning.

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

15 years agoAdded test cases for presence and absence of __has_feature(objc_nonfragile_abi) with...
David Chisnall [Mon, 31 Aug 2009 16:53:06 +0000 (16:53 +0000)]
Added test cases for presence and absence of __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi.

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

15 years agoUpdated GNU runtime non-fragile ABI.
David Chisnall [Mon, 31 Aug 2009 16:41:57 +0000 (16:41 +0000)]
Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.

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

15 years agoImplement source/line/column hooks.
Steve Naroff [Mon, 31 Aug 2009 14:26:51 +0000 (14:26 +0000)]
Implement source/line/column hooks.

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

15 years agoMore fleshing out the C-based indexing API (under construction).
Steve Naroff [Mon, 31 Aug 2009 00:59:03 +0000 (00:59 +0000)]
More fleshing out the C-based indexing API (under construction).

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

15 years agoMore missing member goodness.
Anders Carlsson [Sun, 30 Aug 2009 07:09:50 +0000 (07:09 +0000)]
More missing member goodness.

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

15 years agoImprove missing error messages as suggested by Doug.
Anders Carlsson [Sun, 30 Aug 2009 06:49:43 +0000 (06:49 +0000)]
Improve missing error messages as suggested by Doug.

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

15 years agoUse DiagnoseMissingMember for UsingDecls.
Anders Carlsson [Sun, 30 Aug 2009 00:58:45 +0000 (00:58 +0000)]
Use DiagnoseMissingMember for UsingDecls.

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

15 years agoImprove diagnostics for missing members. This renames the err_typecheck_no_member...
Anders Carlsson [Sun, 30 Aug 2009 00:54:35 +0000 (00:54 +0000)]
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.

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

15 years agoUnbreak tests. I'll look into why this is necessary later.
Eli Friedman [Sun, 30 Aug 2009 00:53:54 +0000 (00:53 +0000)]
Unbreak tests.  I'll look into why this is necessary later.

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

15 years agoFix the start source location for type-specs like long, short, etc.
Argyrios Kyrtzidis [Sat, 29 Aug 2009 22:39:34 +0000 (22:39 +0000)]
Fix the start source location for type-specs like long, short, etc.

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

15 years agoFix TypeLoc::operator bool().
Argyrios Kyrtzidis [Sat, 29 Aug 2009 22:39:19 +0000 (22:39 +0000)]
Fix TypeLoc::operator bool().

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

15 years agoMake instantiating initializers for classes with a dependent base type
Eli Friedman [Sat, 29 Aug 2009 22:22:07 +0000 (22:22 +0000)]
Make instantiating initializers for classes with a dependent base type
work correctly.

The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I
couldn't figure out a good way to avoid it.

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

15 years agoMake IRGen for initializing a member reference work correctly.
Eli Friedman [Sat, 29 Aug 2009 20:58:20 +0000 (20:58 +0000)]
Make IRGen for initializing a member reference work correctly.

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

15 years agoAdd a workaround for decls that come from friend decls pointing to undeclared classes.
Anders Carlsson [Sat, 29 Aug 2009 20:47:47 +0000 (20:47 +0000)]
Add a workaround for decls that come from friend decls pointing to undeclared classes.

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

15 years agoIn DeclPrinter, assert when asked to print AS_None.
Anders Carlsson [Sat, 29 Aug 2009 20:36:12 +0000 (20:36 +0000)]
In DeclPrinter, assert when asked to print AS_None.

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

15 years agoPatch to ir-gen user-defined conversions used in expressions
Fariborz Jahanian [Sat, 29 Aug 2009 20:33:32 +0000 (20:33 +0000)]
Patch to ir-gen user-defined conversions used in expressions
[12.3.2-p3]

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

15 years agoSet the access specifier for using decls.
Anders Carlsson [Sat, 29 Aug 2009 19:54:19 +0000 (19:54 +0000)]
Set the access specifier for using decls.

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

15 years agoImprove instantiation of UnresolvedUsingDecls.
Anders Carlsson [Sat, 29 Aug 2009 19:37:28 +0000 (19:37 +0000)]
Improve instantiation of UnresolvedUsingDecls.

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