Chris Lattner
cf16983179
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit
...
llvm-svn: 67910
2009-03-28 04:11:33 +00:00
Ted Kremenek
cd58cced81
Text PathDiagnosticBuilder::getEnclosingStmt() about '?'
...
llvm-svn: 67909
2009-03-28 04:08:14 +00:00
Anders Carlsson
1894f0d499
Parse namespace aliases.
...
llvm-svn: 67908
2009-03-28 04:07:16 +00:00
Chris Lattner
040d4570c7
remove dead ivar.
...
llvm-svn: 67907
2009-03-28 04:05:05 +00:00
Chris Lattner
d070278ec9
simplify away some dead ownership stuff, TranslationUnit is now
...
just a wrapper around ASTContext.
llvm-svn: 67906
2009-03-28 04:00:23 +00:00
Chris Lattner
edf7eb77cf
hoist TranslationUnit some more.
...
llvm-svn: 67905
2009-03-28 03:56:54 +00:00
Chris Lattner
96c339a661
eliminate some wrappers.
...
llvm-svn: 67904
2009-03-28 03:53:02 +00:00
Chris Lattner
f7d9e2ba1c
eliminate ReadASTBitcodeFile
...
llvm-svn: 67903
2009-03-28 03:49:26 +00:00
Chris Lattner
d286851b57
move serialization logic from TranslationUnit to ASTContext.
...
llvm-svn: 67902
2009-03-28 03:45:20 +00:00
Ted Kremenek
b9411565ea
Teach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
...
etc., so that the "body" is always considered a top-level statement for edge
transitions (even if it is an expression).
llvm-svn: 67901
2009-03-28 03:37:59 +00:00
Chris Lattner
a0b08dcd6b
don't poke at TranslationUnit directly
...
llvm-svn: 67900
2009-03-28 03:29:40 +00:00
Eli Friedman
754d5ac658
Trivial cleanup.
...
llvm-svn: 67899
2009-03-28 03:27:06 +00:00
Eli Friedman
09a9b6e335
Move where block-related variables are initialized so that block
...
types don't get generated when blocks aren't used.
llvm-svn: 67898
2009-03-28 03:24:54 +00:00
Eli Friedman
7c7a0e86ae
Fix silly mistake in test.
...
llvm-svn: 67897
2009-03-28 03:14:28 +00:00
Eli Friedman
9127aa1caf
Minor cleanup.
...
llvm-svn: 67896
2009-03-28 03:10:45 +00:00
Eli Friedman
e381f7e3e9
Misc small fixes/cleanups/comment changes.
...
llvm-svn: 67895
2009-03-28 02:45:41 +00:00
Chris Lattner
5cf49fe587
eliminate ASTConsumer::InitializeTU, all clients are
...
happy with just ASTContext, they don't need a TU.
llvm-svn: 67894
2009-03-28 02:18:25 +00:00
Chris Lattner
8671ca9d97
revert mike's patch which broke test/CodeGen/no-common.c.
...
llvm-svn: 67893
2009-03-28 02:12:08 +00:00
Chris Lattner
7516668998
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Chris Lattner
a6f4ca2b6f
remove TranslationUnit::OwnsDecls, which is only set, never read.
...
llvm-svn: 67891
2009-03-28 01:44:40 +00:00
Chris Lattner
84bcc4795e
simplify ParseAST by sucking -disable-free handling logic up into
...
clang.cpp
llvm-svn: 67890
2009-03-28 01:37:17 +00:00
Eli Friedman
8b7b1b1aee
Change compound assignment operators to keep track of both the promoted
...
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.
Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.
I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.
llvm-svn: 67889
2009-03-28 01:22:36 +00:00
Anders Carlsson
0cb4cc106c
Implement access checking for protected base classes.
...
llvm-svn: 67887
2009-03-28 01:09:05 +00:00
Chris Lattner
2b9e7efccd
move StatListener out to top level.
...
llvm-svn: 67886
2009-03-28 00:55:35 +00:00
Douglas Gregor
5c7c9cb678
Make our diagnostics about the obsolete GNU designated-initializer
...
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.
llvm-svn: 67885
2009-03-28 00:41:23 +00:00
Chris Lattner
a94d139a1f
various cleanups, no functionality change
...
llvm-svn: 67883
2009-03-28 00:16:20 +00:00
Dan Gohman
2785e4be37
Fix what surely must be a copy+pasto.
...
llvm-svn: 67881
2009-03-27 23:55:04 +00:00
Douglas Gregor
c741fb15a5
Better way to free NestedNameSpecifiers. Thanks, Chris
...
llvm-svn: 67880
2009-03-27 23:54:10 +00:00
Dan Gohman
6d75876473
Initialize LiveOutInfo's APInt members to zero, as APInt's
...
default constructor produces an uninitialized APInt.
This fixes PR3896.
llvm-svn: 67879
2009-03-27 23:51:02 +00:00
Douglas Gregor
8aa6bf5b8e
Fix <rdar://problem/6724396>, where we were silently dropping
...
GNU-style array designators, causing us to emit broken initializers.
llvm-svn: 67878
2009-03-27 23:40:29 +00:00
Douglas Gregor
6fcec66525
Perform a very, very ugly song-and-dance number to free the
...
NestedNameSpecifiers without causing problems for the FoldingSet that
contains them.
llvm-svn: 67877
2009-03-27 23:25:45 +00:00
Devang Patel
afc1c1d405
Do not emit debug information for variables while generating optimized code. The llvm optimizer and code generator are not yet ready to support optimized code debugging.
...
llvm-svn: 67876
2009-03-27 23:16:32 +00:00
Douglas Gregor
333489bba3
Initial implementation of parsing, semantic analysis, and template
...
instantiation for C++ typename-specifiers such as
typename T::type
The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,
typename T::template apply<U, V>
Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.
Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.
llvm-svn: 67875
2009-03-27 23:10:48 +00:00
Jim Grosbach
669f1d0b0b
remove trailing whitespace
...
llvm-svn: 67874
2009-03-27 23:06:27 +00:00
Gabor Greif
41c8515b1b
"ghostify" the ilist<Function> sentinel
...
llvm-svn: 67872
2009-03-27 22:28:33 +00:00
Ted Kremenek
8f5ec29b91
Add missing header file change.
...
llvm-svn: 67871
2009-03-27 22:00:38 +00:00
Sebastian Redl
ec74096050
Better overload resolution for rvalue references.
...
llvm-svn: 67870
2009-03-27 21:36:42 +00:00
Ted Kremenek
7a621b9747
BugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
...
successor, using 'getEnclosingStmt()' to have the end location be the top-level
Stmt* enclosing the target Expr*.
llvm-svn: 67869
2009-03-27 21:16:25 +00:00
Eli Friedman
7044b76707
Finish off semantic analysis for regparm, and remove the warning. Also
...
remove a redundant error in CodeGen.
llvm-svn: 67868
2009-03-27 21:06:47 +00:00
Eli Friedman
6ecb5afcd6
Fix test failures caused by reading memory after freeing it. My fix is
...
rather nasty, but I can't think of a better fix off the top of my head.
llvm-svn: 67867
2009-03-27 20:56:17 +00:00
Ted Kremenek
41d865cbaa
BugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
...
PathDiagnosticLocation.
llvm-svn: 67866
2009-03-27 20:55:39 +00:00
Chris Lattner
8e097198fc
minor cleanups: make getIdentifierNamespace() be a single load
...
instead of a load + large inlined switch.
llvm-svn: 67864
2009-03-27 20:18:19 +00:00
Mike Stump
e5fdfd5930
Fixup -fcommon and -fno-common to be more gcc compatible.
...
llvm-svn: 67863
2009-03-27 20:15:22 +00:00
Mike Stump
ced6a2be04
Allow invertable -xno- style optins as well.
...
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Chris Lattner
17a1bfa9d8
reduce # const_casts, no functionality change.
...
llvm-svn: 67861
2009-03-27 19:19:59 +00:00
Anders Carlsson
af06b977f9
It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of:
...
class A {};
class B : private A {
void f(B *b) { A* a = b; }
};
llvm-svn: 67860
2009-03-27 19:01:12 +00:00
Anders Carlsson
93d35acb28
Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of.
...
llvm-svn: 67859
2009-03-27 18:54:29 +00:00
Chris Lattner
586c66d5ba
change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.
...
llvm-svn: 67858
2009-03-27 18:46:15 +00:00
Fariborz Jahanian
a2d609e2f1
Besides the warning, issue unsupported diagnostics in
...
ir gen. No intended change in functionality.
llvm-svn: 67857
2009-03-27 18:38:55 +00:00
Dan Gohman
8680802b1f
Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
...
llvm-svn: 67856
2009-03-27 18:37:13 +00:00