Commit Graph

2039 Commits

Author SHA1 Message Date
Steve Naroff f73590dbb1 Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.

#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.

#3: It results in many API simplifications. Here are some highlights:

- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).

I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.

Thanks to Chris for talking this through with me and suggesting this approach. 

llvm-svn: 42395
2007-09-27 14:38:14 +00:00
Chris Lattner e6d9ca5443 objc messages have side effects, return true from hasLocalSideEffect,
fixing:

VoidMethod.m:14:5: warning: expression result unused
    [Greeter hello];
    ^~~~~~~~~~~~~~~

llvm-svn: 42380
2007-09-26 22:06:30 +00:00
Ted Kremenek d80ee7d287 Added extra guard for null Stmt* when traversing the AST using VisitChildren.
Added assertion that Block-level statements should not be NULL.

llvm-svn: 42376
2007-09-26 21:36:20 +00:00
Ted Kremenek 5c50fd1add Fixed two bugs in CFG construction:
BUG 1) 

CFG failed to build for empty functions, or functions containing only
NullStmts or empty compound statements.

We now handle such cases, although now we cannot test for CFG
construction failure by asserting that the last block constructed is
not NULL (since it now may be).

BUG 2)

CFG construction segfaulted on some cases when walking the AST and not
taking into account that some children of a statement may be NULL.

llvm-svn: 42370
2007-09-26 21:23:31 +00:00
Ted Kremenek 0883fd5817 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.

llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Ted Kremenek a054c5bedd Moved "VerifyDiagnostics" variable declaration to right below ProgAction
declaration.  This is because this option is logically tightly connected
to the actions defined in ProgAction.

llvm-svn: 42364
2007-09-26 19:42:19 +00:00
Ted Kremenek cbd2af8a0a Removed inclusion of <memory>, which is no longer needed since we
aren't used auto_ptr's anymore.

llvm-svn: 42363
2007-09-26 19:41:07 +00:00
Ted Kremenek 8742a45565 Refactored driver so that any action that is implemented using an
ASTConsumer can also be verified using the diagnostics checker.  From
the command line, users may activate diagnostic checking using the
"-verify" option.  For example, "clang -verify -warn-dead-stores"
checks if the warnings flagged by the dead store checker match those
in the comments.

Note that we still have the option "-parse-ast-check" for backwards
comptability with existing test cases.  This option is now equivalent to 
"-parse-ast -verify".

llvm-svn: 42362
2007-09-26 18:39:29 +00:00
Fariborz Jahanian 2a4dd316a0 This patch inserts ivars declared in @implementation in its object and verifies
that they conform(in type, name and numbers) to those declared in @interface. 
Test case highlights kind of checking we do here.

llvm-svn: 42360
2007-09-26 18:27:25 +00:00
Fariborz Jahanian 19529eec8a Removed a few TODOs on things which are done.
llvm-svn: 42358
2007-09-26 17:03:44 +00:00
Chris Lattner f7ab334803 Handle (int)1.0e40 as an i-c-e.
llvm-svn: 42334
2007-09-26 00:47:26 +00:00
Hartmut Kaiser fcecf23d48 Updated VC++ build system.
llvm-svn: 42330
2007-09-25 23:32:45 +00:00
Ted Kremenek a88f7bcea3 Updated XCode project to reflect that DataflowValues.h and DataflowSolver.h have
moved to include/clang/Analysis/FlowSensitive.

llvm-svn: 42327
2007-09-25 22:45:38 +00:00
Ted Kremenek 39fc60f280 Moved "DataflowSolver.h" to the "include/" subtree. Adjusted client
code that uses the solver to reflect the new location.

Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses.  Moved
"DataflowValues.h" into this subdirectory.

llvm-svn: 42320
2007-09-25 21:00:24 +00:00
Fariborz Jahanian e2017c1d1d Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacy
objective-c code with no @interface declaration.

