]> granicus.if.org Git - clang/log
clang
16 years agoMoved logic for -dump-cfg and -view-cfg into AnalysisConsumer.
Ted Kremenek [Wed, 2 Jul 2008 18:23:21 +0000 (18:23 +0000)]
Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.

Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view.  This naming better matches the same options for asts (e.g. -ast-dump).

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

16 years agoMove -dump-live-variables logic to AnalysisConsumer.
Ted Kremenek [Wed, 2 Jul 2008 18:11:29 +0000 (18:11 +0000)]
Move -dump-live-variables logic to AnalysisConsumer.

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

16 years agoMigrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.
Ted Kremenek [Wed, 2 Jul 2008 16:49:11 +0000 (16:49 +0000)]
Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.
Remove CheckerConsumer.

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

16 years agoMove logic for "-checker-simple" to the new AnalysisConsumer interface.
Ted Kremenek [Wed, 2 Jul 2008 16:35:50 +0000 (16:35 +0000)]
Move logic for "-checker-simple" to the new AnalysisConsumer interface.

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

16 years agoadd a description of what sema and parser mean, add C++ style casts.
Chris Lattner [Wed, 2 Jul 2008 16:28:43 +0000 (16:28 +0000)]
add a description of what sema and parser mean, add C++ style casts.

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

16 years agoFix typo in test case.
Ted Kremenek [Wed, 2 Jul 2008 15:28:06 +0000 (15:28 +0000)]
Fix typo in test case.

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

16 years agoAdd note that most of C++ is not supported.
Argyrios Kyrtzidis [Wed, 2 Jul 2008 15:10:46 +0000 (15:10 +0000)]
Add note that most of C++ is not supported.

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

16 years agoSet CSS defaults for tables.
Argyrios Kyrtzidis [Wed, 2 Jul 2008 14:42:28 +0000 (14:42 +0000)]
Set CSS defaults for tables.

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

16 years agoDrop 'C++' from the features; suggestion by Holger Schurig.
Argyrios Kyrtzidis [Wed, 2 Jul 2008 14:16:29 +0000 (14:16 +0000)]
Drop 'C++' from the features; suggestion by Holger Schurig.

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

16 years agoFix the page title.
Argyrios Kyrtzidis [Wed, 2 Jul 2008 13:44:11 +0000 (13:44 +0000)]
Fix the page title.

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

16 years agominor tweaks, escape < and >
Gabor Greif [Wed, 2 Jul 2008 12:34:47 +0000 (12:34 +0000)]
minor tweaks, escape < and >

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

16 years agoadd two popular c++ features
Gabor Greif [Wed, 2 Jul 2008 12:31:13 +0000 (12:31 +0000)]
add two popular c++ features

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

16 years agoadd c++ status link
Gabor Greif [Wed, 2 Jul 2008 12:18:17 +0000 (12:18 +0000)]
add c++ status link

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

16 years agoAdd a C++ status report page.
Argyrios Kyrtzidis [Wed, 2 Jul 2008 11:38:59 +0000 (11:38 +0000)]
Add a C++ status report page.

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

16 years agoAdd DeclCXX.[h.cpp] to clangAST.vcproj
Ted Kremenek [Wed, 2 Jul 2008 00:57:42 +0000 (00:57 +0000)]
Add DeclCXX.[h.cpp] to clangAST.vcproj

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

16 years agoMigrated driver logic for running the CF retain/release checker over to the new Analy...
Ted Kremenek [Wed, 2 Jul 2008 00:44:58 +0000 (00:44 +0000)]
Migrated driver logic for running the CF retain/release checker over to the new AnalysisConsumer interface.

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

16 years agoAdded AnalysisConsumer.[cpp,h] to clangDriver.vcproj.
Ted Kremenek [Wed, 2 Jul 2008 00:16:24 +0000 (00:16 +0000)]
Added AnalysisConsumer.[cpp,h] to clangDriver.vcproj.
Added CXXFieldCollector.h to clangSema.vcproj.

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

