]> granicus.if.org Git - clang/log
clang
16 years agoConverted Loc back to being of type ProgramEdge. Ultimately I believe we want
Ted Kremenek [Fri, 21 Dec 2007 23:23:12 +0000 (23:23 +0000)]
Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.

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

16 years agoAdded preliminary implementation of SimulGraph, which represents the
Ted Kremenek [Fri, 21 Dec 2007 23:21:58 +0000 (23:21 +0000)]
Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.

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

16 years agoChanged "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
Ted Kremenek [Fri, 21 Dec 2007 22:57:10 +0000 (22:57 +0000)]
Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).

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

16 years agoSimulVertex now subclasses FoldingSetNode.
Ted Kremenek [Fri, 21 Dec 2007 22:41:58 +0000 (22:41 +0000)]
SimulVertex now subclasses FoldingSetNode.

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

16 years agoAdded Profile method to SimulVertex.
Ted Kremenek [Fri, 21 Dec 2007 22:40:41 +0000 (22:40 +0000)]
Added Profile method to SimulVertex.

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

16 years agoThis patch implements some of the more obscure type-checking involving
Fariborz Jahanian [Fri, 21 Dec 2007 22:22:33 +0000 (22:22 +0000)]
This patch implements some of the more obscure type-checking involving
'id' quallified with protocols and static types which have categories and
inheritance which implement these protocols.

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

16 years agoUpdated Xcode project to be in sync with recent changes in file locations
Ted Kremenek [Fri, 21 Dec 2007 21:48:31 +0000 (21:48 +0000)]
Updated Xcode project to be in sync with recent changes in file locations
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev)

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

16 years agoDirectory restructing of Analysis files.
Ted Kremenek [Fri, 21 Dec 2007 21:42:19 +0000 (21:42 +0000)]
Directory restructing of Analysis files.

Created include/clang/Analysis/Analyses directory.
  - Moved LiveVariables.h and UninitializedValues.h into this dir.

Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.

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

16 years agoRenamed file AnalysisVertex.h to SimulVertex.h
Ted Kremenek [Fri, 21 Dec 2007 21:17:22 +0000 (21:17 +0000)]
Renamed file AnalysisVertex.h to SimulVertex.h

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

16 years agoRenamed class AnalysisVertex to SimulVertex
Ted Kremenek [Fri, 21 Dec 2007 21:16:58 +0000 (21:16 +0000)]
Renamed class AnalysisVertex to SimulVertex

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

16 years agoFixed successor order for CFG basic blocks when handling: x && y. The bug
Ted Kremenek [Fri, 21 Dec 2007 19:49:00 +0000 (19:49 +0000)]
Fixed successor order for CFG basic blocks when handling: x && y.  The bug
is best explained by illustration:

[ B2 ]
     1: x
     T: [B2.1] && ...
   Predecessors (1): B4
   Successors (2): B3 B1

Block "B3" should be the block where we evaluate "y" when "x" evaluates to
true. Previously we had the successor list reversed. Now this behavior matches
with how we handle other conditional branches.

Thanks to Nuno Lopes for reporting this problem.

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

16 years agoConvert opaque type when struct definition is seen.
Devang Patel [Fri, 21 Dec 2007 19:35:28 +0000 (19:35 +0000)]
Convert opaque type when struct definition is seen.

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

16 years agoKeep track of llvm struct size while adding fields.
Devang Patel [Fri, 21 Dec 2007 18:43:53 +0000 (18:43 +0000)]
Keep track of llvm struct size while adding fields.
Update addPaddingFields() interface.

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

16 years agoPatch to compare to objective-c static types where one or the other
Fariborz Jahanian [Fri, 21 Dec 2007 17:34:43 +0000 (17:34 +0000)]
Patch to compare to objective-c static types where one or the other
(but not both) may be a protocol qualified static type.

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

16 years agoTest case for my last patch.
Fariborz Jahanian [Fri, 21 Dec 2007 00:35:35 +0000 (00:35 +0000)]
Test case for my last patch.

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

16 years agoMore objective-c type analysis. This time involving objective types
Fariborz Jahanian [Fri, 21 Dec 2007 00:33:59 +0000 (00:33 +0000)]
More objective-c type analysis. This time involving objective types
of conforming protocols (or not).

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

