]> granicus.if.org Git - clang/log
clang
15 years agoSimplify.
Daniel Dunbar [Thu, 23 Jul 2009 17:33:49 +0000 (17:33 +0000)]
Simplify.

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

15 years agoWe don't need to keep track of the packed alignment, just whether the struct is packe...
Anders Carlsson [Thu, 23 Jul 2009 17:24:40 +0000 (17:24 +0000)]
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

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

15 years agoMove the LLVM field number for bit fields into the BitFieldInfo structure, since...
Anders Carlsson [Thu, 23 Jul 2009 17:01:21 +0000 (17:01 +0000)]
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.

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

15 years agoClean up the ActOnTag action, so that there is only a single entry
Douglas Gregor [Thu, 23 Jul 2009 16:36:45 +0000 (16:36 +0000)]
Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.

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

15 years agoUnbreak the CMake build
Douglas Gregor [Thu, 23 Jul 2009 15:15:06 +0000 (15:15 +0000)]
Unbreak the CMake build

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

15 years agoAdd two nodes to the call graph:
Zhongxing Xu [Thu, 23 Jul 2009 13:39:38 +0000 (13:39 +0000)]
Add two nodes to the call graph:
 - Root is the main function or 0.
 - ExternalCallingNode has edges to all external functions.

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

15 years agoAdd template specializations to view the call graph in dot format.
Zhongxing Xu [Thu, 23 Jul 2009 09:04:23 +0000 (09:04 +0000)]
Add template specializations to view the call graph in dot format.
 - change the DenseMap used in callgraph to std::map, since DenseMap cannot
   be used with mapped_iterator and friends.

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

15 years agoconstify methods.
Zhongxing Xu [Thu, 23 Jul 2009 08:32:25 +0000 (08:32 +0000)]
constify methods.

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

15 years agoAdd getter methods.
Zhongxing Xu [Thu, 23 Jul 2009 07:37:14 +0000 (07:37 +0000)]
Add getter methods.

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

15 years agoAdd newline at EOF.
Daniel Dunbar [Thu, 23 Jul 2009 07:07:43 +0000 (07:07 +0000)]
Add newline at EOF.

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

15 years agoShield clang from LLVM API changes, until the dust settles.
Daniel Dunbar [Thu, 23 Jul 2009 05:30:36 +0000 (05:30 +0000)]
Shield clang from LLVM API changes, until the dust settles.

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

15 years agoFix test case, which has a control-reaches-end-of-non-void warning that was
Daniel Dunbar [Thu, 23 Jul 2009 05:06:51 +0000 (05:06 +0000)]
Fix test case, which has a control-reaches-end-of-non-void warning that was
being masked by previous bug.

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

15 years agoUse llvm::BitVector instead of managing memory by hand.
Daniel Dunbar [Thu, 23 Jul 2009 05:01:54 +0000 (05:01 +0000)]
Use llvm::BitVector instead of managing memory by hand.
 - As it happens, this also fixes a use-of-uninitialized memory that was causing
   non-deterministic test failures.

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

15 years agoSet field info for unions.
Anders Carlsson [Thu, 23 Jul 2009 04:59:05 +0000 (04:59 +0000)]
Set field info for unions.

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

15 years agoUse arrays as union padding. Also, since the resulting struct will always contain...
Anders Carlsson [Thu, 23 Jul 2009 04:50:01 +0000 (04:50 +0000)]
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.

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

15 years agoRevert r76831, there are many Analyzer test failures on multiple platforms.
Daniel Dunbar [Thu, 23 Jul 2009 04:41:06 +0000 (04:41 +0000)]
Revert r76831, there are many Analyzer test failures on multiple platforms.

--- Reverse-merging r76831 into '.':
U    include/clang/Analysis/PathSensitive/GRExprEngine.h
U    lib/Analysis/GRExprEngine.cpp

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

