]> granicus.if.org Git - clang/log
clang
15 years agoExplicit instantiations of templates now instantiate the definitions
Douglas Gregor [Wed, 13 May 2009 20:28:22 +0000 (20:28 +0000)]
Explicit instantiations of templates now instantiate the definitions
of class members (recursively). Only member classes are actually
instantiated; the instantiation logic for member functions and
variables are just stubs.

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

15 years agoDisable access control by default. It can be enabled with the -faccess-control option...
Anders Carlsson [Wed, 13 May 2009 19:49:53 +0000 (19:49 +0000)]
Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again.

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

15 years agoAdd PostStmt::getStmtAs(). This unbreaks the build.
Ted Kremenek [Wed, 13 May 2009 19:23:41 +0000 (19:23 +0000)]
Add PostStmt::getStmtAs().  This unbreaks the build.

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

15 years agoEnhance diagnostics value tracking logic for null dereferences and uninitialized...
Ted Kremenek [Wed, 13 May 2009 19:16:35 +0000 (19:16 +0000)]
Enhance diagnostics value tracking logic for null dereferences and uninitialized values.

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

15 years agoAdd ExplodedNode utility methods 'getLocationAs()' and 'getFirstPred()'
Ted Kremenek [Wed, 13 May 2009 19:14:06 +0000 (19:14 +0000)]
Add ExplodedNode utility methods 'getLocationAs()' and 'getFirstPred()'

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

15 years agoDriver: Emit an unsupported error on -iframework.
Daniel Dunbar [Wed, 13 May 2009 19:05:04 +0000 (19:05 +0000)]
Driver: Emit an unsupported error on -iframework.

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

15 years agoABI handling: Fix invalid assertion, it is possible for a valid
Daniel Dunbar [Wed, 13 May 2009 18:54:26 +0000 (18:54 +0000)]
ABI handling: Fix invalid assertion, it is possible for a valid
coercion to be specified which truncates padding bits. It would be
nice to still have the assert, but we don't have any API call for the
unpadding size of a type yet.

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

15 years agoImprove the semantic checking for explicit instantiations of
Douglas Gregor [Wed, 13 May 2009 18:28:20 +0000 (18:28 +0000)]
Improve the semantic checking for explicit instantiations of
templates. In particular:
  - An explicit instantiation can follow an implicit instantiation (we
  were improperly diagnosing this as an error, previously).
  - In C++0x, an explicit instantiation that follows an explicit
  specialization of the same template specialization is ignored. In
  C++98, we just emit an extension warning.
  - In C++0x, an explicit instantiation must be in a namespace
  enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.

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

15 years agoFix crasher reported in PR 4209 caused by an invalid summary
Ted Kremenek [Wed, 13 May 2009 18:16:01 +0000 (18:16 +0000)]
Fix crasher reported in PR 4209 caused by an invalid summary
generation when EvalObjCMessageExpr() did not resolve the
ObjCInterfaceDecl* for a receiver when the receiver's symbolic value
wasn't being explicitly tracked.

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

15 years agoSome early declarations to support sentinel attribute on
Fariborz Jahanian [Wed, 13 May 2009 18:09:35 +0000 (18:09 +0000)]
Some early declarations to support sentinel attribute on
message dispatches (and function calls later). No change in
functionality.

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

15 years agoremove the obsolete -fprint-source-range-info option
Chris Lattner [Wed, 13 May 2009 17:08:18 +0000 (17:08 +0000)]
remove the obsolete -fprint-source-range-info option

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

15 years agoRemoved 4-letter :) word in comment.
Fariborz Jahanian [Wed, 13 May 2009 16:19:02 +0000 (16:19 +0000)]
Removed 4-letter :) word in comment.
Used simple array for Selector build.

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

15 years agoFix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs &&...
Ted Kremenek [Wed, 13 May 2009 16:06:05 +0000 (16:06 +0000)]
Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!").

For format string checking, only check the type of the format
specifier for non-vararg functions.

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

15 years agoFix crasher in CFRefCount.cpp reported by Nikita Zhuk due to recently added autorelea...
Ted Kremenek [Wed, 13 May 2009 07:12:33 +0000 (07:12 +0000)]
Fix crasher in CFRefCount.cpp reported by Nikita Zhuk due to recently added autorelease tracking.

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

