]> granicus.if.org Git - clang/log
clang
15 years agoFix CMake build for AST XML dumper
Douglas Gregor [Thu, 21 May 2009 21:21:53 +0000 (21:21 +0000)]
Fix CMake build for AST XML dumper

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

15 years agoFixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
Mike Stump [Thu, 21 May 2009 21:05:15 +0000 (21:05 +0000)]
Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
evaluated first.  This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.

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

15 years agoFixed a warning bug when receiver is an object via
Fariborz Jahanian [Thu, 21 May 2009 21:04:28 +0000 (21:04 +0000)]
Fixed a warning bug when receiver is an object via
setting of NSObject attribute.

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

15 years agoAST XML dump, from Olaf Krzikalla!
Douglas Gregor [Thu, 21 May 2009 20:55:50 +0000 (20:55 +0000)]
AST XML dump, from Olaf Krzikalla!

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

15 years agoTemplate instantiation for unary type traits, e.g., __is_pod
Douglas Gregor [Thu, 21 May 2009 18:55:48 +0000 (18:55 +0000)]
Template instantiation for unary type traits, e.g., __is_pod

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

15 years agoCheck on null arguments in the presense of nonnull attribute.
Fariborz Jahanian [Thu, 21 May 2009 18:48:51 +0000 (18:48 +0000)]
Check on null arguments in the presense of nonnull attribute.

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

15 years agoTemplate instantiation for C++ "typeid" expressions.
Douglas Gregor [Thu, 21 May 2009 18:34:44 +0000 (18:34 +0000)]
Template instantiation for C++ "typeid" expressions.

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

15 years agoTemplate instantiation for C++ throw expressions
Douglas Gregor [Thu, 21 May 2009 17:37:52 +0000 (17:37 +0000)]
Template instantiation for C++ throw expressions

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

15 years agoTemplate instantiation for C++ delete expression
Douglas Gregor [Thu, 21 May 2009 17:21:12 +0000 (17:21 +0000)]
Template instantiation for C++ delete expression

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

15 years agoMerge the ASTVector and ASTOwningVector templates, since they offered
Douglas Gregor [Thu, 21 May 2009 16:25:11 +0000 (16:25 +0000)]
Merge the ASTVector and ASTOwningVector templates, since they offered
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.

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

15 years agoAvoid using the built-in type checker for assignment in C++ when classes are involved...
Sebastian Redl [Thu, 21 May 2009 11:50:50 +0000 (11:50 +0000)]
Avoid using the built-in type checker for assignment in C++ when classes are involved. Patch by Vyacheslav Kononenko.

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

15 years agoUse v.data() instead of &v[0] when SmallVector v might be empty.
Jay Foad [Thu, 21 May 2009 09:52:38 +0000 (09:52 +0000)]
Use v.data() instead of &v[0] when SmallVector v might be empty.

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

15 years agoMinor refactoring. Uses an existing API to lookup a class method.
Fariborz Jahanian [Thu, 21 May 2009 01:03:45 +0000 (01:03 +0000)]
Minor refactoring. Uses an existing API to lookup a class method.

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

15 years agoTemplate instantiation for C++ "new" expressions.
Douglas Gregor [Thu, 21 May 2009 00:00:09 +0000 (00:00 +0000)]
Template instantiation for C++ "new" expressions.

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

15 years agoFix template instantiation for compound statements so that it properly
Douglas Gregor [Wed, 20 May 2009 22:57:03 +0000 (22:57 +0000)]
Fix template instantiation for compound statements so that it properly
passes the "isStmtExpr" flag, to suppress warnings about unused
expressions.

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

15 years agoAdd special cases to retain checker for 'create' methods in QCView, QCRenderer, and...
Ted Kremenek [Wed, 20 May 2009 22:39:57 +0000 (22:39 +0000)]
Add special cases to retain checker for 'create' methods in QCView, QCRenderer, and CIContext (Apple APIs).

This fixes:

<rdar://problem/6902710> clang: false positives w/QC and CoreImage methods.

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

15 years agoIntroduce a new kind of RAII class, ASTOwningVector, which is an
Douglas Gregor [Wed, 20 May 2009 22:33:37 +0000 (22:33 +0000)]
Introduce a new kind of RAII class, ASTOwningVector, which is an
llvm::SmallVector that owns all of the AST nodes inside of it. This
RAII class is used to ensure proper destruction of AST nodes when
template instantiation fails.

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