15 years agoHandle zero width bit fields in unions correctly (by ignoring them).
Anders Carlsson [Thu, 23 Jul 2009 04:00:39 +0000 (04:00 +0000)]
Handle zero width bit fields in unions correctly (by ignoring them).

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

15 years agoImplement union layout support.
Anders Carlsson [Thu, 23 Jul 2009 03:43:54 +0000 (03:43 +0000)]
Implement union layout support.

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

15 years agoCheck in CGRecordLayoutBuilder which is a reimplementation of the record layout...
Anders Carlsson [Thu, 23 Jul 2009 03:17:50 +0000 (03:17 +0000)]
Check in  CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)

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

15 years agoThese IRgen improvements have been done.
Daniel Dunbar [Thu, 23 Jul 2009 03:03:07 +0000 (03:03 +0000)]
These IRgen improvements have been done.

Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.

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

15 years agoAdd initial implementation of checking for uses of floating point as a loop counter.
Ted Kremenek [Thu, 23 Jul 2009 01:07:19 +0000 (01:07 +0000)]
Add initial implementation of checking for uses of floating point as a loop counter.

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

15 years agoAdd instance predicate method to match static method.
Ted Kremenek [Thu, 23 Jul 2009 01:06:10 +0000 (01:06 +0000)]
Add instance predicate method to match static method.

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

15 years agoAdd 'previsit' Checker pass for ObjCMessageExprs.
Ted Kremenek [Thu, 23 Jul 2009 01:05:31 +0000 (01:05 +0000)]
Add 'previsit' Checker pass for ObjCMessageExprs.

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

15 years agoRemove a bunch of FIXME's related to ObjC type checking.
Steve Naroff [Thu, 23 Jul 2009 01:01:38 +0000 (01:01 +0000)]
Remove a bunch of FIXME's related to ObjC type checking.

- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.

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

15 years agoAdd constructor used to initialize base/member in
Fariborz Jahanian [Thu, 23 Jul 2009 00:42:24 +0000 (00:42 +0000)]
Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.

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

15 years agoFix case, apparently some people still build on case sensitive
Mike Stump [Thu, 23 Jul 2009 00:20:25 +0000 (00:20 +0000)]
Fix case, apparently some people still build on case sensitive
filesystems.

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

15 years agoAdd warning for falling off the end of a function that should return a
Mike Stump [Wed, 22 Jul 2009 23:56:57 +0000 (23:56 +0000)]
Add warning for falling off the end of a function that should return a
value.  This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall).  I believe there should be very few false positives, though
the most interesting case would be:

  int() { bar(); }

when bar does:

  bar() { while (1) ; }

Here, we assume functions return, unless they are marked with the
noreturn attribute.  I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.

If anyone spots other false positives, let me know!

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

15 years agoImplement support for out-of-line definitions of the class members of class
Douglas Gregor [Wed, 22 Jul 2009 23:48:44 +0000 (23:48 +0000)]
Implement support for out-of-line definitions of the class members of class
templates, e.g.,

  template<typename T>
  struct Outer {
    struct Inner;
  };

  template<typename T>
  struct Outer<T>::Inner {
    // ...
  };

Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.

There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.

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

15 years agoFix test breakage.
Eli Friedman [Wed, 22 Jul 2009 23:24:42 +0000 (23:24 +0000)]
Fix test breakage.

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

15 years agoChange Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.
Argyrios Kyrtzidis [Wed, 22 Jul 2009 23:13:42 +0000 (23:13 +0000)]
Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.

Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around.

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

15 years agoImprove CFG support for C++ throw expressions.
Mike Stump [Wed, 22 Jul 2009 22:56:04 +0000 (22:56 +0000)]
Improve CFG support for C++ throw expressions.

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

15 years agoPrep for new warning.
Mike Stump [Wed, 22 Jul 2009 22:55:09 +0000 (22:55 +0000)]
Prep for new warning.

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

15 years agoRefactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.
Ted Kremenek [Wed, 22 Jul 2009 22:35:28 +0000 (22:35 +0000)]
Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.