15 years agoFix rdar://6880630 - # in _Pragma does not start a preprocessor directive.
Chris Lattner [Wed, 13 May 2009 06:10:29 +0000 (06:10 +0000)]
Fix rdar://6880630 - # in _Pragma does not start a preprocessor directive.

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

15 years agoconvert test to use -verify
Chris Lattner [Wed, 13 May 2009 06:07:25 +0000 (06:07 +0000)]
convert test to use -verify

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

15 years agorename test
Chris Lattner [Wed, 13 May 2009 06:07:04 +0000 (06:07 +0000)]
rename test

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

15 years agoFix rdar://6880951 by rejecting vectors of vectors.
Chris Lattner [Wed, 13 May 2009 05:13:44 +0000 (05:13 +0000)]
Fix rdar://6880951 by rejecting vectors of vectors.
It seems dubious to me that isIntegerType() returns true for
vectors of integers, but not complex integers.  This should
probably be rethought, I'll file a bugzilla.

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

15 years agoreject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
Chris Lattner [Wed, 13 May 2009 05:02:08 +0000 (05:02 +0000)]
reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
rdar://6880104

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

15 years agoeli correctly points out that this code is dead, just rip it out for
Chris Lattner [Wed, 13 May 2009 04:52:12 +0000 (04:52 +0000)]
eli correctly points out that this code is dead, just rip it out for
now until someone does it right

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

15 years agoimplement __sync_synchronize and __sync_lock_release,
Chris Lattner [Wed, 13 May 2009 04:46:13 +0000 (04:46 +0000)]
implement __sync_synchronize and __sync_lock_release,
rdar://6880573

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

15 years agoadd support for __sync_nand_and_fetch and __sync_fetch_and_nand,
Chris Lattner [Wed, 13 May 2009 04:37:52 +0000 (04:37 +0000)]
add support for __sync_nand_and_fetch and __sync_fetch_and_nand,
rdar://6880573

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

15 years agoFix rdar://6880874 - [sema] crash on array types with different index sizes
Chris Lattner [Wed, 13 May 2009 04:12:56 +0000 (04:12 +0000)]
Fix rdar://6880874 - [sema] crash on array types with different index sizes

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

15 years agoFix rdar://6881069, a crash on a form of vector_size that we
Chris Lattner [Wed, 13 May 2009 04:00:12 +0000 (04:00 +0000)]
Fix rdar://6881069, a crash on a form of vector_size that we
don't support.  While it would be nice to support this eventually,
this form is not common at all (just seen in gcc testsuite) and
it might be better to model vector_size as a type attribute anyway.
For now just emit a nice error on it.

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

15 years agoFix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)
Chris Lattner [Wed, 13 May 2009 02:50:56 +0000 (02:50 +0000)]
Fix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)
by using the appropriate CGM interface instead of directly creating a global.

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

15 years agoWhen we expect two arguments but have zero, make sure to add
Chris Lattner [Wed, 13 May 2009 00:55:26 +0000 (00:55 +0000)]
When we expect two arguments but have zero, make sure to add
two empty arguments.  Also, add an assert so that this bug
manifests as an assertion failure, not a valgrind problem.

This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion

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

15 years agoChanged wording of warning when attribute is on
Fariborz Jahanian [Wed, 13 May 2009 00:47:33 +0000 (00:47 +0000)]
Changed wording of warning when attribute is on
method definition.

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

15 years agoSemantic analysis for explicit instantiation of class templates. We
Douglas Gregor [Wed, 13 May 2009 00:25:59 +0000 (00:25 +0000)]
Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).

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

15 years agoTweak wording
Daniel Dunbar [Wed, 13 May 2009 00:23:53 +0000 (00:23 +0000)]
Tweak wording

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

15 years agoImplement parsing for explicit instantiations of class templates, e.g.,
Douglas Gregor [Tue, 12 May 2009 23:25:50 +0000 (23:25 +0000)]
Implement parsing for explicit instantiations of class templates, e.g.,

  template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.

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

