]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Mike Stump [Tue, 21 Jul 2009 19:00:12 +0000 (19:00 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 21 Jul 2009 18:59:28 +0000 (18:59 +0000)]
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:59:16 +0000 (18:59 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:58:50 +0000 (18:58 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:58:15 +0000 (18:58 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:57:14 +0000 (18:57 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:56:34 +0000 (18:56 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:56:04 +0000 (18:56 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:54:29 +0000 (18:54 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:52:41 +0000 (18:52 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:51:31 +0000 (18:51 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:48:43 +0000 (18:48 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:46:15 +0000 (18:46 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:45:53 +0000 (18:45 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:45:22 +0000 (18:45 +0000)]
Prep for new warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 21 Jul 2009 18:44:24 +0000 (18:44 +0000)]
Prep for new warnings about control flow falling off the ends of
functions that return a value. I was going to buffer the whole lot
up, but it should be easier to review if I check them in
incrementally. Most of the forth coming changes either add a return
value, or make it impossible to return, or alter the return type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 21 Jul 2009 18:06:41 +0000 (18:06 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 21 Jul 2009 17:05:03 +0000 (17:05 +0000)]
Consider nested-names as part of the declarator when resolving an ambiguous statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 21 Jul 2009 15:28:50 +0000 (15:28 +0000)]
Diagnose when a destructor uses a unrelated class type as its name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 21 Jul 2009 14:46:17 +0000 (14:46 +0000)]
Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Jul 2009 07:56:29 +0000 (07:56 +0000)]
Disambiguate an if statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 21 Jul 2009 07:52:21 +0000 (07:52 +0000)]
Remove the ASTContext parameter from Entity::getPrintableName().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:48:06 +0000 (06:48 +0000)]
Add an assert for safety check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:43:26 +0000 (06:43 +0000)]
Fix a crash that occurs in this C++ case:
struct foo {
static bool value;
};
bool (foo::value); // crash because of parens
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 21 Jul 2009 02:57:15 +0000 (02:57 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 21 Jul 2009 02:10:32 +0000 (02:10 +0000)]
Keep only canonical Decls in Entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532
91177308 -0d34-0410-b5e6-
96231b3b80d8