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

14112 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek caac0899b5 Make this test case more portable by removing its dependency on system header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 04:48:23 +00:00
Eli Friedman 04e8357f68 Fix bit-field promotion to be a bit closer to the behavior of gcc.
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 04:21:42 +00:00
Zhongxing Xu d5c3b1339e If the 'while' has an empty body, set the body to the continue target block.
Although this does not make the CFG more correct, it makes the CFG more 
beautiful without multiple roots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 03:21:49 +00:00
Zhongxing Xu 1d4b218fa5 If the body of for loop is empty, set its body to the continue target.
Otherwise we get a wrong CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 02:56:48 +00:00
Mike Stump 7fa0d93a3b Ensure we don't output repeated vbase offsets. I have a testcase for
this, but need to fixup the actual offset value before I can check it
in.  WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 02:11:48 +00:00
John McCall e29ba20148 Basic nested-template implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 01:44:21 +00:00
Zhongxing Xu fafd383475 Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 01:23:34 +00:00
Fariborz Jahanian 995d2818a1 Test case for my last patch plus a minor clean up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 01:01:06 +00:00
Ted Kremenek c484381467 retain/release checker: Special case handling of CFAttributedStringSetAttribute,
fixing <rdar://problem/7152619>. Along the way, merge test cases in
'test/Analysis/rdar-6539791.c' into 'test/Analysis/retain-release.m'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 00:57:22 +00:00
Fariborz Jahanian 6147a908f6 ir-gen for multi-dimensional array construction. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 00:15:15 +00:00
Ted Kremenek 21531fa592 Enhance diagnostics concerning attribute 'ns_returns_retained' and 'cf_returns_retained' to present the range of the attribute and have the diagnostic location be the declaration that the attribute was falsely attached to. This solves the problem where these diagnostics were being suppressed when these attributes were wrapped in a macro that was defined in a system header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:56:48 +00:00
Argyrios Kyrtzidis 82bf01061b Keep track of the right paren ')' source location in a function declarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:14:54 +00:00
Fariborz Jahanian 1dea87a076 Removed unneeded code for break/continue statements in
manufactured for-loop per Anders feedback (thanks).

- Fariborz


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 21:10:38 +00:00
Fariborz Jahanian 288dcaf329 ir-gen for constructing arrays as non-static data members. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:55:16 +00:00
Eli Friedman b63decfa6e Add TCE target to clang; patch by Mikael Lepistö.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:47:07 +00:00
Daniel Dunbar 44ba7bf544 Remove now unnecessary helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:32:38 +00:00
Daniel Dunbar 90b504aee5 Tweak svn:ignore
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:31:51 +00:00
Daniel Dunbar 7765934ad7 Switch to SmallString::str from SmallString::c_str.
- Several FIXMEs due to non-Twinification of IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:04:03 +00:00
Daniel Dunbar d7407dc92c Convert parts of Rewriter to StringRef based API.
- Please accept my sincere apologies for the gratuitous elimination of code
   duplication, manual string length counting, unnecessary strlen calls, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 19:10:30 +00:00
Daniel Dunbar 7e37c818f9 Use raw_svector_ostream for string concatenation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79444 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:30:37 +00:00
Mike Stump eb7e9c39f3 One second thought, I think I want to limit this class to just vtable
building activities.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:10:47 +00:00
Mike Stump ee560f3b1f Cleanup: fold IndirectPrimary into builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 14:40:47 +00:00
Mike Stump cc2a01206b We don't want to confuse this layout with the BLayout from the builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 14:06:50 +00:00
Mike Stump 9c88d985f5 Update for recent improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 13:36:31 +00:00
Zhongxing Xu f7a50a4ee2 Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 12:50:00 +00:00
Benjamin Kramer ad97866feb Update CMakeLists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 12:02:15 +00:00
Eli Friedman a95d75769e Make integer promotions work correctly on PIC16 and other platforms
where sizeof(short) == sizeof(int).  Move UsualArithmeticConversionsType 
out of Sema, since it was only there as a historical artifact.  Patch by 
Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 07:44:53 +00:00
Mike Stump 09765ece71 Restore vbase offsets for classes without a primary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 02:53:08 +00:00
Mike Stump b46c92dfed Refine vcalls a little.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79400 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 02:06:38 +00:00
Argyrios Kyrtzidis 35d44e5673 Fix a comment and improve an assert message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:46:06 +00:00
Argyrios Kyrtzidis d4a7e54f48 Store/load type source info from/to PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:28:35 +00:00
Argyrios Kyrtzidis e8661906d4 Use Sema's LocInfoType to pass and preserve type source info through the Parser.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:28:28 +00:00
Argyrios Kyrtzidis 1bb8a45f73 Introduce LocInfoType which is a Sema-specific implementation detail.
This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:28:17 +00:00
Argyrios Kyrtzidis 4adab7fcb4 Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79393 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:28:06 +00:00
Argyrios Kyrtzidis a1d5662d96 Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:27:57 +00:00
Argyrios Kyrtzidis b17166c807 Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types.
DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator.
TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information.

Both DeclaratorInfo and TypeLoc are not utilized in this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:27:32 +00:00
Anders Carlsson 7d878eb7f3 Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79390 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 01:17:32 +00:00
Mike Stump 552b275708 Cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 22:04:08 +00:00
Mike Stump b3d8837214 Add some documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:59:28 +00:00
Mike Stump 32f3701853 Cleanups. Move GenerateRtti to CodeGenModule.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:49:00 +00:00
Fariborz Jahanian d2ae5aa732 Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79371 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:37:33 +00:00
Mike Stump 109b13db33 Move the rest of the vtable building code into the new builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:30:21 +00:00
Mike Stump 65defe3ee7 Suck up method generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79367 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 21:03:28 +00:00
Mike Stump 7c435fa7f7 Split out vtable bulding code into a builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 20:50:28 +00:00
Fariborz Jahanian 154440e6a8 Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 20:50:23 +00:00
Anders Carlsson f53b4433ab Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 16:11:00 +00:00
Zhongxing Xu 292a5c0469 Remove unused parameter BugReporter due to previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 08:58:41 +00:00
Zhongxing Xu 50d5bc4e3b Now we can get the CFG from the ProgramPoint. No need to pass in the
BugReporter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 08:46:04 +00:00
Daniel Dunbar 4f9449d8d8 Add test for finding bfin backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 07:07:14 +00:00
Daniel Dunbar 9d6fa61582 Convert CreateTargetInfo to use a Triple instead of manul string munging.
- Patch by Yonggang Luo (with some formatting tweaks by Eli and myself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 05:47:58 +00:00