Douglas Gregor [Wed, 11 Aug 2010 15:58:42 +0000 (15:58 +0000)]
Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.
Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.
Douglas Gregor [Wed, 11 Aug 2010 14:45:53 +0000 (14:45 +0000)]
If name lookup finds different type declarations in different scopes
that actually refer to the same underlying type, it is not an
ambiguity; add uniquing support based on the canonical type of type
declarations. Fixes <rdar://problem/8296180>.
Douglas Gregor [Wed, 11 Aug 2010 12:19:30 +0000 (12:19 +0000)]
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.
Daniel Dunbar [Wed, 11 Aug 2010 02:17:20 +0000 (02:17 +0000)]
ARM: Recognize single precision float register names.
- We don't recognize double or NEON register names yet -- we don't have the
infrastructure to generate the right clobbers for them.
Douglas Gregor [Wed, 11 Aug 2010 02:15:33 +0000 (02:15 +0000)]
Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.
As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.
The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.
John McCall [Wed, 11 Aug 2010 00:16:14 +0000 (00:16 +0000)]
Fix a bug in @finally emission in both the fragile and non-fragile EH schemes
where we weren't accounting for the possibility that a @finally block might
have internal cleanups and therefore might write to the cleanup destination slot.
Ted Kremenek [Wed, 11 Aug 2010 00:03:02 +0000 (00:03 +0000)]
Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path. This is to support the unreachable code analysis.
Daniel Dunbar [Tue, 10 Aug 2010 17:39:05 +0000 (17:39 +0000)]
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
- This is eventually going to be unified outside the host specific code.
Douglas Gregor [Tue, 10 Aug 2010 15:02:34 +0000 (15:02 +0000)]
Teach the libclang cursor visitor to walk into the type information
provided by __builtin_types_compatible_p and __builtin_va_arg
expressions, now that Abramo has added proper type-source information
to those expressions.
Devang Patel [Tue, 10 Aug 2010 01:36:24 +0000 (01:36 +0000)]
There is no need to pubish file static variable's name. Do not rely on this code gen bug to check whether debug info is generated for such variables or not.
Douglas Gregor [Mon, 9 Aug 2010 22:28:58 +0000 (22:28 +0000)]
Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.
Sebastian Redl [Mon, 9 Aug 2010 21:55:28 +0000 (21:55 +0000)]
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.
Douglas Gregor [Sat, 7 Aug 2010 11:51:51 +0000 (11:51 +0000)]
Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.
John McCall [Sat, 7 Aug 2010 08:21:30 +0000 (08:21 +0000)]
Inline a special case of EmitAggregateCopy into EmitNullInitialization
to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC.
Fixes PR7834.
Also fix a subtle address-space bug in the memset path.
John McCall [Sat, 7 Aug 2010 06:22:56 +0000 (06:22 +0000)]
Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).
Also, smoosh the CastKind into the bitfield from Expr.
Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.
Chris Lattner [Sat, 7 Aug 2010 00:20:46 +0000 (00:20 +0000)]
Correct -ftrapv to trap on errors, instead of calling the
__overflow_handler entrypoint that David Chisnall made up.
Calling __overflow_handler is not part of the contract of
-ftrapv provided by GCC, and should never have been checked
in in the first place.
According to:
http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699
David is using this for some of arbitrary precision integer stuff
or something, which is not an appropriate thing to implement on
this.
Eli Friedman [Fri, 6 Aug 2010 23:41:47 +0000 (23:41 +0000)]
PR7837: For qualified id's, make sure the decl context is complete if not
dependent in ActOnIdExpression. (This issue only shows up with member
operators because an operator is never a type.)
Tom Care [Fri, 6 Aug 2010 22:23:07 +0000 (22:23 +0000)]
Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker
Douglas Gregor [Fri, 6 Aug 2010 14:50:36 +0000 (14:50 +0000)]
The pre-increment/pre-decrement grammar in C++ differs from that in C,
but we were parsing the C grammar. Handle the C++ grammar
appropriately. Fixes PR7794.
Douglas Gregor [Fri, 6 Aug 2010 14:15:26 +0000 (14:15 +0000)]
Remove some incorrect assertions when deduction template arguments in
a template-argument-list. When template template parameters are
involved, we won't already have checked the template-argument-list (it
may not be known yet!). Fixes PR7807.