16 years agoAdded class "StateVariant", a template class which serves to wrap states that
Ted Kremenek [Fri, 21 Dec 2007 00:04:19 +0000 (00:04 +0000)]
Added class "StateVariant", a template class which serves to wrap states that
are generated by transfer functions used by the path-sensitive dataflow solver.

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

16 years agoAdded initial implementation of "AnalysisVertex", a class to represent a
Ted Kremenek [Thu, 20 Dec 2007 23:24:55 +0000 (23:24 +0000)]
Added initial implementation of "AnalysisVertex", a class to represent a
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.

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

16 years agoAnother test for objective-c type comparison.
Fariborz Jahanian [Thu, 20 Dec 2007 22:53:29 +0000 (22:53 +0000)]
Another test for objective-c type comparison.

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

16 years agoMore objective-c type checking. This time comparing objective-c known objects.
Fariborz Jahanian [Thu, 20 Dec 2007 22:37:58 +0000 (22:37 +0000)]
More objective-c type checking. This time comparing objective-c known objects.

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

16 years agoConverted uses of scoped_ptr to OwningPtr.
Ted Kremenek [Thu, 20 Dec 2007 19:47:16 +0000 (19:47 +0000)]
Converted uses of scoped_ptr to OwningPtr.

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

16 years agoPatch to do type-checking for objctive-c's object types.
Fariborz Jahanian [Thu, 20 Dec 2007 19:24:10 +0000 (19:24 +0000)]
Patch to do type-checking for objctive-c's object types.
More is yet to come.

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

16 years agoadd accessor.
Chris Lattner [Thu, 20 Dec 2007 19:14:21 +0000 (19:14 +0000)]
add accessor.

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

16 years agoAdd newline
Seo Sanghyeon [Thu, 20 Dec 2007 07:22:20 +0000 (07:22 +0000)]
Add newline

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

16 years agoFix trivial self-infinite-recursion
Chris Lattner [Thu, 20 Dec 2007 01:38:17 +0000 (01:38 +0000)]
Fix trivial self-infinite-recursion

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

16 years agoMore objective-c typechecking stuff. This is work in progress and more patches
Fariborz Jahanian [Thu, 20 Dec 2007 01:06:58 +0000 (01:06 +0000)]
More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.

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

16 years agoImplement codegen for ordered comparison builtins.
Chris Lattner [Thu, 20 Dec 2007 00:44:32 +0000 (00:44 +0000)]
Implement codegen for ordered comparison builtins.

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

16 years agoCreated initial implementation of "BuildSerializer", and ASTConsumer
Ted Kremenek [Thu, 20 Dec 2007 00:34:58 +0000 (00:34 +0000)]
Created initial implementation of "BuildSerializer", and ASTConsumer
which serializes ASTs to a common output directory.  This ASTConsumer
is invoked using a combination of "-o" and "-serialize" from the driver.

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

16 years agoRenamed "FileEntry::getDev()" to "FileEntry::getDevice()"
Ted Kremenek [Thu, 20 Dec 2007 00:29:44 +0000 (00:29 +0000)]
Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"

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

16 years agoimplement semantic analysis for __builtin_islessequal and friends.
Chris Lattner [Thu, 20 Dec 2007 00:26:33 +0000 (00:26 +0000)]
implement semantic analysis for __builtin_islessequal and friends.

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

16 years agoAdded method getFileEntryForID() to SourceManager.
Ted Kremenek [Thu, 20 Dec 2007 00:15:17 +0000 (00:15 +0000)]
Added method getFileEntryForID() to SourceManager.

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

16 years agosimplify some code.
Chris Lattner [Thu, 20 Dec 2007 00:05:45 +0000 (00:05 +0000)]
simplify some code.

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

16 years agorefactor some code that handles sema of direct function calls.
Chris Lattner [Wed, 19 Dec 2007 23:59:04 +0000 (23:59 +0000)]
refactor some code that handles sema of direct function calls.

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

16 years agoAdd iterator interface to function/method parameters.
Chris Lattner [Wed, 19 Dec 2007 23:58:25 +0000 (23:58 +0000)]
Add iterator interface to function/method parameters.

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

16 years agoSplit serialization ASTConsumers into two consumers: SingleFileSerializer and
Ted Kremenek [Wed, 19 Dec 2007 23:49:37 +0000 (23:49 +0000)]
Split serialization ASTConsumers into two consumers: SingleFileSerializer and
BuildSerializer. The former serializes a single translation unit to a
corresponding .ast file. The second serializes ASTs to a common emission
direction.  The latter is not fully implemented yet.

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