15 years agoNote a few more unsupported language extensions.
Daniel Dunbar [Tue, 12 May 2009 23:12:07 +0000 (23:12 +0000)]
Note a few more unsupported language extensions.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 12 May 2009 22:44:02 +0000 (22:44 +0000)]
Update checker build.

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

15 years agoimprove the diagnostic for uses of the GCC "global variable in a register" extension.
Chris Lattner [Tue, 12 May 2009 21:44:00 +0000 (21:44 +0000)]
improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension

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

15 years agoParser::ParseDeclarationOrFunctionDefinition no longer needs to accept
Douglas Gregor [Tue, 12 May 2009 21:43:46 +0000 (21:43 +0000)]
Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.

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

15 years agoMethod attributes may only be specified on method
Fariborz Jahanian [Tue, 12 May 2009 21:36:23 +0000 (21:36 +0000)]
Method attributes may only be specified on method
declarations.

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

15 years agoRefactor the parsing of declarations so that template declarations can
Douglas Gregor [Tue, 12 May 2009 21:31:51 +0000 (21:31 +0000)]
Refactor the parsing of declarations so that template declarations can
parse just a single declaration and provide a reasonable diagnostic
when the "only one declarator per template declaration" rule is
violated. This eliminates some ugly, ugly hackery where we used to
require thatn the layout of a DeclGroup of a single element be the
same as the layout of a single declaration.

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

15 years agoimplement l-value codegen of comma expr
Chris Lattner [Tue, 12 May 2009 21:28:12 +0000 (21:28 +0000)]
implement l-value codegen of comma expr

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

15 years agopush GlobalDecl through enough of the CodeGenModule interfaces
Chris Lattner [Tue, 12 May 2009 21:21:08 +0000 (21:21 +0000)]
push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.

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

15 years agoadd an initial stab at emitting deferred c++ inline functions. This handles static
Chris Lattner [Tue, 12 May 2009 21:02:27 +0000 (21:02 +0000)]
add an initial stab at emitting deferred c++ inline functions.  This handles static
functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).

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

15 years agocleanups, no functionality change.
Chris Lattner [Tue, 12 May 2009 20:58:15 +0000 (20:58 +0000)]
cleanups, no functionality change.

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

15 years agoMethod who have definitions in structs/classes are semantically inline.
Chris Lattner [Tue, 12 May 2009 20:55:07 +0000 (20:55 +0000)]
Method who have definitions in structs/classes are semantically inline.
Per the FIXME, it might be interesting to track whether the inline keyword
was also used on the method, but for now we don't do this.  Testcase pending.

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

15 years agostatic methods don't get this pointers.
Chris Lattner [Tue, 12 May 2009 20:27:19 +0000 (20:27 +0000)]
static methods don't get this pointers.

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

15 years agorevert my previous patch, I committed the wrong file.
Chris Lattner [Tue, 12 May 2009 20:26:52 +0000 (20:26 +0000)]
revert my previous patch, I committed the wrong file.

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

15 years agoDiagnostic wording fix, from Anders Johnsen
Douglas Gregor [Tue, 12 May 2009 20:24:52 +0000 (20:24 +0000)]
Diagnostic wording fix, from Anders Johnsen

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

15 years agostatic methods don't get this pointers.
Chris Lattner [Tue, 12 May 2009 20:21:39 +0000 (20:21 +0000)]
static methods don't get this pointers.

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

15 years agoFix: <rdar://problem/6320065> false positive - init method returns an object owned...
Ted Kremenek [Tue, 12 May 2009 20:06:54 +0000 (20:06 +0000)]
Fix: <rdar://problem/6320065> false positive - init method returns an object owned by caller

Now 'init' methods are treated by the retain/release checker as
claiming their receiver and allocating a new object.

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

15 years agoFixed typos, used DenseSet for keeping track of
Fariborz Jahanian [Tue, 12 May 2009 20:06:41 +0000 (20:06 +0000)]
Fixed typos, used DenseSet for keeping track of
selectors which need use Nonfrgile API for
message dispatch.

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

15 years agoAlign the N/A in the C++ status table, from Anders Johnsen
Douglas Gregor [Tue, 12 May 2009 18:36:58 +0000 (18:36 +0000)]
Align the N/A in the C++ status table, from Anders Johnsen

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

