]>
granicus.if.org Git - clang/log
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
Eli Friedman [Mon, 18 May 2009 01:16:21 +0000 (01:16 +0000)]
Add some comments to ASTConsumers.h describing what the different
ASTConsumers actually do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 21:22:26 +0000 (21:22 +0000)]
Make ActOnWhileStmt take a FullExprArg for the condition expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 21:11:30 +0000 (21:11 +0000)]
Make ActOnExprStmt take a FullExprArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 19:43:12 +0000 (19:43 +0000)]
Fix instantiate-function-1.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 19:34:11 +0000 (19:34 +0000)]
Fix DISABLE_SMART_POINTERS build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 18:41:29 +0000 (18:41 +0000)]
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 18:26:53 +0000 (18:26 +0000)]
Add the FullExprArg wrapper and use it for if statement conditions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 17:41:20 +0000 (17:41 +0000)]
Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71981
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sun, 17 May 2009 16:49:27 +0000 (16:49 +0000)]
This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 16:28:18 +0000 (16:28 +0000)]
Add FIXME about not using MemberExpr nodes when the base type is a dependent type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71979
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 02:06:04 +0000 (02:06 +0000)]
Use the Itanium ABI for member pointers. Add a missing 'break' statement and a test case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 17 May 2009 01:05:34 +0000 (01:05 +0000)]
A couple of tweaks to make -ast-print produce code that's closer to
valid C code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 May 2009 00:00:05 +0000 (00:00 +0000)]
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/
6854087 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 23:59:08 +0000 (23:59 +0000)]
Add OldMD to the list of methods NewMD overrides
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 23:58:37 +0000 (23:58 +0000)]
Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 23:40:44 +0000 (23:40 +0000)]
Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 23:30:57 +0000 (23:30 +0000)]
Targets without long long should reduce the size of intmax_t
accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 23:27:50 +0000 (23:27 +0000)]
Refactor address-of-void extension a bit so that it's more obviously
correct. No functionality change, as far as I know.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 23:17:30 +0000 (23:17 +0000)]
A few minor updates to the user manual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71964
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 22:05:23 +0000 (22:05 +0000)]
Fix another case where the extern-ness of extern "C" wasn't being captured.
This makes me think that we should make hasExternalStorage perform this check...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 21:43:42 +0000 (21:43 +0000)]
Don't return member pointer types for static member functions. Fixes
6879261 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 21:24:10 +0000 (21:24 +0000)]
PR3942: Don't warn on unsigned overflow in preprocessor expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71960
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 21:02:39 +0000 (21:02 +0000)]
extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes
6853728 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 May 2009 20:31:20 +0000 (20:31 +0000)]
Improve checking of member expressions where the base type is a dependent type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 16 May 2009 19:30:01 +0000 (19:30 +0000)]
Update test case; I'm confused why this wasn't failing on the buildbot
though?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 16 May 2009 18:59:35 +0000 (18:59 +0000)]
Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 16 May 2009 18:50:46 +0000 (18:50 +0000)]
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 13:58:00 +0000 (13:58 +0000)]
Missing change for r71941 (PR2044).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 13:54:38 +0000 (13:54 +0000)]
Avoid calling mergeTypes in C++. I think these are the correct C++
alternatives, but please correct me if I'm wrong.
I eventually plan to assert in mergeTypes that we aren't in C++ mode
because composite types are fundamentally not a part of C++. The
remaining callers for code in the regression tests are
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 12:46:54 +0000 (12:46 +0000)]
Add stricter checking for va_arg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 12:15:55 +0000 (12:15 +0000)]
PR2044: reject declarations of functions returning variably modified
types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71941
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 May 2009 11:45:48 +0000 (11:45 +0000)]
PR3009: Get rid of bogus warning for scalar compound literals.
This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 16 May 2009 07:57:57 +0000 (07:57 +0000)]
Reflow some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 16 May 2009 07:39:55 +0000 (07:39 +0000)]
Reflow some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 16 May 2009 07:06:02 +0000 (07:06 +0000)]
Implement a FIXME, we now pass in the locations of the braces for enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930
91177308 -0d34-0410-b5e6-
96231b3b80d8