15 years agoTemplate instantiation for CXXExprWithTemporaries, which occurs when
Douglas Gregor [Wed, 20 May 2009 21:51:01 +0000 (21:51 +0000)]
Template instantiation for CXXExprWithTemporaries, which occurs when
temporaries are generated for some object-constructing expressions in
templates that are not type-dependent.

Also, be sure to introduce the variable from a CXXConditionDeclExpr
into the set of instantiated local variables.

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

15 years agoTemplate instantiation for the various kinds of AST nodes that occur
Douglas Gregor [Wed, 20 May 2009 21:38:11 +0000 (21:38 +0000)]
Template instantiation for the various kinds of AST nodes that occur
due to C++ type construction of the form T(a1, a2, ..., aN).

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

15 years agoTweak test case so that the expected-error text matches on both i686 and x86-64.
Douglas Gregor [Wed, 20 May 2009 20:30:46 +0000 (20:30 +0000)]
Tweak test case so that the expected-error text matches on both i686 and x86-64.

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

15 years agoAdd a va_list/template instantiation test suggested by Eli
Douglas Gregor [Wed, 20 May 2009 18:50:16 +0000 (18:50 +0000)]
Add a va_list/template instantiation test suggested by Eli

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

15 years agoIntroduce a new expression type, CXXUnresolvedConstructExpr, to
Douglas Gregor [Wed, 20 May 2009 18:46:25 +0000 (18:46 +0000)]
Introduce a new expression type, CXXUnresolvedConstructExpr, to
describe the construction of a value of a given type using function
syntax, e.g.,

  T(a1, a2, ..., aN)

when the type or any of its arguments are type-dependent. In this
case, we don't know what kind of type-construction this will be: it
might construct a temporary of type 'T' (which might be a class or
non-class type) or might perform a conversion to type 'T'. Also,
implement printing of and template instantiation for this new
expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr,
our existing tests cover template instantiation of this new expression
node.

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

15 years agoThis patch provides preliminary support for non-fragile instance variables on the...
Fariborz Jahanian [Wed, 20 May 2009 18:41:51 +0000 (18:41 +0000)]
This patch provides preliminary support for non-fragile instance variables on the GNU runtime.
It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure
needed for supporting them.
Patch by David Chisnall

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

15 years agoimplementation of format_arg for ObjC methods/functions.
Fariborz Jahanian [Wed, 20 May 2009 17:41:43 +0000 (17:41 +0000)]
implementation of format_arg for ObjC methods/functions.
Still more to do.

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

15 years agoTreat AllocaRegion as SymbolicRegion in RegionStore::Retrieve().
Zhongxing Xu [Wed, 20 May 2009 09:18:48 +0000 (09:18 +0000)]
Treat AllocaRegion as SymbolicRegion in RegionStore::Retrieve().

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

15 years agoAdd comments to test case.
Zhongxing Xu [Wed, 20 May 2009 09:03:10 +0000 (09:03 +0000)]
Add comments to test case.

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

15 years ago* API change: we need to pass GRState to GRExprEngine::EvalBinOp() because
Zhongxing Xu [Wed, 20 May 2009 09:00:16 +0000 (09:00 +0000)]
* API change: we need to pass GRState to GRExprEngine::EvalBinOp() because
  RegionStore needs to know the type of alloca region.
* RegionStoreManager::EvalBinOp() now converts the alloca region to its first
  element region, as what is done to symbolic region.

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

15 years agoHandle the remaining unhandled cases in EmitReferenceBindingToExpr.
Eli Friedman [Wed, 20 May 2009 02:31:19 +0000 (02:31 +0000)]
Handle the remaining unhandled cases in EmitReferenceBindingToExpr.

It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.

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

15 years agoadd header to be built by gcc 4.3 on Linux.
Zhongxing Xu [Wed, 20 May 2009 01:55:10 +0000 (01:55 +0000)]
add header to be built by gcc 4.3 on Linux.

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

15 years agoirgen for references to complex rvales (Very important...)
Anders Carlsson [Wed, 20 May 2009 01:35:03 +0000 (01:35 +0000)]
irgen for references to complex rvales (Very important...)

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

15 years agoBad anders.
Anders Carlsson [Wed, 20 May 2009 01:27:39 +0000 (01:27 +0000)]
Bad anders.

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

