Commit Graph

8422 Commits

Author SHA1 Message Date
Steve Naroff 40e1fd1f79 Add missing castToDeclContext/castFromDeclContext hooks.
llvm-svn: 61939
2009-01-08 20:35:58 +00:00
Steve Naroff 5ca5f4bc0a Remove a dead decl.
llvm-svn: 61938
2009-01-08 20:22:04 +00:00
Steve Naroff 6c879a1448 Move FIXME to a better location.
llvm-svn: 61937
2009-01-08 20:17:34 +00:00
Steve Naroff e538c5f3ae Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.
Moved logic to Sema::ProcessPropertyDecl().

llvm-svn: 61936
2009-01-08 20:15:03 +00:00
Steve Naroff 11b387fee0 Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!

llvm-svn: 61935
2009-01-08 19:41:02 +00:00
Ted Kremenek 6ad2b3ac18 Initialized member variable 'Implicit' in Decl's ctor.
llvm-svn: 61930
2009-01-08 18:54:40 +00:00
Steve Naroff 35c62ae632 This is a large/messy diff that unifies the ObjC AST's with DeclContext.
- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.

llvm-svn: 61929
2009-01-08 17:28:14 +00:00
Zhongxing Xu 550c1c46f9 Add isSubRegionOf() method to SubRegion.
llvm-svn: 61924
2009-01-08 13:17:14 +00:00
Zhongxing Xu caeab626e4 Fix comment because we could have arbitrary number of overloaded functions with
the same name.

llvm-svn: 61920
2009-01-08 07:37:03 +00:00
Ted Kremenek d5e6e16d0d PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):

- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%

These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.

With these changes, here's how PTH compares to non-PTH on Cocoa.h:
  -Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
  -fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)

llvm-svn: 61913
2009-01-08 04:30:32 +00:00
Ted Kremenek 884a558441 PTH:
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
  spellings from the PTH file.  This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
  when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.

llvm-svn: 61911
2009-01-08 02:47:16 +00:00
Ted Kremenek 5423c53b59 Remove debugging variable I forgot to remove in my last commit.
llvm-svn: 61910
2009-01-08 02:44:52 +00:00
Ted Kremenek 17f09da0a4 Cache the "spellings" of string, character, and numeric literals in the PTH
file. For Cocoa.h, this enlarges the PTH file by 310K (4%).

llvm-svn: 61909
2009-01-08 02:44:06 +00:00
Ted Kremenek 352b8bacdc Refactor CacheTokens to use a PTHWriter class that creates and manages most of the PTH generation data structures. No functionality change.
llvm-svn: 61902
2009-01-08 01:17:37 +00:00
Fariborz Jahanian 17290c3638 Objc's compatibility-alias semantics and code
gen issue fix.

llvm-svn: 61901
2009-01-08 01:10:55 +00:00
Ted Kremenek f929b0aefe Update some doxygen comments to be more rich. Remove StoreManager::GetRegionSVal.
llvm-svn: 61894
2009-01-07 22:56:17 +00:00
Ted Kremenek 682c3a6dd6 Refactor MemRegionManager instance variable into parent class. No functionality change.
llvm-svn: 61888
2009-01-07 22:18:50 +00:00
Douglas Gregor f325278799 Fix PR clang/3291
llvm-svn: 61886
2009-01-07 21:36:02 +00:00
Douglas Gregor f09c2dc8e0 Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions
llvm-svn: 61885
2009-01-07 21:26:07 +00:00
Fariborz Jahanian dd2d75bb52 Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.

llvm-svn: 61882
2009-01-07 21:01:41 +00:00
Fariborz Jahanian 475831bd6e Another nasty code gen. bug with trivial fix. Calling class
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.

llvm-svn: 61880
2009-01-07 20:11:22 +00:00
Douglas Gregor f4d332797b Finished semantic analysis of anonymous unions in C++.
Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.

