]> granicus.if.org Git - clang/log
clang
15 years ago(Next runtime only) check to see if class implements forwardInvocation method
Fariborz Jahanian [Fri, 22 May 2009 17:12:32 +0000 (17:12 +0000)]
(Next runtime only) check to see if class implements forwardInvocation method
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.

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

15 years agoSome minor comments modifications.
Argyrios Kyrtzidis [Fri, 22 May 2009 15:12:46 +0000 (15:12 +0000)]
Some minor comments modifications.

There are no unnecessary action calls period (courtesy of the annotation scheme) and too many 'this means'..

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

15 years agoTargets like PIC16 generate Static decls for automatic variables, emit the appropriat...
Sanjiv Gupta [Fri, 22 May 2009 13:54:25 +0000 (13:54 +0000)]
Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.

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

15 years agoHandle correctly a very ugly part of the C++ syntax. We cannot disambiguate between...
Argyrios Kyrtzidis [Fri, 22 May 2009 10:24:42 +0000 (10:24 +0000)]
Handle correctly a very ugly part of the C++ syntax. We cannot disambiguate between a parenthesized type-id and
a paren expression without considering the context past the parentheses.

Behold:
  (T())x;  - type-id
  (T())*x; - type-id
  (T())/x; - expression
  (T());   - expression

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

15 years agoFactor the compound literal parsing out from ParseParenExpression and into a new...
Argyrios Kyrtzidis [Fri, 22 May 2009 10:24:05 +0000 (10:24 +0000)]
Factor the compound literal parsing out from ParseParenExpression and into a new ParseCompoundLiteralExpression.
No functionality change.

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

15 years agoModification to ParseParenExpression.
Argyrios Kyrtzidis [Fri, 22 May 2009 10:23:40 +0000 (10:23 +0000)]
Modification to ParseParenExpression.
Now it parses the cast expression unless 'stopIfCastExpr' is true.

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

15 years agoRemove ParseSimpleParenExpression.
Argyrios Kyrtzidis [Fri, 22 May 2009 10:23:16 +0000 (10:23 +0000)]
Remove ParseSimpleParenExpression.
Embed its functionality into it's only user, ParseCXXCasts.
CXXCasts now get the "actual" expression directly, they no longer always receive a ParenExpr. This is better since the
parentheses are always part of the C++ casts syntax.

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

15 years agoRefactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression...
Argyrios Kyrtzidis [Fri, 22 May 2009 10:22:50 +0000 (10:22 +0000)]
Refactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression' into a new
'ParseExprAfterTypeofSizeofAlignof' method.

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

15 years agoParse typeof-specifier the same way as sizeof/alignof are parsed.
Argyrios Kyrtzidis [Fri, 22 May 2009 10:22:18 +0000 (10:22 +0000)]
Parse typeof-specifier the same way as sizeof/alignof are parsed.

-Makes typeof consistent with sizeof/alignof
-Fixes a bug when '>' is in a typeof expression, inside a template type param:
  A<typeof(x>1)> a;

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

15 years agoPull EmitRecord() out of loop. It should be called only once.
Zhongxing Xu [Fri, 22 May 2009 08:38:27 +0000 (08:38 +0000)]
Pull EmitRecord() out of loop. It should be called only once.

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

15 years agoSet correct calling convention even if there is a bitcast in the way.
Torok Edwin [Fri, 22 May 2009 07:25:06 +0000 (07:25 +0000)]
Set correct calling convention even if there is a bitcast in the way.
This attempts to fix PR4239.

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

15 years ago(llvm up) Use llvm::Triple for storing target triples.
Daniel Dunbar [Fri, 22 May 2009 02:53:45 +0000 (02:53 +0000)]
(llvm up) Use llvm::Triple for storing target triples.
 - This commit has some messy stuff in it to extend string lifetimes, but that
   will go away once we switch to using the enum'd Triple interfaces.

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

15 years agoDon't rely on getArchName() to return a constant string reference.
Daniel Dunbar [Fri, 22 May 2009 02:21:04 +0000 (02:21 +0000)]
Don't rely on getArchName() to return a constant string reference.

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

15 years agoA few more tweaks for Solaris; please correct me if it's wrong somehow.
Eli Friedman [Fri, 22 May 2009 01:12:57 +0000 (01:12 +0000)]
A few more tweaks for Solaris; please correct me if it's wrong somehow.

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

15 years agoAdd --analyzer-no-default-checks and --analyzer-output options.
Daniel Dunbar [Fri, 22 May 2009 00:38:15 +0000 (00:38 +0000)]
Add --analyzer-no-default-checks and --analyzer-output options.

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

15 years agoImprove target support for Solaris.
Douglas Gregor [Thu, 21 May 2009 23:51:30 +0000 (23:51 +0000)]
Improve target support for Solaris.

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

15 years agoTemplate instantiation for C99 compound literals
Douglas Gregor [Thu, 21 May 2009 23:48:18 +0000 (23:48 +0000)]
Template instantiation for C99 compound literals

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

15 years agoTemplate instantiation for GNU array-range designators.
Douglas Gregor [Thu, 21 May 2009 23:30:39 +0000 (23:30 +0000)]
Template instantiation for GNU array-range designators.

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

15 years agoTemplate instantiation for C99 designated initializers, because we
Douglas Gregor [Thu, 21 May 2009 23:17:49 +0000 (23:17 +0000)]
Template instantiation for C99 designated initializers, because we
can. Also, delay semantic analysis of initialization for
value-dependent as well as type-dependent expressions, since we can't
always properly type-check a value-dependent expression.

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

15 years agoTemplate instantiation for initializer lists
Douglas Gregor [Thu, 21 May 2009 21:38:12 +0000 (21:38 +0000)]
Template instantiation for initializer lists

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

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