15 years agoCreate a temporary if the lvalue is a bitfield. Reported by Eli.
Anders Carlsson [Wed, 20 May 2009 01:24:22 +0000 (01:24 +0000)]
Create a temporary if the lvalue is a bitfield. Reported by Eli.

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

15 years agoAdd support for binding references to scalar rvalues.
Anders Carlsson [Wed, 20 May 2009 01:03:17 +0000 (01:03 +0000)]
Add support for binding references to scalar rvalues.

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

15 years agoBind references to lvalues correctly.
Anders Carlsson [Wed, 20 May 2009 00:36:58 +0000 (00:36 +0000)]
Bind references to lvalues correctly.

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

15 years agoAdd EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support...
Anders Carlsson [Wed, 20 May 2009 00:24:07 +0000 (00:24 +0000)]
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)

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

15 years agoStart documenting precompiled headers
Douglas Gregor [Wed, 20 May 2009 00:16:32 +0000 (00:16 +0000)]
Start documenting precompiled headers

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

15 years agoAdd FIXMEs for the remaining C and C++ expression types that still
Douglas Gregor [Tue, 19 May 2009 23:29:16 +0000 (23:29 +0000)]
Add FIXMEs for the remaining C and C++ expression types that still
need template instantiation logic. Remove one FIXME by instantiating
the callee in a non-type-dependent CXXOperatorCallExpr.

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

15 years agoTemplate instantiation for __builtin_va_arg.
Douglas Gregor [Tue, 19 May 2009 23:10:31 +0000 (23:10 +0000)]
Template instantiation for __builtin_va_arg.

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

15 years agoTemplate instantiation for __builtin_choose_expr.
Douglas Gregor [Tue, 19 May 2009 22:43:30 +0000 (22:43 +0000)]
Template instantiation for __builtin_choose_expr.

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

15 years agoBan the use of __builtin_types_compatible_p in C++; g++ doesn't support it,
Douglas Gregor [Tue, 19 May 2009 22:28:02 +0000 (22:28 +0000)]
Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it,
and it isn't clear exactly what it's supposed to mean. Thanks Eli!

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

15 years agoTemplate instantiation for __builtin_shufflevector.
Douglas Gregor [Tue, 19 May 2009 22:10:17 +0000 (22:10 +0000)]
Template instantiation for __builtin_shufflevector.

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

15 years agoRemove finished FIXME.
Eli Friedman [Tue, 19 May 2009 21:17:33 +0000 (21:17 +0000)]
Remove finished FIXME.

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

15 years agoBuild fixes for r72135.
Eli Friedman [Tue, 19 May 2009 21:16:18 +0000 (21:16 +0000)]
Build fixes for r72135.

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

15 years agoMove AnalysisConsumer.h and Analyses.def from tools/clang-cc to
Eli Friedman [Tue, 19 May 2009 21:10:40 +0000 (21:10 +0000)]
Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to
include/clang/Frontend, and move AnalysisConsumer.cpp from
tools/clang-cc to lib/Frontend.

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

15 years agoTemplate instantiation for __builtin_types_compatible_p.
Douglas Gregor [Tue, 19 May 2009 20:55:31 +0000 (20:55 +0000)]
Template instantiation for __builtin_types_compatible_p.

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

15 years agoImprove support for irgen of references.
Anders Carlsson [Tue, 19 May 2009 20:40:02 +0000 (20:40 +0000)]
Improve support for irgen of references.

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

15 years agoTemplate instantiation for GNU statement expressions
Douglas Gregor [Tue, 19 May 2009 20:31:21 +0000 (20:31 +0000)]
Template instantiation for GNU statement expressions

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

15 years agoFix handling of the GNU "t ? : f" extension to the conditional
Douglas Gregor [Tue, 19 May 2009 20:13:50 +0000 (20:13 +0000)]
Fix handling of the GNU "t ? : f" extension to the conditional
operator in C++, and verify that template instantiation for the
condition operator does the right thing.

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

15 years agoTemplate instantiation for compound assignment operators.
Douglas Gregor [Tue, 19 May 2009 20:02:01 +0000 (20:02 +0000)]
Template instantiation for compound assignment operators.

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

15 years agoOnly do the bitcast in EmitStoreOfScalar if the type is a boolean.
Anders Carlsson [Tue, 19 May 2009 19:36:19 +0000 (19:36 +0000)]
Only do the bitcast in EmitStoreOfScalar if the type is a boolean.

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

