]> granicus.if.org Git - clang/log
clang
15 years agoCheck in test for namespace aliases+using directives.
Anders Carlsson [Tue, 31 Mar 2009 05:47:19 +0000 (05:47 +0000)]
Check in test for namespace aliases+using directives.

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

15 years agoDocument NamespaceAliasDecl.
Anders Carlsson [Tue, 31 Mar 2009 04:51:13 +0000 (04:51 +0000)]
Document NamespaceAliasDecl.

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

15 years agoUpdate test case.
Ted Kremenek [Tue, 31 Mar 2009 03:34:38 +0000 (03:34 +0000)]
Update test case.

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

15 years agoParsing and AST representation for dependent template names that occur
Douglas Gregor [Tue, 31 Mar 2009 00:43:58 +0000 (00:43 +0000)]
Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in

  typename MetaFun::template apply<T1, T2>::type

At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.

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

15 years agofe support for objc2's nonfragile-abi synthesized ivars.
Fariborz Jahanian [Tue, 31 Mar 2009 00:06:29 +0000 (00:06 +0000)]
fe support for objc2's nonfragile-abi synthesized ivars.

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

15 years agoImplement UCN support for C string literals (C99 6.4.3) and add some very basic tests...
Steve Naroff [Mon, 30 Mar 2009 23:46:03 +0000 (23:46 +0000)]
Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.

From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.

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

15 years agoSlight generalization for Evaluate with const variables.
Eli Friedman [Mon, 30 Mar 2009 23:39:01 +0000 (23:39 +0000)]
Slight generalization for Evaluate with const variables.

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

15 years agoImprove the representation of template names in the AST. This
Douglas Gregor [Mon, 30 Mar 2009 22:58:21 +0000 (22:58 +0000)]
Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

  std::(vector<int>)

we represent it as

  (std::vector)<int>

which more closely follows the C++ grammar.

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.

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

15 years agoAdd partial CFG support for Objective-C exception-handling blocks. We basically
Ted Kremenek [Mon, 30 Mar 2009 22:29:21 +0000 (22:29 +0000)]
Add partial CFG support for Objective-C exception-handling blocks. We basically
assume that @catch blocks are never executed.

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

15 years agoRe-apply 68028. The code had drifted enough that the tests would fail without
Ted Kremenek [Mon, 30 Mar 2009 22:20:54 +0000 (22:20 +0000)]
Re-apply 68028. The code had drifted enough that the tests would fail without
it.  Will discuss offline whether symbolic regions should by typed or typeless.

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

15 years agoComment fix.
Daniel Dunbar [Mon, 30 Mar 2009 22:11:38 +0000 (22:11 +0000)]
Comment fix.

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

15 years agoRevert 68028.
Ted Kremenek [Mon, 30 Mar 2009 21:56:17 +0000 (21:56 +0000)]
Revert 68028.

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

15 years agoAdded new info to property impl. AST node to support
Fariborz Jahanian [Mon, 30 Mar 2009 21:33:50 +0000 (21:33 +0000)]
Added new info to property impl. AST node to support
objc2's ivar synthesis.

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

15 years agoRemove dead code.
Ted Kremenek [Mon, 30 Mar 2009 21:27:41 +0000 (21:27 +0000)]
Remove dead code.

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

15 years agoImplement -Wno-pointer-sign.
Eli Friedman [Mon, 30 Mar 2009 21:19:48 +0000 (21:19 +0000)]
Implement -Wno-pointer-sign.

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

15 years agoDriver: Sketch FreeBSD tool chain.
Daniel Dunbar [Mon, 30 Mar 2009 21:06:03 +0000 (21:06 +0000)]
Driver: Sketch FreeBSD tool chain.
 - Patch by Ed Schouten!

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

15 years agoCode gen does not yet supports __asm__ on a variable
Fariborz Jahanian [Mon, 30 Mar 2009 20:32:06 +0000 (20:32 +0000)]
Code gen does not yet supports __asm__ on a variable
declaration. Reject it.

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