16 years agoAdded methods createMainFileID() and createMainFileIDForMemBuffer() to
Ted Kremenek [Wed, 19 Dec 2007 23:48:45 +0000 (23:48 +0000)]
Added methods createMainFileID() and createMainFileIDForMemBuffer() to
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created.  Removed setMainFileID().

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

16 years agoInterned MainFileID within SourceManager. Since SourceManager is referenced by
Ted Kremenek [Wed, 19 Dec 2007 22:51:13 +0000 (22:51 +0000)]
Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.

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

16 years agoTypo fix.
Ted Kremenek [Wed, 19 Dec 2007 22:32:34 +0000 (22:32 +0000)]
Typo fix.

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

16 years agoAdded storage of the FileID of the the main source file of a translation unit
Ted Kremenek [Wed, 19 Dec 2007 22:29:55 +0000 (22:29 +0000)]
Added storage of the FileID of the the main source file of a translation unit
in SourceManager.

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

16 years agoVarious tweaks to the get/lookup instance/class method API's.
Steve Naroff [Wed, 19 Dec 2007 22:27:04 +0000 (22:27 +0000)]
Various tweaks to the get/lookup instance/class method API's.

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

16 years agoRemoved "SourceFile" from TranslationUnit. This same information will (soon)
Ted Kremenek [Wed, 19 Dec 2007 22:24:34 +0000 (22:24 +0000)]
Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.

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

16 years agoDescribe Nico's script for gcc interception. Patch by Nico Weber.
Chris Lattner [Wed, 19 Dec 2007 22:17:19 +0000 (22:17 +0000)]
Describe Nico's script for gcc interception.  Patch by Nico Weber.

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

16 years agoCleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
Ted Kremenek [Wed, 19 Dec 2007 19:50:41 +0000 (19:50 +0000)]
Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
doing clang --help.

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

16 years agoAdded "-o" option to driver. ASTConsumers will need to be gradually
Ted Kremenek [Wed, 19 Dec 2007 19:47:59 +0000 (19:47 +0000)]
Added "-o" option to driver.  ASTConsumers will need to be gradually
rewired to utilize this option.

Renamed option --serialize-ast --serialize.

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

16 years agoAdd support for #pragma mark, which shouldn't warn about bogus tokens.
Chris Lattner [Wed, 19 Dec 2007 19:38:36 +0000 (19:38 +0000)]
Add support for #pragma mark, which shouldn't warn about bogus tokens.

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

16 years agoRemoved storing inode and device number in TranslationUnit.
Ted Kremenek [Wed, 19 Dec 2007 19:27:38 +0000 (19:27 +0000)]
Removed storing inode and device number in TranslationUnit.

Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.

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

16 years agofix some crazy indentation
Chris Lattner [Wed, 19 Dec 2007 19:23:28 +0000 (19:23 +0000)]
fix some crazy indentation

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

16 years agoSoften the macro rewrite error to a warning (and change the text).
Steve Naroff [Wed, 19 Dec 2007 19:16:49 +0000 (19:16 +0000)]
Soften the macro rewrite error to a warning (and change the text).

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

16 years agoMinor test twik.
Fariborz Jahanian [Wed, 19 Dec 2007 19:07:24 +0000 (19:07 +0000)]
Minor test twik.

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

16 years agoUpdated locations of TranslationUnit.[cpp,h] in XCode project.
Ted Kremenek [Wed, 19 Dec 2007 18:07:54 +0000 (18:07 +0000)]
Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.

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

16 years agoreenable this code, fix the testcase.
Chris Lattner [Wed, 19 Dec 2007 18:01:43 +0000 (18:01 +0000)]
reenable this code, fix the testcase.

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

16 years agodisable my commit from yesterday, fixing a regression test failure.
Chris Lattner [Wed, 19 Dec 2007 17:49:45 +0000 (17:49 +0000)]
disable my commit from yesterday, fixing a regression test failure.

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

16 years agoThis patch concludes implementation of dynamic objective-c type qualified by
Fariborz Jahanian [Wed, 19 Dec 2007 17:45:58 +0000 (17:45 +0000)]
This patch concludes implementation of dynamic objective-c type qualified by
protocol list.

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

