]> granicus.if.org Git - clang/log
clang
15 years agoremove dead ivar.
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

15 years agosimplify away some dead ownership stuff, TranslationUnit is now
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

15 years agohoist TranslationUnit some more.
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

15 years agoeliminate some wrappers.
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

15 years agoeliminate ReadASTBitcodeFile
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

15 years agomove serialization logic from TranslationUnit to ASTContext.
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

15 years agoTeach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
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

15 years agodon't poke at TranslationUnit directly
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

15 years agoTrivial cleanup.
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

15 years agoMove where block-related variables are initialized so that block
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

15 years agoFix silly mistake in test.
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

15 years agoMinor cleanup.
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

15 years agoMisc small fixes/cleanups/comment changes.
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

15 years agoeliminate ASTConsumer::InitializeTU, all clients are
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

15 years agorevert mike's patch which broke test/CodeGen/no-common.c.
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

15 years agoremove TranslationUnit::OwnsDecls, which is only set, never read.
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

15 years agosimplify ParseAST by sucking -disable-free handling logic up into
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

15 years agoChange compound assignment operators to keep track of both the promoted
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

15 years agoImplement access checking for protected base classes.
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

15 years agomove StatListener out to top level.
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

15 years agoMake our diagnostics about the obsolete GNU designated-initializer
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

15 years agovarious cleanups, no functionality change
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

15 years agoBetter way to free NestedNameSpecifiers. Thanks, Chris
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

15 years agoFix <rdar://problem/6724396>, where we were silently dropping
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

15 years agoPerform a very, very ugly song-and-dance number to free the
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

15 years agoDo not emit debug information for variables while generating optimized code. The...
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

15 years agoInitial implementation of parsing, semantic analysis, and template
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

15 years agoAdd missing header file change.
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

15 years agoBetter overload resolution for rvalue references.
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

15 years agoBugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
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

15 years agoFinish off semantic analysis for regparm, and remove the warning. Also
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

15 years agoFix test failures caused by reading memory after freeing it. My fix is
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

15 years agoBugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
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

15 years agominor cleanups: make getIdentifierNamespace() be a single load
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

15 years agoFixup -fcommon and -fno-common to be more gcc compatible.
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

15 years agoreduce # const_casts, no functionality change.
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

15 years agoIt is OK to cast to a private base class if the current member belongs to the class...
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

15 years agoAdd a Class field to the base path element structure. This holds the record decl...
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

15 years agochange Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.
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

15 years agoBesides the warning, issue unsupported diagnostics in
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

15 years agopush line markers through -E mode.
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

15 years agoUpdate "Getting Started" with more current information about 'clang-cc' and 'clang'.
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

15 years agoanalyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
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

15 years agoEmit aggregate "location" for PathDiagnostic to plist. This fixes <rdar://problem...
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

15 years agoMove declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagn...
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

15 years agoDriver: Pass -f[no-]pascal-strings on to clang, even if it has been
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

15 years agoPathDiagnostic: replace 'std::list' with 'std::deque'
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

15 years agoAdd iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
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

15 years agoDriver: -print-libgcc-file-name was searching wrong path list.
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

15 years agoImplement checking for base class access. Right now it's overly conservative but...
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

15 years agoIf the user is trying to apply the -> or . member reference operator
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

15 years agoremove dead code.
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

15 years agoUpdate CMake
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

15 years agoRemove the code insertion hint for implicit int. Too often, we're wrong about this...
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

15 years agoBugReporter:
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

15 years agoAdd a stubbed out CheckBaseClassAccess method.
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

15 years agoMove Sema::SetMemberAccessSpecifier to SemaAccess.cpp
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

15 years agoAdd SemaAccess.cpp
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

15 years agoImprove recovery when a constructor fails to type-check. Test case from Anders
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

15 years agoTests and fixes for templates declared within (non-template)
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

15 years agoFix rdar://6719156 - clang should emit a better error when blocks are disabled but...
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

15 years agoremove the updated notes.
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

15 years ago- Fix thinko in implementation of PathDiagnosticLocation::asStmt(). Thanks to
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

15 years agoFix searching for gcc, we only want executable files.
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

15 years agoClarify that QualifiedNameType is sugar-only. This will matter once we can parse...
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

15 years agoPut back __OBJC2__ definition.
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

15 years agoSimplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here
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

15 years agoRevamp our representation of C++ nested-name-specifiers. We now have a
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

15 years agoI said _fix_ the build, don't break it.
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

15 years agoFix build.
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

15 years agoAdd
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

15 years ago- Add class PathDiagosticLocationPair.
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

15 years agoImplement PathDiagnosticLocation::asRange() and PathDiagnosticLocation::asStmt().
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

15 years agoAdd comment.
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

15 years agoRestructure code to silence bogus GCC warning.
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