Educate GRExprEngine::VisitGraph() about 'PreStmt'.

Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.

Constify a bunch of arguments, which falls out of the changes to ProgramPoint.

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

15 years agoSlight code reorganization to allow instantiating post-inc/dec.
Eli Friedman [Wed, 22 Jul 2009 22:25:00 +0000 (22:25 +0000)]
Slight code reorganization to allow instantiating post-inc/dec.

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

15 years agoCalls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order...
Douglas Gregor [Wed, 22 Jul 2009 22:05:02 +0000 (22:05 +0000)]
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct.

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

15 years agoUse SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'
Ted Kremenek [Wed, 22 Jul 2009 21:52:10 +0000 (21:52 +0000)]
Use SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'

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

15 years agoAdd AssumeDual method.
Ted Kremenek [Wed, 22 Jul 2009 21:51:00 +0000 (21:51 +0000)]
Add AssumeDual method.

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

15 years agoMigrate the path-sensitive checking of 'nonnull' arguments over to the new
Ted Kremenek [Wed, 22 Jul 2009 21:46:56 +0000 (21:46 +0000)]
Migrate the path-sensitive checking of 'nonnull' arguments over to the new
'Checker' interface. An updated test case illustrates that after calling a
function with the 'nonnull' attribute we now register the fact that the passed
pointer must be non-null. This retention of information was not possible with
the previously used GRSimpleAPICheck interface.

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

15 years agoFix the parsing of default arguments for inline member function
Eli Friedman [Wed, 22 Jul 2009 21:45:50 +0000 (21:45 +0000)]
Fix the parsing of default arguments for inline member function
definitions.

I'm not very familiar with this code, so please review.

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

15 years agoMake 'SaveAndRestore' and friends reusable classes in libAnalysis.
Ted Kremenek [Wed, 22 Jul 2009 21:45:16 +0000 (21:45 +0000)]
Make 'SaveAndRestore' and friends reusable classes in libAnalysis.

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

15 years agoAdd support for registering 'Checker' objects with GRExprEngine.
Ted Kremenek [Wed, 22 Jul 2009 21:43:51 +0000 (21:43 +0000)]
Add support for registering 'Checker' objects with GRExprEngine.
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.

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

15 years agoAdd new 'Checker' and 'CheckerVisitor' classes, which represent a more powerful
Ted Kremenek [Wed, 22 Jul 2009 21:42:34 +0000 (21:42 +0000)]
Add new 'Checker' and 'CheckerVisitor' classes, which represent a more powerful
interface to plug in domain-specific checker logic than the current
GRSimpleAPICheck interface. The new 'Checker' interface can actually generate
new nodes, allowing it to modify the state and refine the analysis (which
GRSimpleAPIChecks could not).

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

15 years agoAdd support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.
Ted Kremenek [Wed, 22 Jul 2009 21:40:46 +0000 (21:40 +0000)]
Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.

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

15 years agoAdd 'PreStmt' program point. This will be used to represent checking for
Ted Kremenek [Wed, 22 Jul 2009 21:39:25 +0000 (21:39 +0000)]
Add 'PreStmt' program point. This will be used to represent checking for
preconditions (in GRExprEngine) before the statement itself is evaluated.

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

15 years agoImplement operator= for ExplodedNodeSet.
Ted Kremenek [Wed, 22 Jul 2009 21:38:15 +0000 (21:38 +0000)]
Implement operator= for ExplodedNodeSet.

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

15 years agoFix the problems with template argument deduction and array types for
Douglas Gregor [Wed, 22 Jul 2009 21:30:48 +0000 (21:30 +0000)]
Fix the problems with template argument deduction and array types for
real. It turns out that we need to actually move all of the qualifiers
up to the array type itself, then recanonicalize the deduced template
argument type.

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

15 years agoMake -Wreturn-type be part of -Wmost and therefore -Wall.
Mike Stump [Wed, 22 Jul 2009 21:00:27 +0000 (21:00 +0000)]
Make -Wreturn-type be part of -Wmost and therefore -Wall.

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