16 years agoUpdated Xcode project with new files in the Driver: AnalysisConsumer.[h,cpp]
Ted Kremenek [Wed, 2 Jul 2008 00:03:52 +0000 (00:03 +0000)]
Updated Xcode project with new files in the Driver: AnalysisConsumer.[h,cpp]

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

16 years agoAdded AnalysisConsumer, a meta-level ASTConsumer class to drive various
Ted Kremenek [Wed, 2 Jul 2008 00:03:09 +0000 (00:03 +0000)]
Added AnalysisConsumer, a meta-level ASTConsumer class to drive various
analyses. This potentially is the primordial origins of a Clang-equivalent
"PassManager".

The new AnalysisConsumer interface allows multiple analyses to be run from a
single invocation of Clang.

Migrated the logic of "-warn-dead-stores" and "-warn-uninit-values" to use the
new AnalysisConsumer interface. The new interface results in a significant code
reduction to incorporate an analysis into the Driver.

Updated a test case to (correctly) acknowledge that it contains a dead store
(this check wasn't being performed because it was previously masked by
-warn-uninit-values).

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

16 years agoAdded reference count checker test case.
Ted Kremenek [Tue, 1 Jul 2008 23:29:51 +0000 (23:29 +0000)]
Added reference count checker test case.

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

16 years agoUpdated latest checker build.
Ted Kremenek [Tue, 1 Jul 2008 23:15:51 +0000 (23:15 +0000)]
Updated latest checker build.

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

16 years agoUnlike NSWindow objects, NSPanel objects initially do not have self-ownership.
Ted Kremenek [Tue, 1 Jul 2008 17:21:27 +0000 (17:21 +0000)]
Unlike NSWindow objects, NSPanel objects initially do not have self-ownership.

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

16 years agoUpdate some comments.
Argyrios Kyrtzidis [Tue, 1 Jul 2008 11:22:40 +0000 (11:22 +0000)]
Update some comments.

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

16 years agoAdd Sema support for C++ classes.
Argyrios Kyrtzidis [Tue, 1 Jul 2008 10:37:29 +0000 (10:37 +0000)]
Add Sema support for C++ classes.

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

16 years agoUpdated checker build to checker-51
Ted Kremenek [Tue, 1 Jul 2008 01:56:05 +0000 (01:56 +0000)]
Updated checker build to checker-51

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

16 years agoTemporarily treat "Autorelease" as "StopTracking". This is the original behavior.
Ted Kremenek [Tue, 1 Jul 2008 00:01:02 +0000 (00:01 +0000)]
Temporarily treat "Autorelease" as "StopTracking".  This is the original behavior.

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

16 years agoMake a few related changes:
Chris Lattner [Mon, 30 Jun 2008 18:32:54 +0000 (18:32 +0000)]
Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
   fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
   sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
   in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.

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

16 years agoWhen inspecting the build command, strip off the preceding path to the build command.
Ted Kremenek [Mon, 30 Jun 2008 18:18:16 +0000 (18:18 +0000)]
When inspecting the build command, strip off the preceding path to the build command.

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

16 years agoAdded "Autorelease" ArgEffect to better simulate "autorelease" messages. Right
Ted Kremenek [Mon, 30 Jun 2008 16:57:41 +0000 (16:57 +0000)]
Added "Autorelease" ArgEffect to better simulate "autorelease" messages. Right
now this does the same thing as "MayEscape", but more functionality will go in
here shortly.

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

16 years agoUpdated checker build to checker-48
Ted Kremenek [Mon, 30 Jun 2008 16:30:52 +0000 (16:30 +0000)]
Updated checker build to checker-48

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

16 years agoBug fix: when copying prefix files using 'cp', don't split file names by spaces.
Ted Kremenek [Mon, 30 Jun 2008 16:12:30 +0000 (16:12 +0000)]
Bug fix: when copying prefix files using 'cp', don't split file names by spaces.

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

16 years agoFix a bug reported by Kelly Wilson, where we incorrectly
Chris Lattner [Mon, 30 Jun 2008 06:44:49 +0000 (06:44 +0000)]
Fix a bug reported by Kelly Wilson, where we incorrectly
rejected FP immediates like 08.123

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