15 years agoaccept "#pragma clang foo" where we accept "#pragma GCC foo".
Chris Lattner [Tue, 12 May 2009 18:21:11 +0000 (18:21 +0000)]
accept "#pragma clang foo" where we accept "#pragma GCC foo".

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

15 years agoPatch to implement ivar synthesis of properties declared in protocols
Fariborz Jahanian [Tue, 12 May 2009 18:14:29 +0000 (18:14 +0000)]
Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).

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

15 years agoMake scan-build process of --use-cc and --html-title more robust.
Ted Kremenek [Tue, 12 May 2009 18:04:43 +0000 (18:04 +0000)]
Make scan-build process of --use-cc and --html-title more robust.

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

15 years agoFill in more C++ status. We're now using the check mark to mean,
Douglas Gregor [Tue, 12 May 2009 17:55:28 +0000 (17:55 +0000)]
Fill in more C++ status. We're now using the check mark to mean,
"complete, and we have tests for every paragraph".

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

15 years agoDarwin x86-32 ABI: Now that structure passing is farther along, we
Daniel Dunbar [Tue, 12 May 2009 17:00:20 +0000 (17:00 +0000)]
Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.

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

15 years agox86-64 ABI: clang incorrectly passes union { long double, float } in
Daniel Dunbar [Tue, 12 May 2009 15:22:40 +0000 (15:22 +0000)]
x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
 - Merge algorithm was returning MEMORY as it should.

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

15 years agoAdd logic for invalidating array region to CFRefCount.cpp. When invalidating
Zhongxing Xu [Tue, 12 May 2009 10:10:00 +0000 (10:10 +0000)]
Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.

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

15 years agoFix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same...
Ted Kremenek [Tue, 12 May 2009 04:53:03 +0000 (04:53 +0000)]
Fix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same treatment as CF objects

This was accomplished by having 'isTypeRef' recursively walk the typedef stack.

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

15 years agoMake precompiled headers work with -E. When we're only preprocessing
Douglas Gregor [Tue, 12 May 2009 01:31:05 +0000 (01:31 +0000)]
Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.

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

15 years agowrap up a version of the man page that is minimally helpful, but somewhat complete.
Chris Lattner [Tue, 12 May 2009 00:47:40 +0000 (00:47 +0000)]
wrap up a version of the man page that is minimally helpful, but somewhat complete.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 12 May 2009 00:45:33 +0000 (00:45 +0000)]
Update checker build.

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

15 years agoadd some more content.
Chris Lattner [Tue, 12 May 2009 00:01:32 +0000 (00:01 +0000)]
add some more content.

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

15 years agoEncapsulate template arguments lists in a new class,
Douglas Gregor [Mon, 11 May 2009 23:53:27 +0000 (23:53 +0000)]
Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.

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

15 years agoBugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEv...
Ted Kremenek [Mon, 11 May 2009 23:50:59 +0000 (23:50 +0000)]
BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.

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

15 years agoFactor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out...
Anders Carlsson [Mon, 11 May 2009 23:37:08 +0000 (23:37 +0000)]
Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.

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

15 years agoUse Text::ParseWords to make 'clang -###' parsing more robust.
Ted Kremenek [Mon, 11 May 2009 23:29:51 +0000 (23:29 +0000)]
Use Text::ParseWords to make 'clang -###' parsing more robust.

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

15 years agoTweak this non-default test so it still works w/ x86 feature support.
Daniel Dunbar [Mon, 11 May 2009 23:11:21 +0000 (23:11 +0000)]
Tweak this non-default test so it still works w/ x86 feature support.

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

15 years agoTest for x86 target features, I forgot to commit this.
Daniel Dunbar [Mon, 11 May 2009 23:06:15 +0000 (23:06 +0000)]
Test for x86 target features, I forgot to commit this.

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

15 years agoDarwin x86-32: Multi-dimensional arrays were not handled correctly,
Daniel Dunbar [Mon, 11 May 2009 23:01:34 +0000 (23:01 +0000)]
Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!

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

15 years agoFriend declarations are only valid inside class definitions.
Anders Carlsson [Mon, 11 May 2009 22:55:49 +0000 (22:55 +0000)]
Friend declarations are only valid inside class definitions.

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