llvm-svn: 61878
2009-01-07 19:46:03 +00:00
Daniel Dunbar f8b5992b80 ccc: Make proper synthetic arguments in places we have to construct
"fake" options, allowing Tools to be oblivious to whether an argument
is real or synthetic. This kills off DerivedArg & a number of FIXMEs.

llvm-svn: 61871
2009-01-07 18:54:26 +00:00
Daniel Dunbar 7792e90f83 ccc: Change Command to take list of strings for argv instead of Arg
instances; this just complicated things and doesn't seem to provide
any benefit.

llvm-svn: 61869
2009-01-07 18:40:45 +00:00
Steve Naroff 639de9ccd9 ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.

llvm-svn: 61866
2009-01-07 17:57:40 +00:00
Douglas Gregor e955880357 Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts
llvm-svn: 61861
2009-01-07 16:34:42 +00:00
Douglas Gregor 4bba1ed9bc Test case for anonymous unions in C++
llvm-svn: 61860
2009-01-07 16:22:09 +00:00
Douglas Gregor 8d973111a8 When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.

llvm-svn: 61848
2009-01-07 02:48:43 +00:00
Daniel Dunbar de482c408c ccc: Extend ArgList to support indexing into a synthetic arg array
(for killing off DerivedArg).

llvm-svn: 61846
2009-01-07 01:57:39 +00:00
Daniel Dunbar d315a274aa ccc: Refactor so that all accesses to actual input strings go through
the ArgList.

llvm-svn: 61844
2009-01-07 01:29:28 +00:00
Ted Kremenek 4cfd63b5a4 Update checker build.
llvm-svn: 61843
2009-01-07 01:10:24 +00:00
Douglas Gregor 9ac7a0707d Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.

Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.

llvm-svn: 61840
2009-01-07 00:43:41 +00:00
Ted Kremenek 1d92d2c813 This commit reflects changes to the retain/release checker motivated by my
recent discussions with Thomas Clement and Ken Ferry concerning the "fundamental
rule" for Cocoa memory management
(http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html).

Here is the revised behavior of the checker concerning tracking retain/release
counts for objects returned from message expressions involving instance methods:

1) Track the returned object if the return type of the message expression is
id<..>, id, or a pointer to *any* object that subclasses NSObject. Such objects
are assumed to have a retain count. Previously the checker only tracked objects
when the receiver of the message expression was part of the standard Cocoa API
(i.e., had class names prefixed with 'NS'). This should significantly expand the
amount of checking performed.

2) Consider the object owned if the selector of the message expression contains
"alloc", "new", or "copy". Previously we also considered "create", but this
doesn't follow from the fundamental rule (discussions with the Cocoa folks
confirms this).

llvm-svn: 61837
2009-01-07 00:39:56 +00:00
Daniel Dunbar 1b90e1cd17 ccc (old): Pass -arch through to assembler if given.
llvm-svn: 61833
2009-01-07 00:03:20 +00:00
Douglas Gregor 6ad0ef5091 Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.

llvm-svn: 61832
2009-01-06 23:51:29 +00:00
Ted Kremenek 763ea559ac SourceManager: Implement "lazy" creation of MemBuffers for source files.
- Big Idea:
   Source files are now mmaped when ContentCache::getBuffer() is first called.
   While this doesn't change the functionality when lexing regular source files,
   it can result in source files not being paged in when using PTH.

- Performance change:
  - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing
    regular source lexing.
  - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using
    PTH. We do observe, however, a reduction of 279K in memory mapped source
    code (3% reduction). The majority of pages from Cocoa.h (and friends) are
    still being pulled in, however, because any literal will cause
    Preprocessor::getSpelling() to be called (causing the source for the file to
    get pulled in). The next possible optimization is to cache literal strings
    in the PTH file to avoid the need for the original header sources entirely.

- Right now there is a preprocessor directive to toggle between "lazy" and
  "eager" creation of MemBuffers. This is not permanent, and is there in the
  short term to just test additional optimizations.