15 years agoFix some memory allocation/deallocation issues
Douglas Gregor [Wed, 22 Jul 2009 20:55:49 +0000 (20:55 +0000)]
Fix some memory allocation/deallocation issues

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

15 years agoFix a nasty little use-after-free bug.
Eli Friedman [Wed, 22 Jul 2009 20:29:16 +0000 (20:29 +0000)]
Fix a nasty little use-after-free bug.

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

15 years agoCanonicalize the types produced by template argument deduction.
Douglas Gregor [Wed, 22 Jul 2009 20:25:36 +0000 (20:25 +0000)]
Canonicalize the types produced by template argument deduction.

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

15 years agoImproved on performance of the algorithm for proper ordering of
Fariborz Jahanian [Wed, 22 Jul 2009 20:25:00 +0000 (20:25 +0000)]
Improved on performance of the algorithm for proper ordering of
ctor's initialization of bases and fields.

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

15 years agoSlighty more testing for template argument deduction with array arguments
Douglas Gregor [Wed, 22 Jul 2009 20:07:21 +0000 (20:07 +0000)]
Slighty more testing for template argument deduction with array arguments

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

15 years agoImprove template argument deduction for array types, so that a parameter
Douglas Gregor [Wed, 22 Jul 2009 20:02:25 +0000 (20:02 +0000)]
Improve template argument deduction for array types, so that a parameter

  const T

can be matched with, e.g.,

  volatile int [5]

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

15 years agoPrep for new warning.
Mike Stump [Wed, 22 Jul 2009 20:02:03 +0000 (20:02 +0000)]
Prep for new warning.

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

15 years agoUse isa instead of dyn_cast for conditionals.
Mike Stump [Wed, 22 Jul 2009 18:58:19 +0000 (18:58 +0000)]
Use isa instead of dyn_cast for conditionals.

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

15 years agoUse DICompositeType->replaceAllUsesWith().
Devang Patel [Wed, 22 Jul 2009 18:57:00 +0000 (18:57 +0000)]
Use DICompositeType->replaceAllUsesWith().

This requires llvm rev. 76769 or higher.

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

15 years ago"This patch implements the restrictions on union members detailed in
Douglas Gregor [Wed, 22 Jul 2009 18:25:24 +0000 (18:25 +0000)]
"This patch implements the restrictions on union members detailed in
[class.union]p1", from John McCall!

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

15 years agoMove bug reporter "visitors" to their own file and make them part of the public
Ted Kremenek [Wed, 22 Jul 2009 17:55:28 +0000 (17:55 +0000)]
Move bug reporter "visitors" to their own file and make them part of the public
BugReporter API.  No real functionality change.

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

15 years agoAllocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
Fariborz Jahanian [Wed, 22 Jul 2009 17:41:53 +0000 (17:41 +0000)]
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
via ASTContext.

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

15 years agoImplement parsing and semantic analysis for out-of-line definitions of static
Douglas Gregor [Wed, 22 Jul 2009 17:18:37 +0000 (17:18 +0000)]
Implement parsing and semantic analysis for out-of-line definitions of static
data members of class templates. We don't instantiate the definitions yet,
however.

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

15 years agoFix a couple recent ABI regressions noticed during code review (fallout from the...
Steve Naroff [Wed, 22 Jul 2009 17:14:51 +0000 (17:14 +0000)]
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).

It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.

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

15 years agoSwitch some functions from using x86 builtins to using vector
Eli Friedman [Wed, 22 Jul 2009 17:08:01 +0000 (17:08 +0000)]
Switch some functions from using x86 builtins to using vector
operations.

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

15 years agoAdd some documentation, to make it so the next person doens't select
Mike Stump [Wed, 22 Jul 2009 16:55:20 +0000 (16:55 +0000)]
Add some documentation, to make it so the next person doens't select
the wrong function.  :-)

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

