]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Anders Carlsson [Thu, 26 Mar 2009 01:19:02 +0000 (01:19 +0000)]
Factor the member access specifier setting code into its own function. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67725
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Mar 2009 00:52:18 +0000 (00:52 +0000)]
Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate.
Doug, Sebastian: Plz review! :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 26 Mar 2009 00:24:17 +0000 (00:24 +0000)]
Check that the access specifier of a member redeclaration is the same as the original declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 26 Mar 2009 00:18:06 +0000 (00:18 +0000)]
Fix for PR3869: actually enforce that the argument of an indirect goto
is of type void*. I'll try to add the appropriate checking later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Mar 2009 00:10:35 +0000 (00:10 +0000)]
The injected-class-name of class templates and class template
specializations can be treated as a template. Finally, we can parse
and process the first implementation of Fibonacci I wrote!
Note that this code does not handle all of the cases where
injected-class-names can be treated as templates. In particular,
there's an ambiguity case that we should be able to handle (but
can't), e.g.,
template <class T> struct Base { };
template <class T> struct Derived : Base<int>, Base<char> {
typename Derived::Base b; // error: ambiguous
typename Derived::Base<double> d; // OK
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 25 Mar 2009 23:38:06 +0000 (23:38 +0000)]
Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.
Also, fix fallout from the change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 23:32:15 +0000 (23:32 +0000)]
Implement template instantiation for static data members of class
templates, including in-class initializers. For example:
template<typename T, T Divisor>
class X {
public:
static const T value = 10 / Divisor;
};
instantiated with, e.g.,
X<int, 5>::value
to get the value '2'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 25 Mar 2009 22:36:49 +0000 (22:36 +0000)]
More for for objc2's ivar layout map (currently
is not in use).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 22:00:53 +0000 (22:00 +0000)]
Pass access specifiers through to member classes and member enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 21:23:52 +0000 (21:23 +0000)]
Fix notes regarding the instantiation of member classes (and test 'em).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 21:17:03 +0000 (21:17 +0000)]
Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.
This change also introduces the injected-class-name into a class
template specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 25 Mar 2009 21:08:24 +0000 (21:08 +0000)]
fix PR3880, fixing a comma swallowing bug handling macros that only take
... arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67706
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 25 Mar 2009 21:01:40 +0000 (21:01 +0000)]
remove some dead code. ArgTokens can never be empty, because it is always
terminated with an EOF token. The condition it is trying to check for is
handled by this code above.
// Empty arguments are standard in C99 and supported as an extension in
// other modes.
if (ArgTokens.empty() && !Features.C99)
Diag(Tok, diag::ext_empty_fnmacro_arg);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Mar 2009 20:34:07 +0000 (20:34 +0000)]
CMake: Also include header files in target when the generator is 'XCode'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 25 Mar 2009 20:19:57 +0000 (20:19 +0000)]
It doesn't make sense to set the access specifier to AS_none (I think)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 25 Mar 2009 18:05:39 +0000 (18:05 +0000)]
Remove -f__block as codegen for __block variables should be solid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 25 Mar 2009 17:58:24 +0000 (17:58 +0000)]
Fixup codegen for block literals that bleed copy/dispose information
from previous block literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67696
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 25 Mar 2009 17:56:16 +0000 (17:56 +0000)]
Update to account for the great driver renaming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 15:59:44 +0000 (15:59 +0000)]
Predicate to detect when a RecordDecl is really the injected-class-name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 15:45:12 +0000 (15:45 +0000)]
Stub out some declaration kinds that cannot ever be instantiated
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 15:40:00 +0000 (15:40 +0000)]
Fix parsing of template classes prefixed by nested-name-specifiers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 15:04:13 +0000 (15:04 +0000)]
Minor refactoring to eliminate an extra switch during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 06:58:31 +0000 (06:58 +0000)]
Driver: Implement Darwin_X86 tool chain level argument translation.
- This is really gross, but its the easiest way to match gcc. Once we
are confident in the driver, we can try and push these translations
down into tools.
- No test cases for this yet, it's hard to see the effects of these
translations before the gcc tool argument translation is pulled
over.
- Interaction with "unused argument" warning hasn't been worked out
yet.
- <rdar://problem/
6717359 > [driver] implement toolchain specific
argument translation.
"It's horrible in here."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 06:12:34 +0000 (06:12 +0000)]
Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 06:08:46 +0000 (06:08 +0000)]
Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 25 Mar 2009 05:58:37 +0000 (05:58 +0000)]
This patch adds two more SymbolData subclasses: SymIntExpr and SymSymExpr, for
representing symbolic expressions like 'x'+3 and 'x'+'y'. The design is
subjected to change later when we fix the class hierarchy of symbolic
expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 05:23:40 +0000 (05:23 +0000)]
Driver: Fix typo in JoinedAndSeparateArg::render.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 04:13:45 +0000 (04:13 +0000)]
Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.
- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.
- No intended functionality change.
Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 25 Mar 2009 03:28:08 +0000 (03:28 +0000)]
simplify some conditionals, don't copy LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Mar 2009 03:06:26 +0000 (03:06 +0000)]
gcc 4.3 finds my use of ^ suspicious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67673
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 25 Mar 2009 02:58:17 +0000 (02:58 +0000)]
Improve handling of base initializers. We now parse initializers in out of line decls, such as:
class C {
C() { }
int a;
};
C::C() : a(10) { }
We also diagnose when initializers are used on declarations that aren't constructors:
t.cpp:1:10: error: only constructors take base initializers
void f() : a(10) { }
^
Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67672
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 25 Mar 2009 02:54:43 +0000 (02:54 +0000)]
Add the .td files and remove the .def files from the Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Mar 2009 00:38:14 +0000 (00:38 +0000)]
Turn on -analyzer-eagerly-assume by default when using 'clang-cc' to perform
static analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 00:34:44 +0000 (00:34 +0000)]
Template instantiation for conversion functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Mar 2009 00:32:30 +0000 (00:32 +0000)]
Turn on '-analyzer-eagerly-assume' by default in ccc for the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 00:27:28 +0000 (00:27 +0000)]
Move template instantiation for expressions into a separate file
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67660
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Mar 2009 00:13:59 +0000 (00:13 +0000)]
In Parser::ParseClassSpecifier, don't conflate a NULL declaration with
failure to perform a declaration. Instead, explicitly note semantic
failures that occur during template parsing with a DeclResult. Fixes
PR3872.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67659
91177308 -0d34-0410-b5e6-
96231b3b80d8