llvm-svn: 61827
2009-01-06 22:43:04 +00:00
Ted Kremenek 63a55ab079 Remove redunant (and incorrect) call to SourceManager::PrintStats(). This would be called after a SourceManager was 'cleared', so it printed bogus results. Moreover, these stats are already printed earlier in the code path.
llvm-svn: 61825
2009-01-06 22:16:26 +00:00
Steve Naroff f192fabbdc Another tweak to handle the MS extensions (<rdar://problem/5956221>).
llvm-svn: 61821
2009-01-06 19:34:12 +00:00
Ted Kremenek 016056cfde Add whitespace to silence the following warning in a Release build: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement
llvm-svn: 61820
2009-01-06 19:17:58 +00:00
Ted Kremenek 47ad37dbe4 Return UnknownVal in RegionStoreManager::getSizeInElements() for unsupported regions. This silences a warning when compiling Release-Asserts builds.
llvm-svn: 61818
2009-01-06 19:12:06 +00:00
Fariborz Jahanian 6e7ecc84c8 Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.

llvm-svn: 61817
2009-01-06 18:56:31 +00:00
Steve Naroff 1f42c2e94d Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.
This fix is C++ specific.

llvm-svn: 61816
2009-01-06 17:40:00 +00:00
Cedric Venet 9fee535c84 Fix a typo.
llvm-svn: 61815
2009-01-06 16:22:54 +00:00
Chris Lattner ce1da2cfca - Various comment typo fixes in Sema.h
- Simplify ParseDeclCXX to use early exit on error instead of nesting.
- Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume.
- If we don't see the ; in a using directive, still call the action, for 
  hopefully better error recovery.

llvm-svn: 61801
2009-01-06 07:27:21 +00:00
Chris Lattner 8dca2e9a4e it is ok to insert empty source ranges into diagnostics, declare variable in an if.
llvm-svn: 61800
2009-01-06 07:24:29 +00:00
Chris Lattner a7c7095b42 simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate.
llvm-svn: 61799
2009-01-06 07:20:03 +00:00
Douglas Gregor d05cb418fd Minor tweaks to the transparent declcontext patch
llvm-svn: 61798
2009-01-06 07:17:58 +00:00
Chris Lattner 4f149f2611 add a helper method.
llvm-svn: 61797
2009-01-06 07:16:40 +00:00
Chris Lattner a448d75b2a rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.

llvm-svn: 61796
2009-01-06 06:59:53 +00:00
Chris Lattner 9b01ca1f5a minor code cleanups, reduce indentation since 'if' block can't fall through.
llvm-svn: 61795
2009-01-06 06:55:51 +00:00
Daniel Dunbar 697867dadd ccc: Remove ValueArg::setValue, this is no longer used.
llvm-svn: 61794
2009-01-06 06:32:49 +00:00
Daniel Dunbar 85a868f8cc ccc: Track last actual argument instance for each option & change
driver to lookup this way instead of manually scanning arguments in
multiple places.

llvm-svn: 61793
2009-01-06 06:12:13 +00:00
Chris Lattner 479ecd7151 document annotation tokens.
llvm-svn: 61792
2009-01-06 06:02:08 +00:00
Chris Lattner f96b08302f Make Token::setLength assert that the token is not an annotation token.
llvm-svn: 61791
2009-01-06 05:25:04 +00:00
Douglas Gregor 7db908614c Oops. Un-publicify SrcMgr::ContentCache::Buffer.
llvm-svn: 61790
2009-01-06 05:11:04 +00:00
Douglas Gregor c7acfdfe9a Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
  1) The use of a qualified-id instead of an unqualified-id suppresses
     argument-dependent lookup
  2) If the name refers to a virtual function, the qualified-id
  version will call the function determined statically while the
  unqualified-id version will call the function determined dynamically
  (by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.

llvm-svn: 61789
2009-01-06 05:10:23 +00:00
Chris Lattner a8a3f73a47 rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and  more accurate.  The type name might not be qualified.

llvm-svn: 61788
2009-01-06 05:06:21 +00:00
Chris Lattner 913e797257 add TypeTraits.h to the Xcode project
llvm-svn: 61787
2009-01-06 05:04:13 +00:00
Chris Lattner c7594438c7 use getBuffer() to fix compile error. Ted, please review.
llvm-svn: 61786
2009-01-06 04:47:20 +00:00
Daniel Dunbar e5e454e199 ccc: Use dummy InputOption and UnknownOption classes instead of
InputArg and UnknownArg.
 - Every argument now always corresponds to some option, which
   simplifies other code.

llvm-svn: 61783
2009-01-06 02:30:10 +00:00
Ted Kremenek 12c2af44e9 Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

llvm-svn: 61782
2009-01-06 01:55:26 +00:00
Daniel Dunbar e31bfdd7c7 ccc: Introduce ArgList for keeping input argv & parsed Args together.
llvm-svn: 61780
2009-01-06 01:35:44 +00:00
Chris Lattner 610c87cad6 rename these tests to match the attribute.
llvm-svn: 61770
2009-01-05 23:10:19 +00:00
Chris Lattner 933d5ffc11 Optimize stringification a bit to avoid std::string thrashing and
avoid the version of Preprocessor::getSpelling that returns an 
std::string.

llvm-svn: 61769
2009-01-05 23:04:18 +00:00
Daniel Dunbar 0d2bfec51d Remainder is only valid on integer vector operands.
Improve ext vector test case.

llvm-svn: 61766
2009-01-05 22:55:36 +00:00
Daniel Dunbar 8f8e40a324 Back out code for handling VectorType's in getFloatingRank.
llvm-svn: 61764
2009-01-05 22:44:35 +00:00
Daniel Dunbar 060d5e248e Use CheckVectorOperands when % is applied to a vector type.
llvm-svn: 61763
2009-01-05 22:42:10 +00:00
Daniel Dunbar a1f3441d50 Implement getFloatingRank() for extended vectors.
- I'm not sure this is appropriate, but it seems reasonable to be
   able to call getFloatingRank on anything which isFloatingType().

llvm-svn: 61758
2009-01-05 22:14:37 +00:00
Sebastian Redl 1654ef0187 Silence a GCC warning
llvm-svn: 61747
2009-01-05 20:53:53 +00:00
Sebastian Redl baad4e765f PODness and Type Traits
Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).