15 years agoFix <rdar://problem/6770276> Support Class<Proto> syntax.
Steve Naroff [Wed, 22 Jul 2009 16:07:01 +0000 (16:07 +0000)]
Fix <rdar://problem/6770276> Support Class<Proto> syntax.

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

15 years agoTest template instantiation for member functions of class templates defined
Douglas Gregor [Wed, 22 Jul 2009 15:45:39 +0000 (15:45 +0000)]
Test template instantiation for member functions of class templates defined
out of line.

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

15 years agoMake vectorized floating-point comparisons work without crashing.
Eli Friedman [Wed, 22 Jul 2009 06:07:16 +0000 (06:07 +0000)]
Make vectorized floating-point comparisons work without crashing.

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

15 years agoRestructure ProgramPoint to have the 'Kind' value be its own instance
Ted Kremenek [Wed, 22 Jul 2009 04:38:22 +0000 (04:38 +0000)]
Restructure ProgramPoint to have the 'Kind' value be its own instance
variable.  This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading.  The removal of
various bit-mangling of pointers also cleans up the logic.

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

15 years agoTemporarily disable most use of region casts in RegionStoreManager,
Ted Kremenek [Wed, 22 Jul 2009 04:35:42 +0000 (04:35 +0000)]
Temporarily disable most use of region casts in RegionStoreManager,
instead preferring to use the a region's actual type when creating
symbols and using the QualType passed to Retrieve for implicit
casting.  This preprocessor logic is temporary; eventually we will
either remove region casts or keep them.

Temporarily toggle (via preprocessor directives) that SymbolicRegions
with heap storage are not undefined, but instead should be
symbolicated.  If we want to model that a SymbolicRegion is
uninitialized, we can explicitly model that by binding UndefinedVal to
that region.  It turns out that we want to treat most heap objects as
being defined, not the other way around.

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

15 years agoFix a crasher in StoreManager::InvalidateRegion() caused by using the
Ted Kremenek [Wed, 22 Jul 2009 04:23:20 +0000 (04:23 +0000)]
Fix a crasher in StoreManager::InvalidateRegion() caused by using the
'cast type' of a region to invalidate its binding.  This only occurs
when using RegionStoreManager, as it records the cast type.  I'm
currently considering removing the notion of a cast type (see
comments in code).

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

15 years agoPreserve address space information through member accesses, e.g.,
Mon P Wang [Wed, 22 Jul 2009 03:08:17 +0000 (03:08 +0000)]
Preserve address space information through member accesses, e.g.,
   __attribute__((address_space(1))) struct {int arr[ 3 ]; }  *p1;
   ... = p1->arr[2];  // load from address space 1

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

15 years agoRemove an unneeded header.
Mike Stump [Wed, 22 Jul 2009 01:39:14 +0000 (01:39 +0000)]
Remove an unneeded header.

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

15 years agoPrep for new warning.
Mike Stump [Wed, 22 Jul 2009 00:43:08 +0000 (00:43 +0000)]
Prep for new warning.

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

15 years agoMinor mod. per Doug's comment.
Fariborz Jahanian [Wed, 22 Jul 2009 00:42:46 +0000 (00:42 +0000)]
Minor mod. per Doug's comment.

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

15 years agoComplain if we're entering the context of a dependent nested-name-specifier but
Douglas Gregor [Wed, 22 Jul 2009 00:28:09 +0000 (00:28 +0000)]
Complain if we're entering the context of a dependent nested-name-specifier but
cannot match that nested-name-specifier to a class template or class template
partial specialization.

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

15 years agoBasic parsing and semantic analysis for out-of-line definitions of the
Douglas Gregor [Tue, 21 Jul 2009 23:53:31 +0000 (23:53 +0000)]
Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

  template<typename T>
  struct X {
    void f(T);
  };

  template<typename T> X<T>::f(T) { /* ... */ }

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

