Граф коммитов

11844 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 93dfdb1299 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
2009-05-13 00:25:59 +00:00
Daniel Dunbar 869e05406e Tweak wording
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13 00:23:53 +00:00
Douglas Gregor 4d9a16f36d 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
2009-05-12 23:25:50 +00:00
Daniel Dunbar 05fa629c9f Note a few more unsupported language extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 23:12:07 +00:00
Ted Kremenek 59e64cec90 Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71605 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 22:44:02 +00:00
Chris Lattner d4b19d5241 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
2009-05-12 21:44:00 +00:00
Douglas Gregor 709131972f 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
2009-05-12 21:43:46 +00:00
Fariborz Jahanian 5d36ac2cc9 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
2009-05-12 21:36:23 +00:00
Douglas Gregor 1426e534b4 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
2009-05-12 21:31:51 +00:00
Chris Lattner 7a574ccd52 implement l-value codegen of comma expr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 21:28:12 +00:00
Chris Lattner b4880bab7f 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
2009-05-12 21:21:08 +00:00
Chris Lattner 0c337ed63f 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
2009-05-12 21:02:27 +00:00
Chris Lattner 9fa959d5bf cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 20:58:15 +00:00
Chris Lattner 0afeaa3ff8 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
2009-05-12 20:55:07 +00:00
Chris Lattner 3eb67ca786 static methods don't get this pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 20:27:19 +00:00
Chris Lattner 005eedce54 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
2009-05-12 20:26:52 +00:00
Douglas Gregor 2df0716635 Diagnostic wording fix, from Anders Johnsen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 20:24:52 +00:00
Chris Lattner 43ac9654d0 static methods don't get this pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 20:21:39 +00:00
Ted Kremenek 78a35a3900 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
2009-05-12 20:06:54 +00:00
Fariborz Jahanian 4523eb0fdf 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
2009-05-12 20:06:41 +00:00
Douglas Gregor 01cf112ad1 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
2009-05-12 18:36:58 +00:00
Chris Lattner e8fa06e073 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
2009-05-12 18:21:11 +00:00
Fariborz Jahanian 9820074dd4 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
2009-05-12 18:14:29 +00:00
Ted Kremenek 278a55103a 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
2009-05-12 18:04:43 +00:00
Douglas Gregor 0755402a12 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
2009-05-12 17:55:28 +00:00
Daniel Dunbar 836a0641ba 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
2009-05-12 17:00:20 +00:00
Daniel Dunbar 20e95c5eb4 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
2009-05-12 15:22:40 +00:00
Zhongxing Xu 264e93799c 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
2009-05-12 10:10:00 +00:00
Ted Kremenek 6738b731a6 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
2009-05-12 04:53:03 +00:00
Douglas Gregor b64c19365d 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
2009-05-12 01:31:05 +00:00
Chris Lattner 06ab044127 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
2009-05-12 00:47:40 +00:00
Ted Kremenek 745812020e Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 00:45:33 +00:00
Chris Lattner 04005ddfe1 add some more content.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 00:01:32 +00:00
Douglas Gregor 7e06390f8a 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
2009-05-11 23:53:27 +00:00
Ted Kremenek 3ef538dd1b 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
2009-05-11 23:50:59 +00:00
Anders Carlsson b9de2c55b2 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
2009-05-11 23:37:08 +00:00
Ted Kremenek 1df35e310d 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
2009-05-11 23:29:51 +00:00
Daniel Dunbar 31ed552f8f 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
2009-05-11 23:11:21 +00:00
Daniel Dunbar 4508524a6c 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
2009-05-11 23:06:15 +00:00
Daniel Dunbar cc401dc651 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
2009-05-11 23:01:34 +00:00
Anders Carlsson 0033836b3c 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
2009-05-11 22:55:49 +00:00
Ted Kremenek 109bf47503 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
2009-05-11 22:55:17 +00:00
Chris Lattner 482c682256 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
2009-05-11 22:45:37 +00:00
Anders Carlsson d4f551b349 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
2009-05-11 22:42:30 +00:00
Daniel Dunbar 159c763373 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
2009-05-11 22:30:29 +00:00
Anders Carlsson 66e9977ddd 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
2009-05-11 22:27:47 +00:00
Anders Carlsson 5dc2af12bd 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
2009-05-11 22:25:03 +00:00
Ted Kremenek e88a170da9 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
2009-05-11 22:19:32 +00:00
Ted Kremenek 9650cf3b08 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
2009-05-11 21:42:34 +00:00
Ted Kremenek efaf1915d5 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
2009-05-11 21:08:34 +00:00