15 years agoTemplate instantiation for cast expressions.
Douglas Gregor [Tue, 19 May 2009 19:05:47 +0000 (19:05 +0000)]
Template instantiation for cast expressions.

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

15 years agoPass the destination QualType to EmitStoreOfScalar. No functionality change.
Anders Carlsson [Tue, 19 May 2009 18:50:41 +0000 (18:50 +0000)]
Pass the destination QualType to EmitStoreOfScalar. No functionality change.

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

15 years agoDon't always zext the result of the not unary operator to an int.
Anders Carlsson [Tue, 19 May 2009 18:44:53 +0000 (18:44 +0000)]
Don't always zext the result of the not unary operator to an int.

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

15 years agoPatch finishes off application of printf attribute on blocks.
Fariborz Jahanian [Tue, 19 May 2009 17:08:59 +0000 (17:08 +0000)]
Patch finishes off application of printf attribute on blocks.

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

15 years agoUpdate test
Daniel Dunbar [Tue, 19 May 2009 16:09:59 +0000 (16:09 +0000)]
Update test

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

15 years agoAdd missing include for stderr and fprintf, needed
Duncan Sands [Tue, 19 May 2009 12:06:47 +0000 (12:06 +0000)]
Add missing include for stderr and fprintf, needed
when compiling with gcc-4.4.

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

15 years agoRemove the -arch option from clang-cc: for all practical purposes, it's
Eli Friedman [Tue, 19 May 2009 11:12:40 +0000 (11:12 +0000)]
Remove the -arch option from clang-cc: for all practical purposes, it's
redundant with -triple.

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

15 years agoMove analysis command-line options out of AnalysisConsumer.cpp into
Eli Friedman [Tue, 19 May 2009 10:18:02 +0000 (10:18 +0000)]
Move analysis command-line options out of AnalysisConsumer.cpp into
clang-cc.cpp.

With this commit, all of the clang-cc command-line options are defined
in clang-cc.cpp.

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

15 years agoFix a crash with -emit-html from stdin.
Eli Friedman [Tue, 19 May 2009 05:28:52 +0000 (05:28 +0000)]
Fix a crash with -emit-html from stdin.

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

15 years agoHave AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub...
Anders Carlsson [Tue, 19 May 2009 04:48:36 +0000 (04:48 +0000)]
Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.

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

15 years agoCreate CXXConstructExpr calls for arguments passed to functions.
Anders Carlsson [Tue, 19 May 2009 04:45:15 +0000 (04:45 +0000)]
Create CXXConstructExpr calls for arguments passed to functions.

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

15 years agoClean up some unnecessary includes.
Eli Friedman [Tue, 19 May 2009 04:30:57 +0000 (04:30 +0000)]
Clean up some unnecessary includes.

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

15 years agoCMake updates for r72099; untested, so please tell me if there are any
Eli Friedman [Tue, 19 May 2009 04:21:30 +0000 (04:21 +0000)]
CMake updates for r72099; untested, so please tell me if there are any
issues.

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

15 years agoMove clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
Eli Friedman [Tue, 19 May 2009 04:14:29 +0000 (04:14 +0000)]
Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
files to lib/Frontend.

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

15 years agoAdd comment about FullExprArg.
Anders Carlsson [Tue, 19 May 2009 04:13:11 +0000 (04:13 +0000)]
Add comment about FullExprArg.

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

15 years agoMove CreateAnalysisConsumer into a separate header AnalysisConsumer.h.
Eli Friedman [Tue, 19 May 2009 03:57:28 +0000 (03:57 +0000)]
Move CreateAnalysisConsumer into a separate header AnalysisConsumer.h.
Start moving things around in the direction of refactoring the
command-line options out of AnalysisConsumer.cpp.

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

15 years agoMove the options for dependency file generation from DependencyFile.cpp
Eli Friedman [Tue, 19 May 2009 03:35:57 +0000 (03:35 +0000)]
Move the options for dependency file generation from DependencyFile.cpp
to clang-cc.cpp.  Also, rename CreateDependencyFileGen to
AttachDependencyFileGen, and make it take a raw_ostream rather than
opening a file itself.

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

15 years agoMove options for -E mode from PrintPreprocessedOutput.cpp to
Eli Friedman [Tue, 19 May 2009 03:06:47 +0000 (03:06 +0000)]
Move options for -E mode from PrintPreprocessedOutput.cpp to
clang-cc.cpp.

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