15 years agoSimplify more code by using SVal::getAsSymbol().
Ted Kremenek [Mon, 30 Mar 2009 19:53:37 +0000 (19:53 +0000)]
Simplify more code by using SVal::getAsSymbol().

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

15 years agoSimplify more code by using SVal::getAsSymbol() instead of
Ted Kremenek [Mon, 30 Mar 2009 18:45:36 +0000 (18:45 +0000)]
Simplify more code by using SVal::getAsSymbol() instead of
loc::SymbolVal/nonloc::SymbolVal probing.

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

15 years agoConvert use of loc::SymbolVal and nonloc::SymbolVal to V.getAsSymbol(). This
Ted Kremenek [Mon, 30 Mar 2009 18:39:15 +0000 (18:39 +0000)]
Convert use of loc::SymbolVal and nonloc::SymbolVal to V.getAsSymbol(). This
also makes this code more correct as it transparently handles SVals that wrapped
TypedViewRegions(SymbolicRegions).

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

15 years agoAdd another uninitialized values test case illustrating that the CFG correctly
Ted Kremenek [Mon, 30 Mar 2009 18:29:27 +0000 (18:29 +0000)]
Add another uninitialized values test case illustrating that the CFG correctly
handles declarations with multiple variables.

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

15 years agoRemove a trivial FIXME
Douglas Gregor [Mon, 30 Mar 2009 18:22:51 +0000 (18:22 +0000)]
Remove a trivial FIXME

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

15 years agoDriver: Unbreak ArgList::hasFlag.
Daniel Dunbar [Mon, 30 Mar 2009 18:13:26 +0000 (18:13 +0000)]
Driver: Unbreak ArgList::hasFlag.
 - <rdar://problem/6726511> [driver] clang does not have -msoft-float
   hooked up.

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

15 years agoUse CodeGenModule API for ObjC runtime function references.
Fariborz Jahanian [Mon, 30 Mar 2009 18:02:14 +0000 (18:02 +0000)]
Use CodeGenModule API for ObjC runtime function references.
Patch by David Chisnall.

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

15 years agoFix -MD with no -MT when -o is specified (and fix test case).
Daniel Dunbar [Mon, 30 Mar 2009 17:59:58 +0000 (17:59 +0000)]
Fix -MD with no -MT when -o is specified (and fix test case).

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

15 years agoAdd version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
Ted Kremenek [Mon, 30 Mar 2009 17:53:05 +0000 (17:53 +0000)]
Add version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
will be called for every expression in a basic block.

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

15 years agoSome very rough Driver documentation.
Daniel Dunbar [Mon, 30 Mar 2009 06:50:01 +0000 (06:50 +0000)]
Some very rough Driver documentation.

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

15 years agoMissed test case update (part of previous commit)
Daniel Dunbar [Mon, 30 Mar 2009 06:49:40 +0000 (06:49 +0000)]
Missed test case update (part of previous commit)

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

15 years agoMake SymbolicRegion untyped.
Zhongxing Xu [Mon, 30 Mar 2009 06:48:56 +0000 (06:48 +0000)]
Make SymbolicRegion untyped.
Layer the type information with a TypedViewRegion on top of the SymbolicRegion.

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

15 years agoDriver: Support -M and -MM.
Daniel Dunbar [Mon, 30 Mar 2009 06:36:42 +0000 (06:36 +0000)]
Driver: Support -M and -MM.
 - Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.

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

15 years agoImplement a FIXME.
Zhongxing Xu [Mon, 30 Mar 2009 05:55:46 +0000 (05:55 +0000)]
Implement a FIXME.

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

15 years agoImprove dependency file support.
Daniel Dunbar [Mon, 30 Mar 2009 00:34:04 +0000 (00:34 +0000)]
Improve dependency file support.
 - Rip out various bits of logic from clang-cc's dependency file gen,
   force driver to provide instead.

 - -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name

 - -M and -MM still don't work correctly.

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

15 years agoHopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind...
Sebastian Redl [Sun, 29 Mar 2009 22:46:24 +0000 (22:46 +0000)]
Hopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind complains.

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