16 years agorefactor some code out into a new method.
Chris Lattner [Mon, 30 Jun 2008 06:39:54 +0000 (06:39 +0000)]
refactor some code out into a new method.

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

16 years agomake type attribute processing static instead of methods on Sema.
Chris Lattner [Sun, 29 Jun 2008 00:50:08 +0000 (00:50 +0000)]
make type attribute processing static instead of methods on Sema.

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

16 years agomake the rest of the decl attribute processing methods be
Chris Lattner [Sun, 29 Jun 2008 00:43:07 +0000 (00:43 +0000)]
make the rest of the decl attribute processing methods be
static functions instead of methods on sema.

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

16 years agomake most of Sema public. Sema is a class private to the Sema library
Chris Lattner [Sun, 29 Jun 2008 00:28:59 +0000 (00:28 +0000)]
make most of Sema public.  Sema is a class private to the Sema library
anyway, so there is no real loss here.  Start making attribute processing
methods static functions instead of methods on Sema.

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

16 years agomove a few methods, no other change.
Chris Lattner [Sun, 29 Jun 2008 00:23:49 +0000 (00:23 +0000)]
move a few methods, no other change.

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

16 years agohandle type attributes when converting types, not when processing decls.
Chris Lattner [Sun, 29 Jun 2008 00:19:33 +0000 (00:19 +0000)]
handle type attributes when converting types, not when processing decls.

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

16 years agoMake ProcessDeclAttributes walk the declarator structure pulling
Chris Lattner [Sun, 29 Jun 2008 00:16:31 +0000 (00:16 +0000)]
Make ProcessDeclAttributes walk the declarator structure pulling
decl attributes out of the various places they can hide.  This makes
us correctly reject things like this:

t.c:2:22: error: mode attribute only supported for integer and floating-point types
  int **__attribute((mode(HI)))* i32;
                     ^

because you can't make a pointer be HImode.

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

16 years agomove some code from all callers of ProcessDeclAttributes into
Chris Lattner [Sun, 29 Jun 2008 00:02:00 +0000 (00:02 +0000)]
move some code from all callers of ProcessDeclAttributes into
the implementation of ProcessDeclAttributes.

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

16 years agomore attribute refactoring/renaming, no functionality change.
Chris Lattner [Sat, 28 Jun 2008 23:58:55 +0000 (23:58 +0000)]
more attribute refactoring/renaming, no functionality change.

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

16 years agomore minor tidiness.
Chris Lattner [Sat, 28 Jun 2008 23:50:44 +0000 (23:50 +0000)]
more minor tidiness.

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

16 years agomore cleanups, refactor HandleVectorTypeAttribute
Chris Lattner [Sat, 28 Jun 2008 23:48:25 +0000 (23:48 +0000)]
more cleanups, refactor HandleVectorTypeAttribute
to work list the rest of the attr handlers.  Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.

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

16 years agoadjust the prototypes of a bunch of decl processing methods to take
Chris Lattner [Sat, 28 Jun 2008 23:36:30 +0000 (23:36 +0000)]
adjust the prototypes of a bunch of decl processing methods to take
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.

This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.

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

16 years agoHandle unnamed bitfields when parsing C++ classes.
Argyrios Kyrtzidis [Sat, 28 Jun 2008 08:10:48 +0000 (08:10 +0000)]
Handle unnamed bitfields when parsing C++ classes.

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

16 years agoFix for PR2501; this patch makes usual arithmetic conversions for
Eli Friedman [Sat, 28 Jun 2008 06:23:08 +0000 (06:23 +0000)]
Fix for PR2501; this patch makes usual arithmetic conversions for
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).

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

16 years agoReplace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCu...
Argyrios Kyrtzidis [Sat, 28 Jun 2008 06:07:14 +0000 (06:07 +0000)]
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext.

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

16 years agoUpdated checker build to checker-47.
Ted Kremenek [Sat, 28 Jun 2008 00:13:07 +0000 (00:13 +0000)]
Updated checker build to checker-47.

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

16 years agoFix a bug where we didn't promote 'const float' (or typedefs) to
Chris Lattner [Fri, 27 Jun 2008 22:48:56 +0000 (22:48 +0000)]
Fix a bug where we didn't promote 'const float' (or typedefs) to
double in some places.

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