llvm-svn: 61746
2009-01-05 20:52:13 +00:00
Daniel Dunbar 6e01600398 Add prototype ccc rewrite.
- Entry point is tools/ccc/xcc until we are a functional replacement
   for ccc.

This is highly experimental (FIXME/LOC ratio of 3.4%), quite crufty,
and barely usable (and then only on my specific Darwin). However, many
of the right ideas are present, and it already fixes a number of
things gcc gets wrong.

The major missing component is argument translation for tools
(translating driver arguments into cc1/ld/as/etc. arguments). This is
a large part of the driver functionality and will probably double the
LOC, but my hope is that the current architecture is relatively
stable.

Documentation & motivation to follow soon...

llvm-svn: 61739
2009-01-05 19:53:30 +00:00
Douglas Gregor 3bdc895818 Add forgotten test case for linkage specifications
llvm-svn: 61737
2009-01-05 19:50:09 +00:00
Douglas Gregor 07665a69e8 Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.

llvm-svn: 61735
2009-01-05 19:45:36 +00:00
Chris Lattner 07ebf302e5 simplify Preprocessor::getSpelling now that identifiers carry around
their length.

llvm-svn: 61734
2009-01-05 19:44:41 +00:00
Douglas Gregor cfc7022a7b Fix an uninitialized-variable warning
llvm-svn: 61700
2009-01-05 17:18:30 +00:00
Chris Lattner 8a7d10d753 remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.

llvm-svn: 61671
2009-01-05 03:55:46 +00:00
Chris Lattner 6b87b9d84e simplify some code.
llvm-svn: 61668
2009-01-05 02:07:19 +00:00
Chris Lattner da0300870f Rearrange some code in TryAnnotateTypeOrScopeToken to make it
early exit for C and avoid template lookup for C.

