Douglas Gregor
3552259059
Properly replace (cxxscope, template-id) annotation tokens with a
...
single typename annotation token when backtracing. Fixes PR5350.
llvm-svn: 86034
2009-11-04 18:18:19 +00:00
Fariborz Jahanian
09cc10f9f8
This patch extends CleanupScope to support destruction
...
of array objects on block exit. Patch is by Anders Calrsson.
llvm-svn: 86032
2009-11-04 17:57:40 +00:00
Douglas Gregor
2de8f4149e
Don't try to check the initialization of fields with dependent
...
types. Fixes PR5352.
Fariborz, please review.
llvm-svn: 86031
2009-11-04 17:16:11 +00:00
Douglas Gregor
615ac67fb8
Store the unresolved class type in MemberPointerType's Class field,
...
from Peter Collingbourne!
llvm-svn: 86030
2009-11-04 16:49:01 +00:00
Chris Lattner
b73beb36f5
this test has started failing due to an optimizer change. Clang tests
...
should only look at -O0 IR output not -O3 assembly output. XFAIL it for
now.
llvm-svn: 86029
2009-11-04 16:37:13 +00:00
Douglas Gregor
e7b5f81ba5
Eliminate the "old" ways of parsing operator-function-ids and
...
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.
llvm-svn: 86028
2009-11-04 16:32:12 +00:00
Douglas Gregor
220f4277bd
Switch parsing of using declarations over to ParseUnqualifiedId.
...
llvm-svn: 86027
2009-11-04 16:30:06 +00:00
John McCall
4c98fd8953
Preserve type source information in sizeof/alignof expressions, and pass it
...
through to indexing.
llvm-svn: 86018
2009-11-04 07:28:41 +00:00
Douglas Gregor
c95a1fa7f6
When performing template instantiation (transformation) of
...
expressions, keep track of whether we are immediately taking the
address of the expression. Pass this flag when building a declaration
name expression so that we handle pointer-to-member constants
properly.
llvm-svn: 86017
2009-11-04 07:01:15 +00:00
Daniel Dunbar
a9be734c24
Fix commento.
...
llvm-svn: 86016
2009-11-04 06:57:08 +00:00
Daniel Dunbar
0300bbcf80
Update CMake.
...
llvm-svn: 86015
2009-11-04 06:39:40 +00:00
Daniel Dunbar
5ec950218a
Move -fcolor-diagnostics logic to driver.
...
llvm-svn: 86014
2009-11-04 06:24:57 +00:00
Daniel Dunbar
2c9784769a
Move logic for selection -fmessage-length= to driver.
...
llvm-svn: 86013
2009-11-04 06:24:47 +00:00
Daniel Dunbar
1c7577c9bd
Fix indentation.
...
llvm-svn: 86011
2009-11-04 06:24:38 +00:00
Daniel Dunbar
c2e6a4709e
Factor out a diagnostic options class.
...
llvm-svn: 86010
2009-11-04 06:24:30 +00:00
Ted Kremenek
9346a56793
Add FIXME.
...
llvm-svn: 86004
2009-11-04 04:24:44 +00:00
Ted Kremenek
ef910047b2
Catch uses of undefined values when they are used in assignment, thus catching such bugs closer to the source.
...
llvm-svn: 86003
2009-11-04 04:24:16 +00:00
Ted Kremenek
9db38f6f83
Add mising #ifdef guards.
...
llvm-svn: 86002
2009-11-04 04:03:43 +00:00
John McCall
4976fd4ea9
Diagnose the use of 'fastcall' on functions without prototypes or with
...
varargs prototypes.
llvm-svn: 86001
2009-11-04 03:36:09 +00:00
John McCall
9eff4e60ae
Diagnose __builtin_offsetof on incomplete types. Fixes
...
rdar://problem/7222956
llvm-svn: 85999
2009-11-04 03:03:43 +00:00
John McCall
28a6aeab7e
Change our basic strategy for avoiding deprecation warnings when the decl use
...
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.
llvm-svn: 85998
2009-11-04 02:18:39 +00:00
Zhongxing Xu
259d46407a
Merge ZeroSizedVLAChecker and UndefSizedVLAChecker.
...
llvm-svn: 85996
2009-11-04 01:43:07 +00:00
Tanya Lattner
f9d41df093
Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.
...
llvm-svn: 85991
2009-11-04 01:18:09 +00:00
Mike Stump
b9c9b351e9
Fix 80-col violations.
...
llvm-svn: 85990
2009-11-04 01:11:15 +00:00
Douglas Gregor
71395fa1d5
Implement support for parsing dependent template-ids that refer to
...
overloaded operators, e.g.,
p->template operator+<T>()
llvm-svn: 85989
2009-11-04 00:56:37 +00:00
Mike Stump
71609a2874
Split out return adjustments in thunks from this adjustment in thunks
...
so the optimizer can tailcall into the return value adjustment thunk.
This improves codesize for complex hierarchies.
llvm-svn: 85988
2009-11-04 00:53:51 +00:00
Daniel Dunbar
caa00adafd
Use unsigned char instead of unsigned : 8 to make the optimizer happier.
...
llvm-svn: 85985
2009-11-04 00:34:40 +00:00
Ted Kremenek
b006b82daf
Refactor StoreManager::BindDecl() to take a VarRegion* instead of a VarDecl*, and modify GRExprEngine::EvalBind() to handle decl initialization as well. This paves the way for adding "checker" visitation in EvalBind().
...
llvm-svn: 85983
2009-11-04 00:09:15 +00:00
Mike Stump
8117848174
Misc cleanups.
...
llvm-svn: 85978
2009-11-03 23:50:34 +00:00
Mike Stump
6de15a8881
Test case for recent checkin.
...
llvm-svn: 85972
2009-11-03 23:32:42 +00:00
Ted Kremenek
0fbbb0877d
Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugReporter&. This paves the way for pulling some of the retain/release checker into a "Checker" class.
...
llvm-svn: 85971
2009-11-03 23:30:34 +00:00
Mike Stump
53f9ded62b
Refine volatile handling, specifically, we must have the canonical
...
type to look at the volatile specifier. I found these all from just
hand auditing the code.
llvm-svn: 85967
2009-11-03 23:25:48 +00:00
Douglas Gregor
3cf81317e4
Parsing and semantic analysis for template-ids that name overloaded
...
operators, e.g.,
operator+<int>
which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.
llvm-svn: 85966
2009-11-03 23:16:33 +00:00
Nuno Lopes
f94d35387e
make 'make clean' work on Solaris, per Gabor Greif comment
...
llvm-svn: 85958
2009-11-03 22:39:56 +00:00
Nuno Lopes
6a20b2df3e
make 'make clean' clean everything
...
llvm-svn: 85957
2009-11-03 22:21:28 +00:00
Mike Stump
96638affa6
We have to ensure we have the canonical type to do this. This is but
...
one instance of a large problem. assert for non-canoical types would
help track down these things.
llvm-svn: 85956
2009-11-03 22:20:01 +00:00
Douglas Gregor
127ea59872
Tweak some comments about unqualified-id and id-expression parsing. No functionality change
...
llvm-svn: 85942
2009-11-03 21:24:04 +00:00
John McCall
5e6253bbd0
CFieldCallback doesn't need to create an ExtensionRAIIObject: it's actually
...
automatically shadowed by the ExtensionRAIIObject created by
ParseStructDeclaration.
llvm-svn: 85941
2009-11-03 21:13:47 +00:00
Douglas Gregor
7f4d7ea3a9
Remove a bunch of #if 0'd code made irrelevant by the latest ParseUnqualifiedId changes
...
llvm-svn: 85938
2009-11-03 20:53:48 +00:00
Fariborz Jahanian
7ad3616659
Remove previous patch for pr5296 due to further clarification
...
of value-initialization and trivial constructors.
llvm-svn: 85935
2009-11-03 20:38:53 +00:00
Chris Lattner
e9d7d78ab3
Implement support for the -undef command line option, patch by
...
Roman Divacky! PR5363
llvm-svn: 85932
2009-11-03 19:50:27 +00:00
Chris Lattner
4f10559ba8
silence a warning.
...
llvm-svn: 85931
2009-11-03 19:48:51 +00:00
Douglas Gregor
30d60cb36e
Replace the code that parses member access expressions after "." or
...
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).
llvm-svn: 85930
2009-11-03 19:44:04 +00:00
John McCall
37958aa864
Silence a warning by giving Parser::FieldCallback a virtual destructor, and
...
anchor the vtable to Parser.cpp for good measure.
llvm-svn: 85927
2009-11-03 19:33:12 +00:00
Mike Stump
f6968a5749
vtable testcase for recent work on vcall/vbase offsets.
...
llvm-svn: 85925
2009-11-03 19:28:52 +00:00
John McCall
d5a36321b9
Reorganize the parsing of decl groups / function definitions so that
...
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.
llvm-svn: 85924
2009-11-03 19:26:08 +00:00
Mike Stump
4627132ebc
Refine codegen for covariant thunks that return references.
...
llvm-svn: 85916
2009-11-03 19:03:17 +00:00
Ted Kremenek
8d43a6ac3d
Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially two parts of the same check.
...
llvm-svn: 85911
2009-11-03 18:41:06 +00:00
Daniel Dunbar
eec7d75a4e
Fix tests to not depend on /dev/null existing.
...
llvm-svn: 85908
2009-11-03 17:56:18 +00:00
Mike Stump
77738205e6
Refine return value adjustments for thunks.
...
llvm-svn: 85905
2009-11-03 16:59:27 +00:00