15 years agoRefactor -dM mode out of the main routine for -E handling.
Eli Friedman [Tue, 19 May 2009 01:32:34 +0000 (01:32 +0000)]
Refactor -dM mode out of the main routine for -E handling.

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

15 years agoMove the warning options from Warnings.cpp to clang-cc.cpp.
Eli Friedman [Tue, 19 May 2009 01:17:04 +0000 (01:17 +0000)]
Move the warning options from Warnings.cpp to clang-cc.cpp.

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

15 years agoSwitch some utilities in clang-cc to take a stream instead of a
Eli Friedman [Tue, 19 May 2009 01:02:07 +0000 (01:02 +0000)]
Switch some utilities in clang-cc to take a stream instead of a
filename (or unconditionally using stdout).

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 19 May 2009 00:48:25 +0000 (00:48 +0000)]
Update checker build.

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

15 years agoWhen assigning from an rvalue to a const reference, the implicit cast from T -> const...
Anders Carlsson [Tue, 19 May 2009 00:38:24 +0000 (00:38 +0000)]
When assigning from an rvalue to a const reference, the implicit cast from T -> const T is not an lvalue cast.

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

15 years agoTemplate instantiation for call expressions.
Douglas Gregor [Tue, 19 May 2009 00:38:01 +0000 (00:38 +0000)]
Template instantiation for call expressions.

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

15 years agoThis patch allows clang to generate code for declared properties on the GNU runtime...
Fariborz Jahanian [Tue, 19 May 2009 00:28:43 +0000 (00:28 +0000)]
This patch allows clang to generate code for declared properties on the GNU runtime.  As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present.
Patch by David Chisnall.

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

15 years agoTemplate instantiation for array subscript expressions. This was far
Douglas Gregor [Tue, 19 May 2009 00:01:19 +0000 (00:01 +0000)]
Template instantiation for array subscript expressions. This was far
easier than expected because of the limitation that subscript
operators must be member functions.

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

15 years agoBlockDecl node must be complete before block attributes
Fariborz Jahanian [Mon, 18 May 2009 23:17:46 +0000 (23:17 +0000)]
BlockDecl node must be complete before block attributes
can be processed. No change in functionality.

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

15 years agoFix PR 4230: Don't flag leaks of NSAutoreleasePools until we know that we aren' at...
Ted Kremenek [Mon, 18 May 2009 23:14:34 +0000 (23:14 +0000)]
Fix PR 4230: Don't flag leaks of NSAutoreleasePools until we know that we aren' at the top-most scope of autorelease pools.

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

15 years agoAttempted CMake build fixes for r72060; this is untested, so please tell
Eli Friedman [Mon, 18 May 2009 23:06:15 +0000 (23:06 +0000)]
Attempted CMake build fixes for r72060; this is untested, so please tell
me if there are any issues.

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

15 years agoBuild fixes for r72060; sorry for any inconvenience.
Eli Friedman [Mon, 18 May 2009 23:02:01 +0000 (23:02 +0000)]
Build fixes for r72060; sorry for any inconvenience.

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

15 years agoRemove -fprintf-source-range-info from the Driver (this was renamed)
Daniel Dunbar [Mon, 18 May 2009 23:01:24 +0000 (23:01 +0000)]
Remove -fprintf-source-range-info from the Driver (this was renamed)

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

15 years agoMove ASTConsumers.h to include/clang/Frontend, and move the associated
Eli Friedman [Mon, 18 May 2009 22:50:54 +0000 (22:50 +0000)]
Move ASTConsumers.h to include/clang/Frontend, and move the associated
.cpp files to lib/Frontend.  (As proposed on cfe-dev.)

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

15 years agoMove the Wno-rewrite-macros option out of RewriteObjC.cpp in prepration
Eli Friedman [Mon, 18 May 2009 22:39:16 +0000 (22:39 +0000)]
Move the Wno-rewrite-macros option out of RewriteObjC.cpp in prepration
for moving ASTConsumers.h to include/clang/Frontend.

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

15 years agoTemplate instantiation for imaginary literals, because they were next in Expr.h
Douglas Gregor [Mon, 18 May 2009 22:38:38 +0000 (22:38 +0000)]
Template instantiation for imaginary literals, because they were next in Expr.h

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