16 years agoFix the embarassing typo for real this time (- vs _), sorry about breaking the tests...
Anders Carlsson [Wed, 19 Dec 2007 17:43:24 +0000 (17:43 +0000)]
Fix the embarassing typo for real this time (- vs _), sorry about breaking the tests Steve.

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

16 years agoMoved generation of the name of the serialized AST file into
Ted Kremenek [Wed, 19 Dec 2007 17:25:59 +0000 (17:25 +0000)]
Moved generation of the name of the serialized AST file into
CreateASTSerializer.

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

16 years agoEmit errors when attempting to rewrite ObjC expressions that originate from a macro...
Steve Naroff [Wed, 19 Dec 2007 14:32:56 +0000 (14:32 +0000)]
Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.

We plan on fixing this and removing this restriction after the break...

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

16 years agoRevert Anders r45191 commit...it broke several of the tests.
Steve Naroff [Wed, 19 Dec 2007 14:11:27 +0000 (14:11 +0000)]
Revert Anders r45191 commit...it broke several of the tests.

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

16 years agoFix an embarassing typo and add some very limited support for the aligned attribute.
Anders Carlsson [Wed, 19 Dec 2007 07:19:40 +0000 (07:19 +0000)]
Fix an embarassing typo and add some very limited support for the aligned attribute.

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

16 years agosvn:ignore configure.out at the root level
Christopher Lamb [Wed, 19 Dec 2007 06:43:23 +0000 (06:43 +0000)]
svn:ignore configure.out at the root level

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

16 years agoChange svn attributes to ignore build directories.
Christopher Lamb [Wed, 19 Dec 2007 06:41:17 +0000 (06:41 +0000)]
Change svn attributes to ignore build directories.

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

16 years agoNormalize attribute names if possible so we won't have to do two strcmps for every...
Anders Carlsson [Wed, 19 Dec 2007 06:16:30 +0000 (06:16 +0000)]
Normalize attribute names if possible so we won't have to do two strcmps for every attribute.

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

16 years agofix broken assert.
Chris Lattner [Wed, 19 Dec 2007 05:38:06 +0000 (05:38 +0000)]
fix broken assert.

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

16 years agoImplement C99 6.7.5.3p1
Chris Lattner [Wed, 19 Dec 2007 05:31:29 +0000 (05:31 +0000)]
Implement C99 6.7.5.3p1

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

16 years agoRefactored inode and device number into FileEntry, and changed the
Ted Kremenek [Tue, 18 Dec 2007 22:29:39 +0000 (22:29 +0000)]
Refactored inode and device number into FileEntry, and changed the
ADT storing FileEntry's in FileManager from a map to a set.

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

16 years agoWhen serializing SourceManager, we now serialize out absolute paths
Ted Kremenek [Tue, 18 Dec 2007 22:12:19 +0000 (22:12 +0000)]
When serializing SourceManager, we now serialize out absolute paths
to serialized source files.

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

16 years agoMoved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
Ted Kremenek [Tue, 18 Dec 2007 21:44:50 +0000 (21:44 +0000)]
Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.

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

16 years agoFix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean...
Steve Naroff [Tue, 18 Dec 2007 21:41:31 +0000 (21:41 +0000)]
Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.

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

16 years agoFixed broken includes introduced by recent (incomplete) patch to
Ted Kremenek [Tue, 18 Dec 2007 21:36:21 +0000 (21:36 +0000)]
Fixed broken includes introduced by recent (incomplete) patch to
TranslationUnit.

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

16 years agoMoved TranslationUnit.h to include path.
Ted Kremenek [Tue, 18 Dec 2007 21:34:50 +0000 (21:34 +0000)]
Moved TranslationUnit.h to include path.

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

16 years agoMoved TranslationUnit from Driver to AST library.
Ted Kremenek [Tue, 18 Dec 2007 21:34:28 +0000 (21:34 +0000)]
Moved TranslationUnit from Driver to AST library.

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

16 years agoRefactoring work. ObjcQualifiedIdType is now derived from 'Type'.
Fariborz Jahanian [Tue, 18 Dec 2007 21:33:44 +0000 (21:33 +0000)]
Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.

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

16 years agoAdded to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
Ted Kremenek [Tue, 18 Dec 2007 20:45:25 +0000 (20:45 +0000)]
Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
accessors to FileEntry to query these values.

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