llvm-svn: 61667
2009-01-05 01:49:50 +00:00
Chris Lattner c69537feb5 Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode.  This was just using the wrong predicate.

llvm-svn: 61666
2009-01-05 01:42:04 +00:00
Anders Carlsson e298a1775d Pass '-undefined- to the linker
llvm-svn: 61663
2009-01-05 01:24:39 +00:00
Chris Lattner b5134c05b9 TryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.

llvm-svn: 61662
2009-01-05 01:24:05 +00:00
Anders Carlsson d8cd7b6c34 Generate debug info for VLA types
llvm-svn: 61661
2009-01-05 01:23:29 +00:00
Chris Lattner 6fead6e33b add a testcase
llvm-svn: 61660
2009-01-05 00:59:08 +00:00
Chris Lattner 45ddec319e ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a 
hard error now that it may never be transitively called in a 
context where these are legal.  This allows me to start 
disentangling things more.

llvm-svn: 61659
2009-01-05 00:13:00 +00:00
Chris Lattner bd31aa3b05 sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers. 

llvm-svn: 61657
2009-01-05 00:07:25 +00:00
Chris Lattner a21db61ed9 Simplify some control flow and remove a call to TryAnnotateCXXScopeToken
that isn't doing what is desired. It was annotating the current token
not the 'next' token.  This code should be fixed.

llvm-svn: 61656
2009-01-04 23:51:17 +00:00
Chris Lattner 1f69ebb5fa code simplification
llvm-svn: 61654
2009-01-04 23:46:59 +00:00
Chris Lattner 020bab992e sink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
can interact with.

llvm-svn: 61652
2009-01-04 23:41:41 +00:00
Chris Lattner b7895c4180 push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
down into the two cases that it can possibly affect.  This avoids calls
to it that obviously can't do anything.

llvm-svn: 61651
2009-01-04 23:33:56 +00:00
Chris Lattner 9a8968b50d my previous patch caused sema to drop the global qualifier, make
sure to pass it down.  This makes the code a bit gross, I will clean
it up in subsequent commits.

llvm-svn: 61650
2009-01-04 23:23:14 +00:00
Chris Lattner 122db26b28 sink the call to TryAnnotateTypeOrScopeToken in
ParseCastExpression into the switch.  This gets it out of the hot
path through ParseCastExpression for all the non-identifier and 
non-:: tokens.

llvm-svn: 61643
2009-01-04 22:52:14 +00:00
Chris Lattner dfa1a45abd use early exits to reduce nesting.
llvm-svn: 61642
2009-01-04 22:32:19 +00:00
Chris Lattner 8a38aa83da simplify control flow by removing a goto.
llvm-svn: 61641
2009-01-04 22:28:21 +00:00
Chris Lattner 109faf2b8b eliminate lookahead when parsing ::new / ::delete.
llvm-svn: 61638
2009-01-04 21:25:24 +00:00
Chris Lattner f9b2cd4d92 minor simplifications.
llvm-svn: 61637
2009-01-04 21:14:15 +00:00
Anders Carlsson 762e162284 Fix the bug that would cause Python to crash at startup.
When emitting the static variables we need to make sure that the order is preserved. 
Fix this by making StaticDecls a std::list which has O(1) random removal.

llvm-svn: 61621
2009-01-04 02:08:04 +00:00
Bill Wendling be504e82bc Rename AddReadAttrs to FunctionAttrs. This is related to Duncan's patch r61525.
llvm-svn: 61534
2008-12-31 19:51:31 +00:00
Anders Carlsson 37e0088610 Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand
llvm-svn: 61515
2008-12-31 07:27:38 +00:00
Douglas Gregor d7c4d984d0 Parser support for C++ using directives, from Piotr Rak
llvm-svn: 61486
2008-12-30 03:27:21 +00:00
Fariborz Jahanian 408035072b Remove hasKind(). Use existing getKind().
llvm-svn: 61476
2008-12-29 19:57:17 +00:00