15 years agoRevert this, we can now avoid error cascades better.
Mike Stump [Tue, 21 Jul 2009 23:52:50 +0000 (23:52 +0000)]
Revert this, we can now avoid error cascades better.

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

15 years agoRevert this, was a bug in my new warning code, not the test case.
Mike Stump [Tue, 21 Jul 2009 23:50:15 +0000 (23:50 +0000)]
Revert this, was a bug in my new warning code, not the test case.

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

15 years agoRevert this, we have a better way to do this.
Mike Stump [Tue, 21 Jul 2009 23:47:12 +0000 (23:47 +0000)]
Revert this, we have a better way to do this.

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

15 years agoRevert this, we have a better way to handle this.
Mike Stump [Tue, 21 Jul 2009 23:45:39 +0000 (23:45 +0000)]
Revert this, we have a better way to handle this.

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

15 years agoRevert recent change, I now have a better way to solve this (thanks Chris).
Mike Stump [Tue, 21 Jul 2009 23:41:23 +0000 (23:41 +0000)]
Revert recent change, I now have a better way to solve this (thanks Chris).

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

15 years agoFix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
Ted Kremenek [Tue, 21 Jul 2009 23:27:57 +0000 (23:27 +0000)]
Fix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
poisoning changes to DenseMap. We were using an iterator after it had been
invalidated by an insertion into the DenseMap.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 22:54:02 +0000 (22:54 +0000)]
Prep for new warning.

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

15 years agoPatch to accomodate Doug's comment on default
Fariborz Jahanian [Tue, 21 Jul 2009 22:36:06 +0000 (22:36 +0000)]
Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.

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

15 years agoRemove stale comment and fix RUN line.
Ted Kremenek [Tue, 21 Jul 2009 21:48:25 +0000 (21:48 +0000)]
Remove stale comment and fix RUN line.

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

15 years agoAdd test case for PR 4596, which is already fixed due to Steve Naroff's overhaul...
Ted Kremenek [Tue, 21 Jul 2009 21:21:04 +0000 (21:21 +0000)]
Add test case for PR 4596, which is already fixed due to Steve Naroff's overhaul of the Objective-C type system, but isn't in a checker build yet.

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

15 years agoPatch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the...
Ted Kremenek [Tue, 21 Jul 2009 21:16:46 +0000 (21:16 +0000)]
Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.

This fixes PR 4602.

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

15 years agoUpdate stale comment.
Ted Kremenek [Tue, 21 Jul 2009 21:09:31 +0000 (21:09 +0000)]
Update stale comment.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 21:06:08 +0000 (21:06 +0000)]
Prep for new warning.

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

15 years agoReorder files.
Ted Kremenek [Tue, 21 Jul 2009 21:03:50 +0000 (21:03 +0000)]
Reorder files.

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

15 years agoFix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
Ted Kremenek [Tue, 21 Jul 2009 21:03:30 +0000 (21:03 +0000)]
Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 21:03:09 +0000 (21:03 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:52:43 +0000 (20:52 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:50:41 +0000 (20:50 +0000)]
Prep for new warning.

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

15 years agodriver: Print --version on stdout, to match gcc.
Daniel Dunbar [Tue, 21 Jul 2009 20:06:58 +0000 (20:06 +0000)]
driver: Print --version on stdout, to match gcc.
 - Patch by Jean-Daniel Dupas

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

15 years agoMisc fixes for -Wreorder:
Eli Friedman [Tue, 21 Jul 2009 19:28:10 +0000 (19:28 +0000)]
Misc fixes for -Wreorder:

1. Make it work correctly with anonymous unions.
2. Don't compute it if the warning isn't enabled.
3. Optimize the algorithm slightly to make it linear time in the
case where we don't produce any warnings.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:03:43 +0000 (19:03 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:02:55 +0000 (19:02 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:48 +0000 (19:01 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:31 +0000 (19:01 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:01 +0000 (19:01 +0000)]
Prep for new warning.

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