16 years agolocal static vars are globals also. This fixes a testcase
Chris Lattner [Tue, 18 Dec 2007 08:16:44 +0000 (08:16 +0000)]
local static vars are globals also.  This fixes a testcase
reported by Seo.

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

16 years agoremove the loc argument to Type::isConstantSizeType, which isn't useful.
Chris Lattner [Tue, 18 Dec 2007 07:18:16 +0000 (07:18 +0000)]
remove the loc argument to Type::isConstantSizeType, which isn't useful.

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

16 years agoFix the location we emit the "not a constant" error for this:
Chris Lattner [Tue, 18 Dec 2007 07:15:40 +0000 (07:15 +0000)]
Fix the location we emit the "not a constant" error for this:

int foo() {
  typedef int x[foo()];
  static int y = sizeof(x);
}

previously we'd emit it on the typedef, which made not sense at all.

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

16 years agoFix PR1863: an assertion due to not setting a location on return from
Chris Lattner [Tue, 18 Dec 2007 07:03:30 +0000 (07:03 +0000)]
Fix PR1863: an assertion due to not setting a location on return from
this method.

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

16 years agoFix const propagation bug.
Chris Lattner [Tue, 18 Dec 2007 07:02:56 +0000 (07:02 +0000)]
Fix const propagation bug.

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

16 years agoFix an nice and subtle parser bug reported by Nico Weber.
Chris Lattner [Tue, 18 Dec 2007 06:06:23 +0000 (06:06 +0000)]
Fix an nice and subtle parser bug reported by Nico Weber.

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

16 years agoAdd DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().
Steve Naroff [Tue, 18 Dec 2007 04:06:57 +0000 (04:06 +0000)]
Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().

This fixes a bug Chris forwarded from Oliver Hunt...

typedef struct { char name[100]; } entry;
char f1(entry *e) { return *e->name; }

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

16 years agoFixe bogus error for variable argument methods. Sema::ObjcGetTypeForMethodDefinition...
Steve Naroff [Tue, 18 Dec 2007 03:41:15 +0000 (03:41 +0000)]
Fixe bogus error for variable argument methods. Sema::ObjcGetTypeForMethodDefinition() wasn't preserving the isVariadic boolean. Another fix is to avoid synthsizing the function decl entirely, however this is a separate issue that I don't want to deal with now. Also added a FIXME to Sema::CheckFunctionCall(), which is currently emitting a bogus warning.

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

16 years agoTurns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we can get...
Anders Carlsson [Tue, 18 Dec 2007 02:45:33 +0000 (02:45 +0000)]
Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we can get rid of our special casing of constants when creating vectors.

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

16 years agoImprove how we find private method decls. This involved:
Steve Naroff [Tue, 18 Dec 2007 01:30:32 +0000 (01:30 +0000)]
Improve how we find private method decls. This involved:

- Changed Sema::ObjcActOnStartOfMethodDef() to register the methods with the global pools.
- Changed Sema::ActOnInstanceMessage() to look in global pools (should be much less error prone).
- Added a test case to message.m (for lookup that was broken).

Misc changes while I was investigating this...

- Changed Sema::ActOnAtEnd() to call AddFactoryMethodToGlobalPool (this looked like a cut/paste error).
- Added a comment and tweaked another where I was using the first person.

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

16 years agointroduce a new CodeGenModule::getIntrinsic method, which wraps
Chris Lattner [Tue, 18 Dec 2007 00:25:38 +0000 (00:25 +0000)]
introduce a new CodeGenModule::getIntrinsic method, which wraps
Intrinsic::getDeclaration, allowing much more terse code.

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

16 years agoAdd __private_extern__ keyword and recognize it. Added a FIXME to indicate there...
Steve Naroff [Tue, 18 Dec 2007 00:16:02 +0000 (00:16 +0000)]
Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there is still work to do.

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

16 years agoFixed a comment describing a function
Fariborz Jahanian [Mon, 17 Dec 2007 21:48:49 +0000 (21:48 +0000)]
Fixed a comment describing a function

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

16 years agoimplement HeaderMap::LookupFile. I think headermaps are done now. All that is
Chris Lattner [Mon, 17 Dec 2007 21:38:04 +0000 (21:38 +0000)]
implement HeaderMap::LookupFile.  I think headermaps are done now.  All that is
left is this crazy thing called "testing".

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