15 years agoDriver: Track which original arguments an arg is derived from, so that
Daniel Dunbar [Sun, 29 Mar 2009 22:29:05 +0000 (22:29 +0000)]
Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.

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

15 years agoDriver: Add test case for darwin::Preprocess and darwin::Compile
Daniel Dunbar [Sun, 29 Mar 2009 22:27:40 +0000 (22:27 +0000)]
Driver: Add test case for darwin::Preprocess and darwin::Compile
tools, and enable them.

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

15 years agoDriver: Make sure to claim -### before emitting "unused argument"
Daniel Dunbar [Sun, 29 Mar 2009 22:24:54 +0000 (22:24 +0000)]
Driver: Make sure to claim -### before emitting "unused argument"
warnings.

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

15 years agoFix typo in diagnostic.
Daniel Dunbar [Sun, 29 Mar 2009 22:23:49 +0000 (22:23 +0000)]
Fix typo in diagnostic.

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

15 years agoFix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup
Eli Friedman [Sun, 29 Mar 2009 20:31:09 +0000 (20:31 +0000)]
Fix the default for intptr_t on *BSD x86-32 and Windows.  Slight cleanup
by moving the general case to the generic x86-32 target.

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

15 years agoDriver: Finish porting Darwin::Preprocess and Compile port (still
Daniel Dunbar [Sun, 29 Mar 2009 18:40:18 +0000 (18:40 +0000)]
Driver: Finish porting Darwin::Preprocess and Compile port (still
unused, and lacking a test case).
 - ccc is now on death row, pending some more testing and bug fixes.

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

15 years agominor simplification
Chris Lattner [Sun, 29 Mar 2009 17:29:28 +0000 (17:29 +0000)]
minor simplification

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

15 years agohoist some code for handling objc foreach construct out of Declaration processing
Chris Lattner [Sun, 29 Mar 2009 17:27:48 +0000 (17:27 +0000)]
hoist some code for handling objc foreach construct out of Declaration processing
into ParseForStatement.  Merge two tests into one.

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

15 years agohoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
Chris Lattner [Sun, 29 Mar 2009 17:18:04 +0000 (17:18 +0000)]
hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
into ParseSimpleDeclaration, and improve a diagnostic.

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

15 years agoDriver: Start porting Darwin::Preprocess and Compile implementations
Daniel Dunbar [Sun, 29 Mar 2009 17:08:39 +0000 (17:08 +0000)]
Driver: Start porting Darwin::Preprocess and Compile implementations
(currently unused).

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

15 years agoPush DeclGroup much farther throughout the compiler. Now the various
Chris Lattner [Sun, 29 Mar 2009 16:50:03 +0000 (16:50 +0000)]
Push DeclGroup much farther throughout the compiler.  Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc).  These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
   be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.

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

15 years agoDeclRefExpr refers to one decl, not all the declarators in a declaration.
Chris Lattner [Sun, 29 Mar 2009 16:35:09 +0000 (16:35 +0000)]
DeclRefExpr refers to one decl, not all the declarators in a declaration.

Ted, please check this, this change causes no regression tests to fail.

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

15 years agosimplify
Chris Lattner [Sun, 29 Mar 2009 16:04:50 +0000 (16:04 +0000)]
simplify

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

15 years agoReintroduce r67870 (rval ref overloading), since I can't reproduce any test failures...
Sebastian Redl [Sun, 29 Mar 2009 15:27:50 +0000 (15:27 +0000)]
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.

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

15 years agoImplement PointerLikeTypeTraits for DeclGroupRef.
Chris Lattner [Sun, 29 Mar 2009 14:23:52 +0000 (14:23 +0000)]
Implement PointerLikeTypeTraits for DeclGroupRef.
Make OpaquePtr work with things that are pointer-like but not
necessarily pointers.

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

15 years agoreduce indentation with an early exit.
Chris Lattner [Sun, 29 Mar 2009 14:02:43 +0000 (14:02 +0000)]
reduce indentation with an early exit.

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

15 years agoremove unused #include
Chris Lattner [Sun, 29 Mar 2009 07:05:59 +0000 (07:05 +0000)]
remove unused #include

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