16 years agothe 'mode' attribute is a decl attribute, not a type attribute. Move it to
Chris Lattner [Fri, 27 Jun 2008 22:18:37 +0000 (22:18 +0000)]
the 'mode' attribute is a decl attribute, not a type attribute.  Move it to
SemaDeclAttr, and do some cleanups.

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

16 years agoNuno points out that my numbers were out of date
Chris Lattner [Fri, 27 Jun 2008 21:56:03 +0000 (21:56 +0000)]
Nuno points out that my numbers were out of date

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

16 years agomaking progress!
Chris Lattner [Fri, 27 Jun 2008 19:02:23 +0000 (19:02 +0000)]
making progress!

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

16 years agoAdd missing include file (due to a file splitting in llvm).
Cedric Venet [Fri, 27 Jun 2008 17:53:02 +0000 (17:53 +0000)]
Add missing include file (due to a file splitting in llvm).
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).

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

16 years agoAdded a simple static analysis check to look for improper uses of CFCreateNumber.
Ted Kremenek [Thu, 26 Jun 2008 23:59:48 +0000 (23:59 +0000)]
Added a simple static analysis check to look for improper uses of CFCreateNumber.

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

16 years agomove decl attribute processing to a new SemaDeclAttr.cpp.
Chris Lattner [Thu, 26 Jun 2008 18:38:35 +0000 (18:38 +0000)]
move decl attribute processing to a new SemaDeclAttr.cpp.

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

16 years agoUpdate Xcode project so that the clang target depends on LLVMAnalysis.a
Ted Kremenek [Thu, 26 Jun 2008 17:53:57 +0000 (17:53 +0000)]
Update Xcode project so that the clang target depends on LLVMAnalysis.a

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

16 years agoclang uses the llvm backend, so define __llvm__ like llvm-gcc.
Chris Lattner [Thu, 26 Jun 2008 17:26:01 +0000 (17:26 +0000)]
clang uses the llvm backend, so define __llvm__ like llvm-gcc.
Additionally, define __clang__ so clients can predicate based on
clang features.

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

16 years agoAnother class -> struct in declaration to match definition.
Cedric Venet [Thu, 26 Jun 2008 12:50:52 +0000 (12:50 +0000)]
Another class -> struct in declaration to match definition.

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

16 years agoMake clang work on 32 bit powerpc linux.
Matthijs Kooijman [Thu, 26 Jun 2008 08:39:30 +0000 (08:39 +0000)]
Make clang work on 32 bit powerpc linux.

Patch by Nick Lewycky!

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

16 years agoLink in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
Matthijs Kooijman [Thu, 26 Jun 2008 08:37:29 +0000 (08:37 +0000)]
Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
since LLVM r52748.

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

16 years agoMake Declarator::getDeclSpec() return a const reference to avoid
Chris Lattner [Thu, 26 Jun 2008 06:49:43 +0000 (06:49 +0000)]
Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs.  Propagate around 'const'.

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

16 years agoadd a comment about something that was surprising, at least to me.
Chris Lattner [Thu, 26 Jun 2008 06:39:41 +0000 (06:39 +0000)]
add a comment about something that was surprising, at least to me.

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

16 years agorename some attr tests for consistency.
Chris Lattner [Thu, 26 Jun 2008 06:32:02 +0000 (06:32 +0000)]
rename some attr tests for consistency.

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

16 years agofix a bug handling type attributes in the declspec. declspec processing
Chris Lattner [Thu, 26 Jun 2008 06:27:57 +0000 (06:27 +0000)]
fix a bug handling type attributes in the declspec.  declspec processing
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.

This fixes rdar://6032532.

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

16 years agoanother const correctness bug with declspec.
Chris Lattner [Thu, 26 Jun 2008 06:11:04 +0000 (06:11 +0000)]
another const correctness bug with declspec.

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

16 years agofix const correctness of accessor.
Chris Lattner [Thu, 26 Jun 2008 06:07:52 +0000 (06:07 +0000)]
fix const correctness of accessor.

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

