]>
granicus.if.org Git - clang/log
Chris Lattner [Sat, 28 Mar 2009 06:53:40 +0000 (06:53 +0000)]
some random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:47:16 +0000 (06:47 +0000)]
eliminate unneeded iterator wrappers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:44:59 +0000 (06:44 +0000)]
change NamespaceDecl to hold its 'NextNamespace' pointer itself
instead of in NextDeclarator. This temporarily increases memory
usage, but simplifies and decouples things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 06:42:02 +0000 (06:42 +0000)]
Check that the alias points to a valid namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 28 Mar 2009 06:40:54 +0000 (06:40 +0000)]
Properly escape special characters in <string>'s in plist file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:33:19 +0000 (06:33 +0000)]
rename some methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:26:18 +0000 (06:26 +0000)]
Cleanups for DeclGroup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 06:23:46 +0000 (06:23 +0000)]
Check that the namespace alias doesn't conflict with a previous declaration in this scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:13:37 +0000 (06:13 +0000)]
tidy whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67920
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 06:04:26 +0000 (06:04 +0000)]
rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 05:59:45 +0000 (05:59 +0000)]
simplify getNextDeclInScope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 05:44:17 +0000 (05:44 +0000)]
reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 05:27:17 +0000 (05:27 +0000)]
Add an ActOnNamespaceAliasDef action and have the parser call it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:31:31 +0000 (04:31 +0000)]
remove TranslationUnit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:27:18 +0000 (04:27 +0000)]
push more ASTContext goodness out through interfaces that use
TranslationUnit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 04:17:27 +0000 (04:17 +0000)]
Revert Sebastian's rvalue patch (r67870) since it caused test failures in
SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67912
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:13:34 +0000 (04:13 +0000)]
remove TranslationUnit from ParseAST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:11:33 +0000 (04:11 +0000)]
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 28 Mar 2009 04:08:14 +0000 (04:08 +0000)]
Text PathDiagnosticBuilder::getEnclosingStmt() about '?'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 04:07:16 +0000 (04:07 +0000)]
Parse namespace aliases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:05:05 +0000 (04:05 +0000)]
remove dead ivar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 04:00:23 +0000 (04:00 +0000)]
simplify away some dead ownership stuff, TranslationUnit is now
just a wrapper around ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 03:56:54 +0000 (03:56 +0000)]
hoist TranslationUnit some more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 03:53:02 +0000 (03:53 +0000)]
eliminate some wrappers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 03:49:26 +0000 (03:49 +0000)]
eliminate ReadASTBitcodeFile
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 03:45:20 +0000 (03:45 +0000)]
move serialization logic from TranslationUnit to ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 28 Mar 2009 03:37:59 +0000 (03:37 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 03:29:40 +0000 (03:29 +0000)]
don't poke at TranslationUnit directly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 03:27:06 +0000 (03:27 +0000)]
Trivial cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67899
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 03:24:54 +0000 (03:24 +0000)]
Move where block-related variables are initialized so that block
types don't get generated when blocks aren't used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 03:14:28 +0000 (03:14 +0000)]
Fix silly mistake in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 03:10:45 +0000 (03:10 +0000)]
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 02:45:41 +0000 (02:45 +0000)]
Misc small fixes/cleanups/comment changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67895
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 02:18:25 +0000 (02:18 +0000)]
eliminate ASTConsumer::InitializeTU, all clients are
happy with just ASTContext, they don't need a TU.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 02:12:08 +0000 (02:12 +0000)]
revert mike's patch which broke test/CodeGen/no-common.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 01:44:40 +0000 (01:44 +0000)]
remove TranslationUnit::OwnsDecls, which is only set, never read.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 01:37:17 +0000 (01:37 +0000)]
simplify ParseAST by sucking -disable-free handling logic up into
clang.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 28 Mar 2009 01:22:36 +0000 (01:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 28 Mar 2009 01:09:05 +0000 (01:09 +0000)]
Implement access checking for protected base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 00:55:35 +0000 (00:55 +0000)]
move StatListener out to top level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67886
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 28 Mar 2009 00:41:23 +0000 (00:41 +0000)]
Make our diagnostics about the obsolete GNU designated-initializer
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 00:16:20 +0000 (00:16 +0000)]
various cleanups, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67883
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 23:54:10 +0000 (23:54 +0000)]
Better way to free NestedNameSpecifiers. Thanks, Chris
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 23:40:29 +0000 (23:40 +0000)]
Fix <rdar://problem/
6724396 >, where we were silently dropping
GNU-style array designators, causing us to emit broken initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 23:25:45 +0000 (23:25 +0000)]
Perform a very, very ugly song-and-dance number to free the
NestedNameSpecifiers without causing problems for the FoldingSet that
contains them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67877
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 27 Mar 2009 23:16:32 +0000 (23:16 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 23:10:48 +0000 (23:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 22:00:38 +0000 (22:00 +0000)]
Add missing header file change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 27 Mar 2009 21:36:42 +0000 (21:36 +0000)]
Better overload resolution for rvalue references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 21:16:25 +0000 (21:16 +0000)]
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*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 Mar 2009 21:06:47 +0000 (21:06 +0000)]
Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 27 Mar 2009 20:56:17 +0000 (20:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 20:55:39 +0000 (20:55 +0000)]
BugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
PathDiagnosticLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67866
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Mar 2009 20:18:19 +0000 (20:18 +0000)]
minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 27 Mar 2009 20:15:22 +0000 (20:15 +0000)]
Fixup -fcommon and -fno-common to be more gcc compatible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Mar 2009 19:19:59 +0000 (19:19 +0000)]
reduce # const_casts, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 19:01:12 +0000 (19:01 +0000)]
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; }
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 18:54:29 +0000 (18:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Mar 2009 18:46:15 +0000 (18:46 +0000)]
change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 27 Mar 2009 18:38:55 +0000 (18:38 +0000)]
Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Mar 2009 17:13:49 +0000 (17:13 +0000)]
push line markers through -E mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 16:32:57 +0000 (16:32 +0000)]
Update "Getting Started" with more current information about 'clang-cc' and 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 15:53:20 +0000 (15:53 +0000)]
analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 15:31:11 +0000 (15:31 +0000)]
Emit aggregate "location" for PathDiagnostic to plist. This fixes <rdar://problem/
6729558 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67845
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 15:24:36 +0000 (15:24 +0000)]
Move declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagnostic::getLocation().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 27 Mar 2009 15:22:28 +0000 (15:22 +0000)]
Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
- This still has issue that derived arguments don't propogate "used"
information correctly so spurious "argument unused" warnings will
still show up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 14:59:04 +0000 (14:59 +0000)]
PathDiagnostic: replace 'std::list' with 'std::deque'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 14:54:49 +0000 (14:54 +0000)]
Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67838
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 27 Mar 2009 14:26:33 +0000 (14:26 +0000)]
Driver: -print-libgcc-file-name was searching wrong path list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 06:03:27 +0000 (06:03 +0000)]
Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 06:00:30 +0000 (06:00 +0000)]
If the user is trying to apply the -> or . member reference operator
to a function or function pointer, it's probably because the user
forgot to put in parentheses () to call the function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 27 Mar 2009 05:31:12 +0000 (05:31 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 05:18:33 +0000 (05:18 +0000)]
Update CMake
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 05:10:56 +0000 (05:10 +0000)]
Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 05:06:10 +0000 (05:06 +0000)]
BugReporter:
- Added an internal helper class 'PathDiagnosticBuilder' which now bundles the
'ExecutionContinues' methods.
- Added preliminary diagnostics for short-circuit '&&' and '||'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67822
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 05:05:05 +0000 (05:05 +0000)]
Add a stubbed out CheckBaseClassAccess method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 04:54:36 +0000 (04:54 +0000)]
Move Sema::SetMemberAccessSpecifier to SemaAccess.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 27 Mar 2009 04:43:36 +0000 (04:43 +0000)]
Add SemaAccess.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 04:38:56 +0000 (04:38 +0000)]
Improve recovery when a constructor fails to type-check. Test case from Anders
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 04:21:56 +0000 (04:21 +0000)]
Tests and fixes for templates declared within (non-template)
classes. Test case from Anders Carlsson, fix from Piotr Rak!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Mar 2009 04:18:06 +0000 (04:18 +0000)]
Fix rdar://
6719156 - clang should emit a better error when blocks are disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled
in Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 27 Mar 2009 02:22:41 +0000 (02:22 +0000)]
remove the updated notes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67813
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 27 Mar 2009 02:22:03 +0000 (02:22 +0000)]
- Fix thinko in implementation of PathDiagnosticLocation::asStmt(). Thanks to
Anders Johnsen for pointing this out.
- Have PathDiagnosticControlFlowPiece take PathDiagnosticLocation for the
arguments to its constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 27 Mar 2009 00:40:20 +0000 (00:40 +0000)]
Fix searching for gcc, we only want executable files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 27 Mar 2009 00:03:43 +0000 (00:03 +0000)]
Clarify that QualifiedNameType is sugar-only. This will matter once we can parse typename-specifiers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Mar 2009 23:57:56 +0000 (23:57 +0000)]
Put back __OBJC2__ definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Mar 2009 23:56:24 +0000 (23:56 +0000)]
Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Mar 2009 23:50:42 +0000 (23:50 +0000)]
Revamp our representation of C++ nested-name-specifiers. We now have a
uniqued representation that should both save some memory and make it
far easier to properly build canonical types for types involving
dependent nested-name-specifiers, e.g., "typename T::Nested::type".
This approach will greatly simplify the representation of
CXXScopeSpec. That'll be next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Mar 2009 23:48:49 +0000 (23:48 +0000)]
I said _fix_ the build, don't break it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Mar 2009 23:47:48 +0000 (23:47 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Mar 2009 23:46:50 +0000 (23:46 +0000)]
Add
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
AccessSpecifier AS);
so we can easily add access specifiers to diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 23:12:02 +0000 (23:12 +0000)]
- Add class PathDiagosticLocationPair.
- Have PathDiagnosticControlFlowPiece use a vector of PathDiagnosticLocationPairs to represent transitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:48:17 +0000 (21:48 +0000)]
Implement PathDiagnosticLocation::asRange() and PathDiagnosticLocation::asStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:42:51 +0000 (21:42 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:42:00 +0000 (21:42 +0000)]
Restructure code to silence bogus GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:39:39 +0000 (21:39 +0000)]
- Implement PathDiagnosticLocation::asLocation.
- Switch PathDiagnosticEventPiece and PathDiagnosticMacroPiece to use
PathDiagnosticLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:36:37 +0000 (21:36 +0000)]
Because of the use of 'cast<TagDecl>', ASTContext.h now depends on Decl.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 26 Mar 2009 21:25:00 +0000 (21:25 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Mar 2009 21:21:35 +0000 (21:21 +0000)]
PathDiagnostics (analyzer):
- Added a new class, 'PathDiagnosticLocation', that is a variant for
SourceLocation, SourceRange, or Stmt*. This will be used soon by
PathDiagnosticPieces to describe locations for targets of branches, locations
of events, etc.
- Did some prep. refactoring of PathDiagnosticPieces to prepare them for
adopting the new PathDiagnosticLocation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Mar 2009 19:10:36 +0000 (19:10 +0000)]
- Minor change to dump of ivar layout map.
- Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode
as it was forcing ivar synthesis in a certain project which clang
does not yet support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67766
91177308 -0d34-0410-b5e6-
96231b3b80d8