16 years agoimplement enough helper functions to successfully dump out the
Chris Lattner [Mon, 17 Dec 2007 21:06:11 +0000 (21:06 +0000)]
implement enough helper functions to successfully dump out the
contents of the header map.  Look ma, no assumptions about input data
here (aka, corrupt header maps can't crash the compiler - crazy thought).

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

16 years agoPatch to implemented objective-c's dynamic object pointer qualified with
Fariborz Jahanian [Mon, 17 Dec 2007 21:03:50 +0000 (21:03 +0000)]
Patch to implemented objective-c's dynamic object pointer qualified with
the protocol list (id<P,...> types).

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

16 years agoTargets.cpp is gone.
Chris Lattner [Mon, 17 Dec 2007 20:56:50 +0000 (20:56 +0000)]
Targets.cpp is gone.

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

16 years agoMake the insertion point with an explicit new instead of the builder.
Chris Lattner [Mon, 17 Dec 2007 20:50:59 +0000 (20:50 +0000)]
Make the insertion point with an explicit new instead of the builder.

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

16 years agoRemoved CFG.cpp's dependence on #including iostream.
Ted Kremenek [Mon, 17 Dec 2007 19:35:20 +0000 (19:35 +0000)]
Removed CFG.cpp's dependence on #including iostream.

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

16 years agoModified format-string checking to not emit a warning when all of the
Ted Kremenek [Mon, 17 Dec 2007 19:03:13 +0000 (19:03 +0000)]
Modified format-string checking to not emit a warning when all of the
following hold:

(1) A vprintf-like function is called that takes the argument list via a
    via_list argument.

(2) The format string is a non-literal that is the parameter value of
    the enclosing function, e.g:

    void logmessage(const char *fmt,...) {
      va_list ap;
      va_start(ap,fmt);
      fprintf(fmt,ap);  // Do not emit a warning.
    }

In the future this special case will be enhanced to consult the "format"
attribute attached to a function declaration instead of just allowing a blank
check for all function parameters to be used as format strings to vprintf-like
functions. This will happen when more support for attributes becomes
available.

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

16 years agosimplify some code, using new scoped_ptr support. Fix a bug in the
Chris Lattner [Mon, 17 Dec 2007 18:59:44 +0000 (18:59 +0000)]
simplify some code, using new scoped_ptr support.  Fix a bug in the
cross-endianness case, where we checked the version in the wrong endianness.
Amusingly, the GCC logic that detects mixed endianness hmaps and rejects
them is dead for this very reason.

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

16 years agoFinish hooking up the scaffolding for headermaps. They can now do everything
Chris Lattner [Mon, 17 Dec 2007 18:44:09 +0000 (18:44 +0000)]
Finish hooking up the scaffolding for headermaps.  They can now do everything
except resolve lookups.

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

16 years agoFormat string checker: asprintf does not pass argumnents via va_list.
Ted Kremenek [Mon, 17 Dec 2007 18:38:31 +0000 (18:38 +0000)]
Format string checker: asprintf does not pass argumnents via va_list.

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

16 years agoStart reading the headermap header, drop the 'errorstr' argument to
Chris Lattner [Mon, 17 Dec 2007 18:34:53 +0000 (18:34 +0000)]
Start reading the headermap header, drop the 'errorstr' argument to
the create method.

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

16 years agoAlso fixed similar regression for class methods, as well as more indentations.
Fariborz Jahanian [Mon, 17 Dec 2007 18:07:01 +0000 (18:07 +0000)]
Also fixed similar regression for class methods, as well as more indentations.

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

16 years agoSink getName into DirectoryLookup to simplify the client in clang.
Chris Lattner [Mon, 17 Dec 2007 17:57:27 +0000 (17:57 +0000)]
Sink getName into DirectoryLookup to simplify the client in clang.

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

16 years agoFixed a regression caused by refactoring of some meta-data generation routines using...
Fariborz Jahanian [Mon, 17 Dec 2007 17:56:10 +0000 (17:56 +0000)]
Fixed a regression caused by refactoring of some meta-data generation routines using iteratgors.
Also fixed indentation problems.

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

16 years agoFixed 80 col violation.
Ted Kremenek [Mon, 17 Dec 2007 17:50:39 +0000 (17:50 +0000)]
Fixed 80 col violation.

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