15 years ago- Implement PathDiagnosticLocation::asLocation.
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

15 years agoBecause of the use of 'cast<TagDecl>', ASTContext.h now depends on Decl.h.
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

15 years agoRemove dead code.
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

15 years agoPathDiagnostics (analyzer):
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

15 years ago- Minor change to dump of ivar layout map.
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

15 years agoDriver: Forward -fno-common to clang.
Daniel Dunbar [Thu, 26 Mar 2009 16:37:00 +0000 (16:37 +0000)]
Driver: Forward -fno-common to clang.
 - <rdar://problem/6710978> ccc/clang-driver ignore -fno-common

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

15 years agoDriver: Test case for darwin::Link
Daniel Dunbar [Thu, 26 Mar 2009 16:29:05 +0000 (16:29 +0000)]
Driver: Test case for darwin::Link

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

15 years agoDriver: Add darwin::Link tool.
Daniel Dunbar [Thu, 26 Mar 2009 16:23:12 +0000 (16:23 +0000)]
Driver: Add darwin::Link tool.
 - <rdar://problem/6717381> [driver] implement ld argument translation
   in new driver

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

15 years agoAdd a high-level intro to the memory regions design document.
Ted Kremenek [Thu, 26 Mar 2009 16:19:54 +0000 (16:19 +0000)]
Add a high-level intro to the memory regions design document.

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

15 years agoDriver: Fix a number of option definition mismatches (flags instead of
Daniel Dunbar [Thu, 26 Mar 2009 16:12:09 +0000 (16:12 +0000)]
Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.

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

15 years agoDriver: Print the correct target when printing the version.
Daniel Dunbar [Thu, 26 Mar 2009 16:09:13 +0000 (16:09 +0000)]
Driver: Print the correct target when printing the version.

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

15 years agoFix <rdar://problem/6697053> instance variable is protected.
Steve Naroff [Thu, 26 Mar 2009 16:01:08 +0000 (16:01 +0000)]
Fix <rdar://problem/6697053> instance variable is protected.

Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline.

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

15 years agoDriver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.
Daniel Dunbar [Thu, 26 Mar 2009 15:58:36 +0000 (15:58 +0000)]
Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.

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

15 years agoDriver: Add ArgList::AddAllArgsTranslated; for forwarding options to
Daniel Dunbar [Thu, 26 Mar 2009 15:39:22 +0000 (15:39 +0000)]
Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.

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

15 years agoMove "regions" analyzer design document to 'docs'.
Ted Kremenek [Thu, 26 Mar 2009 15:29:38 +0000 (15:29 +0000)]
Move "regions" analyzer design document to 'docs'.

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

15 years agoSimplify some code. No functionality change.
Zhongxing Xu [Thu, 26 Mar 2009 08:40:37 +0000 (08:40 +0000)]
Simplify some code. No functionality change.

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

15 years agoCheck in some design documents to centralize ideas around region store and the
Zhongxing Xu [Thu, 26 Mar 2009 08:23:58 +0000 (08:23 +0000)]
Check in some design documents to centralize ideas around region store and the
analysis engine.

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

15 years agoSanity-check argument to indirect goto.
Eli Friedman [Thu, 26 Mar 2009 07:32:37 +0000 (07:32 +0000)]
Sanity-check argument to indirect goto.

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

15 years agohopefully fix VC++ build error.
Chris Lattner [Thu, 26 Mar 2009 05:56:24 +0000 (05:56 +0000)]
hopefully fix VC++ build error.

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

15 years agomost of this is plumbing to get CompileOptions down into
Chris Lattner [Thu, 26 Mar 2009 05:00:52 +0000 (05:00 +0000)]
most of this is plumbing to get CompileOptions down into
CodeGenModule.  Once there, add a new NoCommon option to
it and implement -fno-common.

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

15 years agomake this self contained, declare everything as 'class'.
Chris Lattner [Thu, 26 Mar 2009 05:00:03 +0000 (05:00 +0000)]
make this self contained, declare everything as 'class'.

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

15 years agosort items.
Chris Lattner [Thu, 26 Mar 2009 04:59:37 +0000 (04:59 +0000)]
sort items.

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

15 years agoadd driver and clang-cc to project.
Chris Lattner [Thu, 26 Mar 2009 04:27:05 +0000 (04:27 +0000)]
add driver and clang-cc to project.

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

15 years agoanalyzer infrastructure: make a bunch of changes to symbolic expressions that
Ted Kremenek [Thu, 26 Mar 2009 03:35:11 +0000 (03:35 +0000)]
analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.

Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)

This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.

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

15 years agoSet the access specifier for templates inside classes.
Anders Carlsson [Thu, 26 Mar 2009 01:24:28 +0000 (01:24 +0000)]
Set the access specifier for templates inside classes.

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