15 years agoWhen stripping element regions for invalidating region values, treat FieldRegions...
Ted Kremenek [Mon, 11 May 2009 22:55:17 +0000 (22:55 +0000)]
When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.

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

15 years agopull a bunch of options out of clang-cc.cpp. This doesn't include
Chris Lattner [Mon, 11 May 2009 22:45:37 +0000 (22:45 +0000)]
pull a bunch of options out of clang-cc.cpp.  This doesn't include
options that the driver swizzles.

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

15 years agoFix test case by always setting the type spec type, even for friend decls.
Anders Carlsson [Mon, 11 May 2009 22:42:30 +0000 (22:42 +0000)]
Fix test case by always setting the type spec type, even for friend decls.

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

15 years agoMake cleanup-stack.c test stronger, and work in release-asserts mode.
Daniel Dunbar [Mon, 11 May 2009 22:30:29 +0000 (22:30 +0000)]
Make cleanup-stack.c test stronger, and work in release-asserts mode.

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

15 years agoAdd an ActOnFriendDecl and call it for friend class decls.
Anders Carlsson [Mon, 11 May 2009 22:27:47 +0000 (22:27 +0000)]
Add an ActOnFriendDecl and call it for friend class decls.

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

15 years agoFor friend class decls, always use TK_Reference so we'll try to look up existing...
Anders Carlsson [Mon, 11 May 2009 22:25:03 +0000 (22:25 +0000)]
For friend class decls, always use TK_Reference so we'll try to look up existing class decls first.

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

15 years agoEdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context...
Ted Kremenek [Mon, 11 May 2009 22:19:32 +0000 (22:19 +0000)]
EdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context when they are used as initialization code for loops.

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

15 years agoEdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor...
Ted Kremenek [Mon, 11 May 2009 21:42:34 +0000 (21:42 +0000)]
EdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor for a single point, not a range.

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

15 years agoccc-analyzer should only analyze C and Objective-C files.
Ted Kremenek [Mon, 11 May 2009 21:08:34 +0000 (21:08 +0000)]
ccc-analyzer should only analyze C and Objective-C files.

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

15 years agoImplement the notions of the "current instantiation" and "unknown
Douglas Gregor [Mon, 11 May 2009 19:58:34 +0000 (19:58 +0000)]
Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

  template<typename T, typename U>
  struct X {
    typedef T type;

    X* x1;  // current instantiation
    X<T, U> *x2; // current instantiation
    X<U, T> *x3; // not current instantiation
    ::X<type, U> *x4; // current instantiation
    X<typename X<type, U>::type, U>: *x5; // current instantiation
  };

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

15 years agoBugReporter (extensive diagnostics): Add EdgeBuilder::cleanUpLocation for canonicaliz...
Ted Kremenek [Mon, 11 May 2009 19:50:47 +0000 (19:50 +0000)]
BugReporter (extensive diagnostics): Add EdgeBuilder::cleanUpLocation for canonicalization locations and use this in both popLocation and rawAddEdge.

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

15 years agoAdd ParentMap:getParentIgnoreParens().
Ted Kremenek [Mon, 11 May 2009 19:49:27 +0000 (19:49 +0000)]
Add ParentMap:getParentIgnoreParens().

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

15 years agoPatch to allow Nonfragile ABI to use 32-bit style legacy
Fariborz Jahanian [Mon, 11 May 2009 19:25:47 +0000 (19:25 +0000)]
Patch to allow Nonfragile ABI to use 32-bit style legacy
message dispage API for all but a few messages. This is
a runtime performance improvement and there is not meant
to be a functional change.

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 11 May 2009 19:02:11 +0000 (19:02 +0000)]
Update checker build.

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

15 years agoDarwin x86_32: Treat records with unnamed bit-fields as "empty".
Daniel Dunbar [Mon, 11 May 2009 18:58:49 +0000 (18:58 +0000)]
Darwin x86_32: Treat records with unnamed bit-fields as "empty".

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

15 years agoFix regression reported in <rdar://problem/6866843>. The analyzer should extend...
Ted Kremenek [Mon, 11 May 2009 18:30:24 +0000 (18:30 +0000)]
Fix regression reported in <rdar://problem/6866843>.  The analyzer should extend the lifetime of an object stored to a container.

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