15 years agoswitch TemplateOrInstantiation to be a PointerUnion, which
Chris Lattner [Sun, 29 Mar 2009 07:03:59 +0000 (07:03 +0000)]
switch TemplateOrInstantiation to be a PointerUnion, which
simplifies some code.

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

15 years agochange another PointerIntPair into a PointerUnion.
Chris Lattner [Sun, 29 Mar 2009 06:43:22 +0000 (06:43 +0000)]
change another PointerIntPair into a PointerUnion.

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

15 years agoswitch DeclBase::DeclCtx to the new happy and type-safe
Chris Lattner [Sun, 29 Mar 2009 06:06:59 +0000 (06:06 +0000)]
switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.

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

15 years agoMake the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.
Chris Lattner [Sun, 29 Mar 2009 05:08:48 +0000 (05:08 +0000)]
Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.

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

15 years agogenericize the ActionResult optimization for holding the "ininvalid" bit
Chris Lattner [Sun, 29 Mar 2009 05:04:26 +0000 (05:04 +0000)]
genericize the ActionResult optimization for holding the "ininvalid" bit
in the low bit position a little bit (haha).

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

15 years agovarious cleanups
Chris Lattner [Sun, 29 Mar 2009 05:01:10 +0000 (05:01 +0000)]
various cleanups

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

15 years agoadjust to llvm mainline changes.
Chris Lattner [Sun, 29 Mar 2009 04:32:54 +0000 (04:32 +0000)]
adjust to llvm mainline changes.

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

15 years agotighten this up, the decl *must* be a declcontext, no need for the dynamic check.
Chris Lattner [Sun, 29 Mar 2009 04:30:19 +0000 (04:30 +0000)]
tighten this up, the decl *must* be a declcontext, no need for the dynamic check.

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

15 years agoadd fixme
Chris Lattner [Sun, 29 Mar 2009 01:03:29 +0000 (01:03 +0000)]
add fixme

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 29 Mar 2009 00:43:39 +0000 (00:43 +0000)]
Update checker build.

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

15 years agoadd getNumLowBitsAvailable for OpaquePtr and QualType.
Chris Lattner [Sun, 29 Mar 2009 00:41:20 +0000 (00:41 +0000)]
add getNumLowBitsAvailable for OpaquePtr and QualType.

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

15 years agofollow llvm mainline, where PointerLikeTypeInfo got renamed
Chris Lattner [Sun, 29 Mar 2009 00:39:47 +0000 (00:39 +0000)]
follow llvm mainline, where PointerLikeTypeInfo got renamed
to PointerLikeTypeTraits.

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

15 years agoscan-build: Also look for clang-cc in ../libexec
Ted Kremenek [Sun, 29 Mar 2009 00:31:32 +0000 (00:31 +0000)]
scan-build: Also look for clang-cc in ../libexec

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

15 years agoInitial implementation of ARM ABI. Mostly untested. Note that I'm not
Eli Friedman [Sun, 29 Mar 2009 00:15:25 +0000 (00:15 +0000)]
Initial implementation of ARM ABI.  Mostly untested.  Note that I'm not
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works.  It should be a decent start,
though.

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

15 years agoQualType can go in SmallPtrSet now, simplify code that used to have
Chris Lattner [Sun, 29 Mar 2009 00:04:01 +0000 (00:04 +0000)]
QualType can go in SmallPtrSet now, simplify code that used to have
to work around this.

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

15 years agoimplement the PointerLikeTypeInfo trait for QualType, allowing
Chris Lattner [Sun, 29 Mar 2009 00:03:08 +0000 (00:03 +0000)]
implement the PointerLikeTypeInfo trait for QualType, allowing
it to be stuck into a SmallPtrSet.

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

15 years agoMore improvements to namespace aliases. We now support everything except aliases...
Anders Carlsson [Sat, 28 Mar 2009 23:53:49 +0000 (23:53 +0000)]
More improvements to namespace aliases. We now support everything except aliases in using directives.

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