16 years agorefactor more objc codegen interfaces to pass around selectors so
Chris Lattner [Thu, 26 Jun 2008 05:08:00 +0000 (05:08 +0000)]
refactor more objc codegen interfaces to pass around selectors so
we don't push strings into LLVM IR and then have to read them back out.

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

16 years agoindenting and other minor things.
Chris Lattner [Thu, 26 Jun 2008 04:52:29 +0000 (04:52 +0000)]
indenting and other minor things.

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

16 years agorefactor interface to GenerateClassStructure to avoid converting a
Chris Lattner [Thu, 26 Jun 2008 04:47:04 +0000 (04:47 +0000)]
refactor interface to GenerateClassStructure to avoid converting a
string to LLVM IR and then regenerating the string from IR.

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

16 years agoremove the old getSelector implementation, which removes some
Chris Lattner [Thu, 26 Jun 2008 04:44:19 +0000 (04:44 +0000)]
remove the old getSelector implementation, which removes some
calls to getStringValue

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

16 years agoavoid a lot of unneeded selector processing work by passing around
Chris Lattner [Thu, 26 Jun 2008 04:42:20 +0000 (04:42 +0000)]
avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.

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

16 years agouse cheaper/simpler getselector call for @selector exprs.
Chris Lattner [Thu, 26 Jun 2008 04:38:58 +0000 (04:38 +0000)]
use cheaper/simpler getselector call for @selector exprs.

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

16 years agostart avoid doing lots of unneeded work handling selectors
Chris Lattner [Thu, 26 Jun 2008 04:37:12 +0000 (04:37 +0000)]
start avoid doing lots of unneeded work handling selectors

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

16 years agoimprove indentation, avoid thrashing on maps and recalculating strings as much.
Chris Lattner [Thu, 26 Jun 2008 04:24:57 +0000 (04:24 +0000)]
improve indentation, avoid thrashing on maps and recalculating strings as much.

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

16 years agogive CreateObjCRuntime a full CGM so it can get whatever state it needs,
Chris Lattner [Thu, 26 Jun 2008 04:19:03 +0000 (04:19 +0000)]
give CreateObjCRuntime a full CGM so it can get whatever state it needs,
instead of passing in just a couple random things it currently
happens to use.

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

16 years agoFix 80 col violations, assert on assumptions.
Chris Lattner [Thu, 26 Jun 2008 04:10:42 +0000 (04:10 +0000)]
Fix 80 col violations, assert on assumptions.

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

16 years agofix this testcase after Mon Ping's intrinsic rename.
Chris Lattner [Thu, 26 Jun 2008 04:06:27 +0000 (04:06 +0000)]
fix this testcase after Mon Ping's intrinsic rename.

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

16 years agoa temporary minimal hack to get clang building after the getStringValue changes in...
Chris Lattner [Thu, 26 Jun 2008 04:05:20 +0000 (04:05 +0000)]
a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.

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

16 years agoUpdated latest checker build to checker-45.
Ted Kremenek [Thu, 26 Jun 2008 00:04:08 +0000 (00:04 +0000)]
Updated latest checker build to checker-45.

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

16 years agoCF ref checker:
Ted Kremenek [Wed, 25 Jun 2008 21:21:56 +0000 (21:21 +0000)]
CF ref checker:

Tracked objects now have their type information tracked with them.

Enhanced summaries for ObjC methods to include the type information of the receiver.

Used the enhanced summaries to support the idiom that NSWindow owns itself (it sends a release message to itself upon close).

Added some comments.

Did some cleanups with the checker logic using operator overloading (reduced redundant code which I was concerned about being the source of bugs).

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

16 years agoAdd Profile method to QualType.
Ted Kremenek [Wed, 25 Jun 2008 17:24:26 +0000 (17:24 +0000)]
Add Profile method to QualType.

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

16 years agoUpdate VS project files.
Ted Kremenek [Wed, 25 Jun 2008 17:14:52 +0000 (17:14 +0000)]
Update VS project files.

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

16 years agoUpdate Xcode project.
Ted Kremenek [Wed, 25 Jun 2008 15:15:35 +0000 (15:15 +0000)]
Update Xcode project.

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

