Commit Graph

12 Commits

Author SHA1 Message Date
John McCall 2536c6da0e More incremental progress towards not including Expr.h in Sema.h.
llvm-svn: 112044
2010-08-25 10:28:54 +00:00
Daniel Dunbar 56df97761d StringRef'ication of lots stuff, patch by Peter Davies!
llvm-svn: 111314
2010-08-17 22:39:59 +00:00
Argyrios Kyrtzidis 1cec2cc798 Remove dead code, caught by unused function warnings.
llvm-svn: 111091
2010-08-15 01:15:58 +00:00
John McCall cf14216509 Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths.  Avoids a separate allocation and
another word of overhead in cases needing inheritance paths.  Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.

llvm-svn: 110507
2010-08-07 06:22:56 +00:00
Fariborz Jahanian e6a4e3933d Initialize block's imported variable(s) in
block's synthesized constructor initalizer list.
Fixes radar 8240371.

llvm-svn: 109698
2010-07-28 23:27:30 +00:00
Fariborz Jahanian 3fd2a555d3 Fix source location of the initializer in
a copy initialization. Back out hack in objc rewriter.
fixes radar 8213998.

llvm-svn: 109024
2010-07-21 18:31:47 +00:00
Fariborz Jahanian 34c85987fe Fix a rewriter bug which originates in SemaInit involving
Constructor Initialization which computes Source Location
differently now. Fixes radar 8213998.

llvm-svn: 109018
2010-07-21 17:36:39 +00:00
Sebastian Redl c57d34bc35 Update ImplicitCastExpr to be able to represent an XValue.
llvm-svn: 108807
2010-07-20 04:20:21 +00:00
Douglas Gregor 603d81bf8d When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types. 

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).

llvm-svn: 108234
2010-07-13 08:18:22 +00:00
Argyrios Kyrtzidis 568bc84562 Remove Decl::getCompoundBody().
This has 2 (slight) advantages:
-Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt.
-Better tracking of Decl::getBody()'s callsites.

llvm-svn: 107771
2010-07-07 11:31:34 +00:00
Daniel Dunbar 8ab6c54ce2 Rewriter: Use the appropriate printing context instead of the default
constructed one -- this is necessary to ensure types get printed correctly.

llvm-svn: 107312
2010-06-30 19:16:53 +00:00
Daniel Dunbar c1b1729b66 Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen.  This is suboptimal for
clients which only wish to make use of the frontend.  CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries.  The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
 - Fixed some copy-paste mistakes in the header files
 - Modified certain aspects of the coding to comply with the LLVM
   Coding Standards

llvm-svn: 106010
2010-06-15 17:48:49 +00:00