llvm-svn: 42319
2007-09-25 21:00:20 +00:00
Ted Kremenek 9c3fe8d2e8 Fixed broken English in comment.
llvm-svn: 42317
2007-09-25 20:37:28 +00:00
Fariborz Jahanian bfe13c566c This patch introduces a new class to keep track of class implementation info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of 
checking being done in this patch.

llvm-svn: 42311
2007-09-25 18:38:09 +00:00
Ted Kremenek 558be36672 Added "CheckASTConsumer", a function that generalizes
"CheckDiagnostics" (used for -parse-ast-check) to check the
diagnostics of any ASTConsumer.

Reimplemented CheckDiagnostics to use CheckASTConsumer instead.

Added driver option -warn-dead-stores-check, which checks the
diagnostics generated by the DeadStores checker.  This is implemented
using CheckASTConsumer.111

llvm-svn: 42310
2007-09-25 18:37:20 +00:00
Ted Kremenek 2826f6e63f Changed command line options "-check-dead-stores" and
"-check-uninit-values" to "-warn-dead-stores" and
"-warn-uninit-values"

llvm-svn: 42307
2007-09-25 18:05:45 +00:00
Ted Kremenek 2af52eb454 Comment formatting changes. No real content changes.
llvm-svn: 42305
2007-09-25 17:53:38 +00:00
Ted Kremenek 67f6ea19d7 Minor comment changes.
llvm-svn: 42304
2007-09-25 17:51:05 +00:00
Ted Kremenek 9716d61923 Removed "EverKilled" class in DeadStores checker; it is no longer used.
llvm-svn: 42301
2007-09-25 17:47:04 +00:00
Hartmut Kaiser c173edd271 Updated VC++ build system
llvm-svn: 42295
2007-09-25 13:08:03 +00:00
Ted Kremenek ad8bce02f0 Further refactored DataflowSolver. Now most code for the solver is shared
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.

Converted the LiveVariables analysis to use the generic DataflowSolver.  This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.

Modified Driver code to handle the updated interface to LiveVariables.

Modified the DeadStores checker to handle the update interface to
LiveVariables.

Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks.  This is used by DeadStores.  Updated some comments.

llvm-svn: 42293
2007-09-25 04:31:27 +00:00
Ted Kremenek 7e839f10cf Added extra "constness" to parameter.
llvm-svn: 42292
2007-09-25 04:30:51 +00:00
Chris Lattner 70d1faa17d use the right rounding mode.
llvm-svn: 42291
2007-09-25 04:29:44 +00:00
Ted Kremenek ce5568f568 Added PersistentMap, an ADT that implements a map data structure that
is persistent.  Adds/removals to a PersistentMap do not result in
a map being modified, but a new map being created.  This will be useful
for path-sensitive analyses.  

The current implementation mainly makes copies to implement this
functionality.  If the map turns out to be extensively used, this
implementation will be replaced with a more efficient one that uses
data sharing (see comments in PersistentMap.h for more information).

llvm-svn: 42290
2007-09-25 04:26:20 +00:00
Ted Kremenek 962942f7a4 Added smart pointer class "IntrusiveSPtr" that handles reference
counted objects that maintain their own internal reference count.
This smart pointer implementation is compatible with LLVM-style
down-casting (see in llvm: include/llvm/Support/Casting.h).

Implemented "RefCounted", a base class that objects that wish to be
managed using IntrusiveSPtrs can subclass.

Reference counted objects are being targeted for use in path-sensitive
dataflow analyses where managing many live objects becomes difficult.

llvm-svn: 42260
2007-09-24 06:10:20 +00:00
Chris Lattner d05e44e74e If we see an invalid #ifdef directive, enter a conditional compilation region
so that we don't emit an error on the #endif.  Suggestion by Neil.

llvm-svn: 42258
2007-09-24 05:14:57 +00:00
Chris Lattner 071107120c Fix for 64-bit systems.
llvm-svn: 42253
2007-09-23 23:53:07 +00:00
Hartmut Kaiser e675ff918b Fixed VC++ bitfield to unsigned/signed sign propagation issue.
llvm-svn: 42252
2007-09-23 23:39:51 +00:00
Chris Lattner 322abe3573 Use the APFloat routines to evaluate FP immediates as
integer constant expressions.  The only questionable
thing is that we now reject:

void foo() {
  switch (1) {
  case (int)1.0e10000:
    ;
  }
}

with:

t.c:5:13: error: case label does not reduce to an integer constant
  case (int)1.0e10000:
       ~~~~~^~~~~~~~~

GCC accepts this, emitting the pedwarn:
t.c:5: warning: floating constant exceeds range of 'double'

llvm-svn: 42238
2007-09-22 19:04:13 +00:00
Chris Lattner 9da7bc110a add comments.
llvm-svn: 42237
2007-09-22 18:48:32 +00:00
Chris Lattner 2dd003e807 further apfloat'ize the front-end, allowing codegen to pass
APFloat straight through to LLVM now.

llvm-svn: 42236
2007-09-22 18:47:25 +00:00
Chris Lattner c2d09cfe75 work around bugs and missing features in apfloat.
llvm-svn: 42235
2007-09-22 18:38:30 +00:00
Chris Lattner ec0a6d9be5 Use APFloat for the representation of FP immediates, ask the target
for *which* apfloat to use for a particular type.

llvm-svn: 42234
2007-09-22 18:29:59 +00:00
Fariborz Jahanian 7e5d533098 This patch adds to new things to clang:
1. Handles saving and checking on protocols used in an @interface declaration
2. Checks and saves class's super class.
3. Adds semantic check to category declarations.

llvm-svn: 42218
2007-09-22 00:01:35 +00:00
Chris Lattner 4b2ff02f72 Make case sorting deterministic by not depending on pointer
values.  Patch mostly by Gabor Greif for PR1682.

llvm-svn: 42203
2007-09-21 18:15:22 +00:00
Fariborz Jahanian 876e27dafa This patch instantiates objects for forward protocols and in general handles use of
protocols referenced in @protocol declarations.