16 years agoThe assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead...
Argyrios Kyrtzidis [Wed, 25 Jun 2008 14:24:09 +0000 (14:24 +0000)]
The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl.

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

16 years agoSet CXXClassVar to identifier namespace IDNS_Ordinary.
Argyrios Kyrtzidis [Wed, 25 Jun 2008 14:04:17 +0000 (14:04 +0000)]
Set CXXClassVar to identifier namespace IDNS_Ordinary.

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

16 years agoUpdated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.
Mon P Wang [Wed, 25 Jun 2008 08:21:36 +0000 (08:21 +0000)]
Updated atomic intrinsic name from llvm r52706.  Fixed dropped bit in shufps.

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

16 years ago'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 23:08:34 +0000 (23:08 +0000)]
'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.

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

16 years agoSet CXXMethod to identifier namespace IDNS_Ordinary.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:56:42 +0000 (22:56 +0000)]
Set CXXMethod to identifier namespace IDNS_Ordinary.

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

16 years agoThe only caller of this knows that the current token is l_brace, so this can be an...
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:31:41 +0000 (22:31 +0000)]
The only caller of this knows that the current token is l_brace, so this can be an assert; suggestion by Chris.

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

16 years agoAdd parsing support for C++ classes.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:12:16 +0000 (22:12 +0000)]
Add parsing support for C++ classes.

Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

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

16 years ago"Support for Objective-C message sends which return structures. Also includes a...
Chris Lattner [Tue, 24 Jun 2008 17:04:18 +0000 (17:04 +0000)]
"Support for Objective-C message sends which return structures.  Also includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)."

Patch by David Chisnall!

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

16 years ago"This is a small fix for a bug where static object instances were being incorrectly...
Chris Lattner [Tue, 24 Jun 2008 17:01:28 +0000 (17:01 +0000)]
"This is a small fix for a bug where static object instances were being incorrectly generated.  The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)."

Patch by David Chisnall!

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

16 years agoUpdate serialization for ObjCMessageExpr to handle additional bit-swizziling of recei...
Ted Kremenek [Tue, 24 Jun 2008 17:00:08 +0000 (17:00 +0000)]
Update serialization for ObjCMessageExpr to handle additional bit-swizziling of receiver information.

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

16 years agoObjCMessageExpr objects that represent messages to class methods now can contain...
Ted Kremenek [Tue, 24 Jun 2008 15:50:53 +0000 (15:50 +0000)]
ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed.  The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class.

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

16 years agoMove the namespace action declarations at the "C++ declarations" section.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 11:23:36 +0000 (11:23 +0000)]
Move the namespace action declarations at the "C++ declarations" section.

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

16 years agoTest commit: changed the forward declaration of FieldDeclarator from class to struct...
Cedric Venet [Tue, 24 Jun 2008 09:09:38 +0000 (09:09 +0000)]
Test commit: changed the forward declaration of FieldDeclarator from class to struct to be coherent with its definition (DeclSpec.h)

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

16 years agoFix comments: "class method" should be "instance method" and vis versa
Ted Kremenek [Tue, 24 Jun 2008 04:44:10 +0000 (04:44 +0000)]
Fix comments: "class method" should be "instance method" and vis versa

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

16 years agoRemove unneeded method arguments.
Ted Kremenek [Tue, 24 Jun 2008 03:56:45 +0000 (03:56 +0000)]
Remove unneeded method arguments.

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

16 years agoCache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.
Ted Kremenek [Tue, 24 Jun 2008 03:49:48 +0000 (03:49 +0000)]
Cache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.

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

16 years agoPatch by Anders Bergh:
Ted Kremenek [Tue, 24 Jun 2008 03:33:47 +0000 (03:33 +0000)]
Patch by Anders Bergh:

'There's not much to say about this patch, it just adds the Arch Linux
gcc 4.3.1 header paths for i686 and amd64. The patch was generated
using "svn diff" with clang at revision 52660. The paths aren't
distribution-specific, so they should work for all Linux distributions
using the default(?) names like "i686-pc-linux-gnu".'

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