15 years agoMore improvements for GNU runtime objc EH, patch by David Chisnall!
Chris Lattner [Mon, 11 May 2009 18:16:28 +0000 (18:16 +0000)]
More improvements for GNU runtime objc EH, patch by David Chisnall!

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

15 years agoMove terminal-width computation over to llvm::sys. Update to LLVM
Douglas Gregor [Mon, 11 May 2009 18:06:49 +0000 (18:06 +0000)]
Move terminal-width computation over to llvm::sys. Update to LLVM
r71448 required. Fixes PR 4148 and PR 4183.

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

15 years agoAdd test case for <rdar://problem/6257780>.
Ted Kremenek [Mon, 11 May 2009 17:45:06 +0000 (17:45 +0000)]
Add test case for <rdar://problem/6257780>.

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

15 years agoAdd a test for canonicalization of template arguments
Douglas Gregor [Mon, 11 May 2009 16:52:38 +0000 (16:52 +0000)]
Add a test for canonicalization of template arguments

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 11 May 2009 16:31:31 +0000 (16:31 +0000)]
Update checker build.

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

15 years agoFix a bug found by Thomas Clement where 'return [[[NSString alloc] init] autorelease...
Ted Kremenek [Mon, 11 May 2009 15:26:06 +0000 (15:26 +0000)]
Fix a bug found by Thomas Clement where 'return [[[NSString alloc] init] autorelease]' would emit a false 'too many overreleases' error.

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

15 years agoTypedRegion is a too general assumption. Usually we only want to invalidate
Zhongxing Xu [Mon, 11 May 2009 14:28:14 +0000 (14:28 +0000)]
TypedRegion is a too general assumption. Usually we only want to invalidate
the VarRegion as a super region of an ElementRegion.

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

15 years agoWhen retrieving an ElementRegion, if its super region is a StringRegion,
Zhongxing Xu [Mon, 11 May 2009 14:23:36 +0000 (14:23 +0000)]
When retrieving an ElementRegion, if its super region is a StringRegion,
retrieve the string value.

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

15 years agoFix a bug that leads to infinite loop. Set the correct element type to
Zhongxing Xu [Mon, 11 May 2009 12:48:56 +0000 (12:48 +0000)]
Fix a bug that leads to infinite loop. Set the correct element type to
ElementRegion.

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

15 years agoWith the introduction of nullptr, a template argument that refers to a declaration...
Douglas Gregor [Sun, 10 May 2009 23:27:08 +0000 (23:27 +0000)]
With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately

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

15 years agoThe canonical declaration of a NULL declaration is NULL
Douglas Gregor [Sun, 10 May 2009 22:59:12 +0000 (22:59 +0000)]
The canonical declaration of a NULL declaration is NULL

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

15 years agoImplement the semantics of the injected-class-name within a class
Douglas Gregor [Sun, 10 May 2009 22:57:19 +0000 (22:57 +0000)]
Implement the semantics of the injected-class-name within a class
template. The injected-class-name is either a type or a template,
depending on whether a '<' follows it. As a type, the
injected-class-name's template argument list contains its template
parameters in declaration order.

As part of this, add logic for canonicalizing declarations, and be
sure to canonicalize declarations used in template names and template
arguments.

A TagType is dependent if the declaration it references is dependent.

I'm not happy about the rather complicated protocol needed to use
ASTContext::getTemplateSpecializationType.

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

15 years agoUpdate minor points in C++ status table.
Sebastian Redl [Sun, 10 May 2009 20:06:11 +0000 (20:06 +0000)]
Update minor points in C++ status table.

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

15 years agoImplement C++0x nullptr.
Sebastian Redl [Sun, 10 May 2009 18:38:11 +0000 (18:38 +0000)]
Implement C++0x nullptr.

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 10 May 2009 17:41:29 +0000 (17:41 +0000)]
Update checker build.

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

15 years agoAdd special warning about returning a retained object where a GC'ed object is expected.
Ted Kremenek [Sun, 10 May 2009 16:52:15 +0000 (16:52 +0000)]
Add special warning about returning a retained object where a GC'ed object is expected.

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