llvm-svn: 42191
2007-09-21 15:40:54 +00:00
Hartmut Kaiser 3f5d492c70 Updated VC++ project files
llvm-svn: 42177
2007-09-20 21:54:10 +00:00
Ted Kremenek 8483a4ab05 Updated XCode project with locations of "Analysis" visitor header files.
llvm-svn: 42176
2007-09-20 21:47:32 +00:00
Ted Kremenek 24c624477e Updated header file inlcude to new location of
Analysis/Visitors/*Visitors.h files.

llvm-svn: 42175
2007-09-20 21:42:55 +00:00
Ted Kremenek 3b2050b322 Renamed "include/clang/Analysis/CFGVisitors" "<snip>/Analysis/Visitors".
"Visitors" is more general than "CFGVisitors", as we aren't just using
visitation useful for CFG analysis.

llvm-svn: 42174
2007-09-20 21:42:03 +00:00
Ted Kremenek 706df48fea Moved include/clang/Analysis/*Visitor.h to include/clang/Analysis/CFGVisitors.
We had enough visitors that it was cluttering the Analysis directory.

llvm-svn: 42173
2007-09-20 21:40:36 +00:00
Fariborz Jahanian 397d8de9ed Handle forward declaration of classes and prevent re-instantiation of
ObjcInterfaceClass Objects.

llvm-svn: 42172
2007-09-20 20:26:44 +00:00
Fariborz Jahanian a8bbc63c1f Match to do some semantic analysis on objective-c class decl.
1. Detect used of undeclared/forward declared super class.
2. Detect duplicate definition of a class.

llvm-svn: 42168
2007-09-20 17:54:07 +00:00
Hartmut Kaiser 8a43d50f40 Updated VC++ project files.
Disambiguated a variable.

llvm-svn: 42161
2007-09-20 13:35:09 +00:00
Ted Kremenek 66d130a584 Added support to clang driver to view ASTs using GraphViz. This
functionality is still preliminary.

llvm-svn: 42152
2007-09-19 21:29:43 +00:00
Ted Kremenek a8f4ef5846 Moved GraphTraits<Stmt*> to StmtGraphTraits.h. This allows consumers of Stmt.h not to have to pay the cost
of parsing the GraphTraits templates if they don't need that functionality.

Defined nodes_iterator for GraphTraits<Stmt*> to be based on llvm::df_iterator.

llvm-svn: 42150
2007-09-19 21:21:39 +00:00
Fariborz Jahanian 62fd2b4730 Patch to parse objective-c's @try-statement and @throw-statement.
llvm-svn: 42148
2007-09-19 19:14:32 +00:00
Ted Kremenek a3d706a778 Added GraphTraits template specialization for Stmt* to treat ASTs like graphs.
llvm-svn: 42146
2007-09-19 18:18:40 +00:00
Ted Kremenek ec55ce39a6 More refactoring: decl and expr regisitration now uses CFGRecStmtDeclVisitor.
llvm-svn: 42145
2007-09-19 18:00:03 +00:00
Ted Kremenek 5885a5b417 Added two new visitors that extend CFGStmtVisitor: CFGRecStmtVisitor and CFGRecStmtDeclVisitor.
The extended functionality of these visitors is that they automatically visit all statements in
an AST (no explicit recursion is required from subclasses), and the for the latter, decls are visited
as well.

llvm-svn: 42144
2007-09-19 17:59:28 +00:00
Steve Naroff 2cd263ff71 Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.
Rationale:

We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).

It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:

Two tables:

*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635 
Bytes allocated:         1999824

One table:

*** Identifier Table Stats:
# Identifiers:   49500
Bytes allocated: 1990316

llvm-svn: 42139
2007-09-19 16:18:46 +00:00
Steve Naroff 59155be0b2 Remove #include of config.h, it is no longer needed.
llvm-svn: 42126
2007-09-19 03:01:22 +00:00
Steve Naroff 467e619a65 Remove alloca import...
llvm-svn: 42117
2007-09-18 23:56:42 +00:00
Steve Naroff d54978ba8b Progress on message expressions...
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.

Next step, installing a correct type, among other tweaks...

llvm-svn: 42116
2007-09-18 23:55:05 +00:00
Ted Kremenek fb9ea52a13 DataflowSolver now acccepts an "_Equal" template parameter that allows the user
to specify how two dataflow values should be compared for equality.  The default
is to use std::equal_to.

llvm-svn: 42115
2007-09-18 23:40:51 +00:00
Ted Kremenek d51126b97e Fixed bug where getBitRef would incorrectly grab the bit from the
wrong bitvector.

llvm-svn: 42114
2007-09-18 23:30:45 +00:00
Ted Kremenek 9427b0e23b Changed solver to use "==" operator when comparing dataflow values
rather than a special "equal" method defined in the class for the
value.

llvm-svn: 42113
2007-09-18 23:30:21 +00:00
Ted Kremenek 8d4dcc5409 Minor performance fix in transfer function logic. Previously we
called VisitStmt, but VisitChildren is more direct and creates less
boilerplate logic.

llvm-svn: 42110
2007-09-18 21:47:41 +00:00
Ted Kremenek 271161078b More refactoring and code reduction.
llvm-svn: 42109
2007-09-18 21:43:18 +00:00
Ted Kremenek b1361eaaa7 Add overloaded versions of DataflowSolver::runOnBlock to simplify
invocation of the solver.

UninitializedValues checker now uses CFG::runOnAllBlocks to query the
computed dataflow values (tighter code).

llvm-svn: 42107
2007-09-18 21:08:21 +00:00
Ted Kremenek 360c3b4abb Added member template CFG::VisitBlockStmts to provide a succinct way
of visiting all block-level statements in a CFG.

Tightened implementation of UninitializedValues.

llvm-svn: 42106
2007-09-18 20:59:00 +00:00
Ted Kremenek 2bde624474 Additional comments and cosmetic cleanups.
llvm-svn: 42105
2007-09-18 20:44:03 +00:00
Fariborz Jahanian 867a7eb5cb Patch for object creation and handling of category declarations.
llvm-svn: 42104
2007-09-18 20:26:58 +00:00
Ted Kremenek df9a2a9f8b Moved TransferFunction object within DataflowSolver to be a instance
variable instead of a temporary.

llvm-svn: 42102
2007-09-18 18:17:19 +00:00
Ted Kremenek 584e21a349 Modified DataFlowValues and DataflowSolver to associate dataflow value
with CFG *edges* instead of blocks.  This will fascilitate dataflow
analyses that are sensitive to block terminators, and also simplifies
some reasoning.

Updated UninitializedValues to comply to this new interface.

llvm-svn: 42099
2007-09-18 18:02:44 +00:00
Ted Kremenek 1d77d76837 Added type "CFG::Edge" to encapsulate the notion of directed-edges
within source-level CFGs.

llvm-svn: 42098
2007-09-18 18:01:15 +00:00
Hartmut Kaiser ae27fdc0f4 alloca.h doesn't exist on Windows.
llvm-svn: 42089
2007-09-18 12:16:59 +00:00
Gabor Greif 56c83140c1 alloca.h is needed on Solaris
llvm-svn: 42088
2007-09-18 11:01:25 +00:00
Fariborz Jahanian 0c74e9d161 Uses more description name for method implementation kind argument.
Moves such argument as the last argument and uses defaul value.

llvm-svn: 42073
2007-09-18 00:25:23 +00:00
Hartmut Kaiser a9deb50918 Updated VC++ project files after file rename.
llvm-svn: 42072
2007-09-17 23:33:12 +00:00
Fariborz Jahanian cfacdae9a8 Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
instead for @protocol method decls.

llvm-svn: 42070
2007-09-17 22:36:42 +00:00
Ted Kremenek 3c996d9a60 Bug fix to merging of data flow values (merge incorrectly made values
too "conservative").

Several revisions to UninitializedValues checker after testing.  We
now appear to be working correctly (probably some bugs still, but main
functionality appears to be there).  Implemented careful emitting of
warnings so that we wouldn't get a cascade of warnings for simply not
defining a single variable and using it everywhere.  This way the
warnings point closer to the root cause rather than "symptoms" from
using values derived from uninitialized variables.

llvm-svn: 42067
2007-09-17 21:59:08 +00:00
Steve Naroff c4657d00bb Add a comment and remove unused constructors.
llvm-svn: 42063
2007-09-17 21:26:50 +00:00
Ted Kremenek fb5c46c740 Made driver flag --check-uninit-values more self-explanatory.
llvm-svn: 42062
2007-09-17 21:21:20 +00:00
Hartmut Kaiser f696cfcf06 Fixed a VC++ issue related to bitmasks. As it turns out the compiler fills the unused bits of the word a bitmask is stored in with '1' (or randomly, I can't tell, I've seen '1' so far only), which creates wrong results in certain cases.
Please review.

llvm-svn: 42061
2007-09-17 21:11:08 +00:00
Fariborz Jahanian 39d641f526 Patch to add objective-c's @protocl type declaration.
llvm-svn: 42060
2007-09-17 21:07:36 +00:00
Steve Naroff f0f2afce5a Finish defining Action API for message expressions.
llvm-svn: 42059
2007-09-17 21:01:15 +00:00
Ted Kremenek 1abd5c9d8f Re-added UninitializedValues.cpp to the XCode project because the file was renamed.
llvm-svn: 42057
2007-09-17 20:52:52 +00:00
Ted Kremenek d0b206fd98 Renamed file due to mispelling.
llvm-svn: 42056
2007-09-17 20:50:02 +00:00
Ted Kremenek 7e61e81bbf UninitialuzedValues now only tracks BlockVarDecls; obviating false positives with
globals and function parameters.

llvm-svn: 42055
2007-09-17 20:49:30 +00:00
Steve Naroff 486760aee3 - Refactored ObjcKeywordInfo into ObjcKeywordInfo, ObjcKeywordDecl, and ObjcKeywordMessage.
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().

Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.

llvm-svn: 42050
2007-09-17 20:25:27 +00:00
Ted Kremenek dd3015375c More progress on UnitializedValues checker. We now have preliminary support
for reporting errors and running the checker.

llvm-svn: 42046
2007-09-17 19:59:27 +00:00
Ted Kremenek 6f0751475a Split tracking of unitialized values for Decls and CFGBlock-level expressions.
llvm-svn: 42041
2007-09-17 18:31:23 +00:00
Ted Kremenek 789ea076a8 Removed "ObserverTy" from core DataflowValues types. The observer
mechanism can be implemented simply by affixing the Observer to an
analysis meta data, so it doesn't need to be a required type.  This
also permits analyses not to implement an Observer if it doesn't make
sense.

Changed "DataflowValues::MetaDataTy" to
"DataflowValues::AnalysisDataTy" to reflect that the type
enscapsulated the data associated with analyzing a given CFG.

Changed CFGStmtVisitor::BlockStmt_VisitImplicitControlFlowStmt(Stmt*)
to ...VisitImplicitControlFlowExpr(Expr*).  The type narrowing is more
precise and more useful to clients.

Added CFGStmtVisitor::BlockStmt_VisitExpr to reflect the visitation of
expressions at the block statement level.  This captures all implicit
control-flow statements as well as other expressions that are hoisted
to the block level (such as conditions for terminators and function
calls).  This is especially useful for dataflow analysis.

llvm-svn: 42034
2007-09-17 17:14:52 +00:00
Ted Kremenek c3fddac8e7 Removed check for NULL CFG. Bad CFGs will fire an assertion failure
in the CFG builder logic.

llvm-svn: 42033
2007-09-17 17:10:02 +00:00
Ted Kremenek cdc0bc45e4 When building CFGs we now (unconditionally) add an empty CFGBlock to the CFG
to serve as the entry block.  An empty entry block (just as with an
empty exit block, which we already have) simplifies building analyses on top
of CFGs with very little extra overhead.

llvm-svn: 42031
2007-09-17 16:18:02 +00:00
Ted Kremenek 186a669014 Added ASTConsumer.h to XCode project.
llvm-svn: 42030
2007-09-17 16:09:32 +00:00
Steve Naroff ed977473fe Fix a few 80 column violations.
llvm-svn: 42028
2007-09-17 15:07:43 +00:00
Steve Naroff 83763f2c40 Add const to debug hook...
llvm-svn: 42025
2007-09-17 14:49:06 +00:00
Steve Naroff 73d534a2e0 Add support for ObjC keyword selectors.
- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.

Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.
llvm-svn: 42023
2007-09-17 14:16:13 +00:00
Hartmut Kaiser ffb47d0679 Fixed unterminated string issue.
llvm-svn: 42022
2007-09-17 12:29:55 +00:00
Chris Lattner 699c2410a8 make var in anon namespace static. Use \n instead of std::endl.
llvm-svn: 42020
2007-09-17 06:16:32 +00:00
Hartmut Kaiser af2584fbaf Silenced a VC++ warning.
Updated VC++ project files.

llvm-svn: 42015
2007-09-16 21:35:35 +00:00
Chris Lattner 93c7f855e5 remove some obsolete interfaces.
llvm-svn: 42014
2007-09-16 19:47:56 +00:00
Chris Lattner 7ea6ca70f5 switch the llvm emitter to ASTConsumer interface.
llvm-svn: 42013
2007-09-16 19:46:59 +00:00
Chris Lattner aadfe2f973 From Justin Handville:
"The ExpectedStr search was starting at the end of the comment string.
This patch starts the search at the beginning of the comment string.
After applying this patch, clang -parse-ast-check on negative test
case source files worked as expected."

llvm-svn: 42012
2007-09-16 19:27:16 +00:00
Chris Lattner ac81722ff6 Fix html problem, patch by Justin Handville
llvm-svn: 42011
2007-09-16 19:25:23 +00:00