15 years agoRename the factory function for the ObjC rewriter to something sane.
Eli Friedman [Mon, 18 May 2009 22:29:17 +0000 (22:29 +0000)]
Rename the factory function for the ObjC rewriter to something sane.

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

15 years agoMove AnalysisConsumer out of ASTConsumers.h in preparation for moving
Eli Friedman [Mon, 18 May 2009 22:25:55 +0000 (22:25 +0000)]
Move AnalysisConsumer out of ASTConsumers.h in preparation for moving
ASTConsumers.h to include/clang/Frontend.

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

15 years agoRefactor ASTConsumers to take a raw_ostream instead of a filename where
Eli Friedman [Mon, 18 May 2009 22:20:00 +0000 (22:20 +0000)]
Refactor ASTConsumers to take a raw_ostream instead of a filename where
appropriate.  There shouldn't be any significant functionality change.

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

15 years ago"This patch fixes an obvious buffer overrun in
Douglas Gregor [Mon, 18 May 2009 22:09:16 +0000 (22:09 +0000)]
"This patch fixes an obvious buffer overrun in
SelectInterestingSourceRegion()," from Jay Foad!

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

15 years agoFix sorting of using directives, from Jay Foad
Douglas Gregor [Mon, 18 May 2009 22:06:54 +0000 (22:06 +0000)]
Fix sorting of using directives, from Jay Foad

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

15 years agoReformat a comment
Daniel Dunbar [Mon, 18 May 2009 21:47:54 +0000 (21:47 +0000)]
Reformat a comment

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

15 years agoSeveral fixes to the clang man page.
Daniel Dunbar [Mon, 18 May 2009 21:34:46 +0000 (21:34 +0000)]
Several fixes to the clang man page.
 - -emit-llvm isn't a stage selection option.

 - Document -O4 and -flto.

 - -ObjC++ and -ObjC apply to all inputs, not subsequent ones.

 - Some versions of pod2man aren't happy about the comment after =over=?

 - Some minor grammar fixes.

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

15 years agoDeal with an icky corner case where we were complaining that a catch
Douglas Gregor [Mon, 18 May 2009 21:08:14 +0000 (21:08 +0000)]
Deal with an icky corner case where we were complaining that a catch
statement was using an rvalue reference during the template
definition. However, template instantiations based on an lvalue
reference type are well-formed, so we delay checking of these property
until template instantiation time.

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

15 years agomore printf attribute on block declaration and
Fariborz Jahanian [Mon, 18 May 2009 21:05:18 +0000 (21:05 +0000)]
more printf attribute on block declaration and
checking when block is envoked. In progress.

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

15 years agoDebug info: Initialize runtime language field correctly for Objective-C
Daniel Dunbar [Mon, 18 May 2009 20:51:58 +0000 (20:51 +0000)]
Debug info: Initialize runtime language field correctly for Objective-C
interface types.

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

15 years agoTemplate instantiation for C++ try/catch statements.
Douglas Gregor [Mon, 18 May 2009 20:51:54 +0000 (20:51 +0000)]
Template instantiation for C++ try/catch statements.

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

15 years agoSince we miscompile many cases when declaring a variable with a reference type, make...
Anders Carlsson [Mon, 18 May 2009 19:55:29 +0000 (19:55 +0000)]
Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.

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

15 years agoRemove an unused builtin.
Anders Carlsson [Mon, 18 May 2009 19:25:54 +0000 (19:25 +0000)]
Remove an unused builtin.

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

15 years agoAdd 'cmp' SSE builtins and get rid of a bunch of other builtins.
Anders Carlsson [Mon, 18 May 2009 19:16:46 +0000 (19:16 +0000)]
Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

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

15 years agoInclude StmtNodes.def to declare Visit methods for all of the known
Douglas Gregor [Mon, 18 May 2009 19:08:47 +0000 (19:08 +0000)]
Include StmtNodes.def to declare Visit methods for all of the known
kinds of statements (in the instantiation logic). No functionality
change, but now we'll get linker errors if we add a statement but
forget to introduce its instantiation logic.

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

15 years agoSimplify struct/class tag mismatch warning, per Sebastian's suggestion
Douglas Gregor [Mon, 18 May 2009 18:46:22 +0000 (18:46 +0000)]
Simplify struct/class tag mismatch warning, per Sebastian's suggestion

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