]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Daniel Dunbar [Mon, 18 May 2009 17:43:32 +0000 (17:43 +0000)]
Simplify tests now that GNU runtime supports exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 18 May 2009 17:39:25 +0000 (17:39 +0000)]
Minor tweak to support format attribute on blocks. No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 May 2009 17:30:52 +0000 (17:30 +0000)]
Avoid potential out-of-bounds access in SourceManager::getLineNumber.
- Chris, please see added FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 18 May 2009 17:02:28 +0000 (17:02 +0000)]
Oops, dropped a -verify
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72016
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 18 May 2009 17:01:57 +0000 (17:01 +0000)]
When instantiating the definition of a member function of a class
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:
note: in instantiation of member function 'Switch1<int, 2, 2>::f'
requested here
in the template instantiation backtrace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 May 2009 16:49:49 +0000 (16:49 +0000)]
Improve test case a wee bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 May 2009 16:48:48 +0000 (16:48 +0000)]
Silence a Release-Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 18 May 2009 13:56:52 +0000 (13:56 +0000)]
Fix for PR2386: distinguish between insertion and replacements in the
delta tree.
The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.
Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.
There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.
This is relatively sensitive code, so please test and tell me if
anything breaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 18 May 2009 07:48:06 +0000 (07:48 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 18 May 2009 07:39:39 +0000 (07:39 +0000)]
Remove unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71996
91177308 -0d34-0410-b5e6-
96231b3b80d8