Chris Lattner
3d954d5d0e
simplify
...
llvm-svn: 68000
2009-03-29 16:04:50 +00:00
Sebastian Redl
4c0cd856b1
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.
...
llvm-svn: 67999
2009-03-29 15:27:50 +00:00
Chris Lattner
4de55aa4f2
reduce indentation with an early exit.
...
llvm-svn: 67997
2009-03-29 14:02:43 +00:00
Chris Lattner
63595ddcb5
switch TemplateOrInstantiation to be a PointerUnion, which
...
simplifies some code.
llvm-svn: 67993
2009-03-29 07:03:59 +00:00
Chris Lattner
51ce02d264
change another PointerIntPair into a PointerUnion.
...
llvm-svn: 67991
2009-03-29 06:43:22 +00:00
Chris Lattner
b81eb052f2
switch DeclBase::DeclCtx to the new happy and type-safe
...
llvm::PointerUnion class.
llvm-svn: 67988
2009-03-29 06:06:59 +00:00
Chris Lattner
85e2e141db
various cleanups
...
llvm-svn: 67981
2009-03-29 05:01:10 +00:00
Chris Lattner
20d79aa1c2
adjust to llvm mainline changes.
...
llvm-svn: 67980
2009-03-29 04:32:54 +00:00
Chris Lattner
114597d69b
tighten this up, the decl *must* be a declcontext, no need for the dynamic check.
...
llvm-svn: 67978
2009-03-29 04:30:19 +00:00
Eli Friedman
bbcf49e410
Initial implementation of ARM ABI. Mostly untested. Note that I'm not
...
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works. It should be a decent start,
though.
llvm-svn: 67969
2009-03-29 00:15:25 +00:00
Chris Lattner
a59a3e2d10
QualType can go in SmallPtrSet now, simplify code that used to have
...
to work around this.
llvm-svn: 67968
2009-03-29 00:04:01 +00:00
Anders Carlsson
bb1e4724f1
More improvements to namespace aliases. We now support everything except aliases in using directives.
...
llvm-svn: 67966
2009-03-28 23:53:49 +00:00
Anders Carlsson
3694935cd2
Fix lookup bug
...
llvm-svn: 67964
2009-03-28 23:49:35 +00:00
Anders Carlsson
f03bb51a00
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls.
...
llvm-svn: 67963
2009-03-28 23:02:53 +00:00
Anders Carlsson
ff25fdf2fb
Create AST nodes for namespace aliases.
...
llvm-svn: 67962
2009-03-28 22:58:02 +00:00
Anders Carlsson
47952aec09
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.
...
llvm-svn: 67961
2009-03-28 22:53:22 +00:00
Ted Kremenek
035cf930d5
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
...
<rdar://problem/6732151>.
llvm-svn: 67954
2009-03-28 19:59:33 +00:00
Chris Lattner
83f095cc7e
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
...
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.
Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.
We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.
The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.
llvm-svn: 67952
2009-03-28 19:18:32 +00:00
Ted Kremenek
b505811250
Adjust control-flow endpoints for '&&' and '||'.
...
llvm-svn: 67948
2009-03-28 17:33:57 +00:00
Cedric Venet
351c71a85f
CMake: remove TranslationUnit.cpp from build (file has been removed).
...
llvm-svn: 67944
2009-03-28 12:41:49 +00:00
Anders Carlsson
b81608499e
As Eli pointed out, it is possible that a namespace lookup is ambiguous!
...
llvm-svn: 67932
2009-03-28 07:51:31 +00:00
Chris Lattner
6b6185b18f
some random cleanups
...
llvm-svn: 67928
2009-03-28 06:53:40 +00:00
Anders Carlsson
ac2c96528f
Check that the alias points to a valid namespace.
...
llvm-svn: 67925
2009-03-28 06:42:02 +00:00
Ted Kremenek
ae1aa43617
Properly escape special characters in <string>'s in plist file.
...
llvm-svn: 67924
2009-03-28 06:40:54 +00:00
Chris Lattner
529efc74ad
rename some methods.
...
llvm-svn: 67923
2009-03-28 06:33:19 +00:00
Chris Lattner
23b88b73e1
Cleanups for DeclGroup.
...
llvm-svn: 67922
2009-03-28 06:26:18 +00:00
Anders Carlsson
dca83c4676
Check that the namespace alias doesn't conflict with a previous declaration in this scope.
...
llvm-svn: 67921
2009-03-28 06:23:46 +00:00
Chris Lattner
2f14ce0a74
tidy whitespace.
...
llvm-svn: 67920
2009-03-28 06:13:37 +00:00
Chris Lattner
fcd33a68e4
rename NextDeclInScope to NextDeclInContext, since the pointer
...
points within contexts not scopes.
llvm-svn: 67919
2009-03-28 06:04:26 +00:00
Anders Carlsson
9205d55390
Add an ActOnNamespaceAliasDef action and have the parser call it.
...
llvm-svn: 67915
2009-03-28 05:27:17 +00:00
Chris Lattner
1ad4eeb9c7
remove TranslationUnit.
...
llvm-svn: 67914
2009-03-28 04:31:31 +00:00
Chris Lattner
a5adead17b
push more ASTContext goodness out through interfaces that use
...
TranslationUnit
llvm-svn: 67913
2009-03-28 04:27:18 +00:00
Anders Carlsson
72f307a26e
Revert Sebastian's rvalue patch (r67870) since it caused test failures in
...
SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp
llvm-svn: 67912
2009-03-28 04:17:27 +00:00
Chris Lattner
66918ee148
remove TranslationUnit from ParseAST.
...
llvm-svn: 67911
2009-03-28 04:13:34 +00:00
Chris Lattner
cf16983179
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit
...
llvm-svn: 67910
2009-03-28 04:11:33 +00:00
Ted Kremenek
cd58cced81
Text PathDiagnosticBuilder::getEnclosingStmt() about '?'
...
llvm-svn: 67909
2009-03-28 04:08:14 +00:00
Anders Carlsson
1894f0d499
Parse namespace aliases.
...
llvm-svn: 67908
2009-03-28 04:07:16 +00:00
Chris Lattner
d070278ec9
simplify away some dead ownership stuff, TranslationUnit is now
...
just a wrapper around ASTContext.
llvm-svn: 67906
2009-03-28 04:00:23 +00:00
Chris Lattner
edf7eb77cf
hoist TranslationUnit some more.
...
llvm-svn: 67905
2009-03-28 03:56:54 +00:00
Chris Lattner
96c339a661
eliminate some wrappers.
...
llvm-svn: 67904
2009-03-28 03:53:02 +00:00
Chris Lattner
f7d9e2ba1c
eliminate ReadASTBitcodeFile
...
llvm-svn: 67903
2009-03-28 03:49:26 +00:00
Chris Lattner
d286851b57
move serialization logic from TranslationUnit to ASTContext.
...
llvm-svn: 67902
2009-03-28 03:45:20 +00:00
Ted Kremenek
b9411565ea
Teach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
...
etc., so that the "body" is always considered a top-level statement for edge
transitions (even if it is an expression).
llvm-svn: 67901
2009-03-28 03:37:59 +00:00
Eli Friedman
754d5ac658
Trivial cleanup.
...
llvm-svn: 67899
2009-03-28 03:27:06 +00:00
Eli Friedman
09a9b6e335
Move where block-related variables are initialized so that block
...
types don't get generated when blocks aren't used.
llvm-svn: 67898
2009-03-28 03:24:54 +00:00
Eli Friedman
9127aa1caf
Minor cleanup.
...
llvm-svn: 67896
2009-03-28 03:10:45 +00:00
Eli Friedman
e381f7e3e9
Misc small fixes/cleanups/comment changes.
...
llvm-svn: 67895
2009-03-28 02:45:41 +00:00
Chris Lattner
5cf49fe587
eliminate ASTConsumer::InitializeTU, all clients are
...
happy with just ASTContext, they don't need a TU.
llvm-svn: 67894
2009-03-28 02:18:25 +00:00
Chris Lattner
a6f4ca2b6f
remove TranslationUnit::OwnsDecls, which is only set, never read.
...
llvm-svn: 67891
2009-03-28 01:44:40 +00:00
Chris Lattner
84bcc4795e
simplify ParseAST by sucking -disable-free handling logic up into
...
clang.cpp
llvm-svn: 67890
2009-03-28 01:37:17 +00:00