15 years agoHandle the case where the namespace decl is an alias.
Anders Carlsson [Sat, 28 Mar 2009 23:50:18 +0000 (23:50 +0000)]
Handle the case where the namespace decl is an alias.

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

15 years agoFix lookup bug
Anders Carlsson [Sat, 28 Mar 2009 23:49:35 +0000 (23:49 +0000)]
Fix lookup bug

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

15 years agoLet getIdentifierNamespaceForKind know about aliases and have it treat them just...
Anders Carlsson [Sat, 28 Mar 2009 23:02:53 +0000 (23:02 +0000)]
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls.

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

15 years agoCreate AST nodes for namespace aliases.
Anders Carlsson [Sat, 28 Mar 2009 22:58:02 +0000 (22:58 +0000)]
Create AST nodes for namespace aliases.

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

15 years agoParse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionali...
Anders Carlsson [Sat, 28 Mar 2009 22:53:22 +0000 (22:53 +0000)]
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.

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

15 years agoFix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
Ted Kremenek [Sat, 28 Mar 2009 19:59:33 +0000 (19:59 +0000)]
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
<rdar://problem/6732151>.

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

15 years agoIntroduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
Chris Lattner [Sat, 28 Mar 2009 19:18:32 +0000 (19:18 +0000)]
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer.  Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>.  Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*.  This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy.  I will rectify
this with a subsequent patch.

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

15 years agosort alphabetically
Chris Lattner [Sat, 28 Mar 2009 19:10:22 +0000 (19:10 +0000)]
sort alphabetically

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

15 years agoAdjust control-flow endpoints for '&&' and '||'.
Ted Kremenek [Sat, 28 Mar 2009 17:33:57 +0000 (17:33 +0000)]
Adjust control-flow endpoints for '&&' and '||'.

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

15 years agoAdd comparison operators for PathDiagosticLocation.
Ted Kremenek [Sat, 28 Mar 2009 17:33:08 +0000 (17:33 +0000)]
Add comparison operators for PathDiagosticLocation.

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

15 years agoAdd comparison operators for SourceRange.
Ted Kremenek [Sat, 28 Mar 2009 17:32:39 +0000 (17:32 +0000)]
Add comparison operators for SourceRange.

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

15 years agoCMake: remove TranslationUnit.cpp from build (file has been removed).
Cedric Venet [Sat, 28 Mar 2009 12:41:49 +0000 (12:41 +0000)]
CMake: remove TranslationUnit.cpp from build (file has been removed).

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

15 years agomove file to proper place.
Chris Lattner [Sat, 28 Mar 2009 08:04:44 +0000 (08:04 +0000)]
move file to proper place.

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

15 years agoAs Eli pointed out, it is possible that a namespace lookup is ambiguous!
Anders Carlsson [Sat, 28 Mar 2009 07:51:31 +0000 (07:51 +0000)]
As Eli pointed out, it is possible that a namespace lookup is ambiguous!

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

15 years agoadd accessors.
Chris Lattner [Sat, 28 Mar 2009 07:00:38 +0000 (07:00 +0000)]
add accessors.

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

15 years agosome random cleanups
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

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

15 years agochange NamespaceDecl to hold its 'NextNamespace' pointer itself
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

15 years agoCheck that the alias points to a valid namespace.
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

15 years agoProperly escape special characters in <string>'s in plist file.
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

15 years agorename some methods.
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

15 years agoCleanups for DeclGroup.
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

15 years agoCheck that the namespace alias doesn't conflict with a previous declaration in this...
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

15 years agotidy whitespace.
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

15 years agorename NextDeclInScope to NextDeclInContext, since the pointer
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

15 years agosimplify getNextDeclInScope
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

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

15 years agoAdd an ActOnNamespaceAliasDef action and have the parser call it.
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

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

15 years agopush more ASTContext goodness out through interfaces that use
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

15 years agoRevert Sebastian's rvalue patch (r67870) since it caused test failures in
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

15 years agoremove TranslationUnit from ParseAST.
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

15 years agochange HandleTranslationUnit to take an ASTContext instead of TranslationUnit
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