]> granicus.if.org Git - clang/log
clang
16 years agofix CheckForConstantInitializer() for Compound Literals
Nuno Lopes [Mon, 7 Jul 2008 16:46:50 +0000 (16:46 +0000)]
fix CheckForConstantInitializer() for Compound Literals
also fix the correspondent test (it was expecting more errors than it should. please confirm my fix is correct (at least gcc agrees with me)

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

16 years agoUpdated clients of ImmutableMap::SlimFind to use ImmutableMap::lookup instead.
Ted Kremenek [Mon, 7 Jul 2008 16:21:19 +0000 (16:21 +0000)]
Updated clients of ImmutableMap::SlimFind to use ImmutableMap::lookup instead.

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

16 years agoadd x86 EDI register alias
Nuno Lopes [Mon, 7 Jul 2008 12:18:07 +0000 (12:18 +0000)]
add x86 EDI register alias

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

16 years agoDo not emit a "missing -dealloc" warning if a class contains no ivars that are pointers.
Ted Kremenek [Mon, 7 Jul 2008 06:36:08 +0000 (06:36 +0000)]
Do not emit a "missing -dealloc" warning if a class contains no ivars that are pointers.
This patch aims to address some of the concerns of PR 2517: http://llvm.org/bugs/show_bug.cgi?id=2517

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

16 years agoAdd new file to VS projects.
Cedric Venet [Sun, 6 Jul 2008 14:45:13 +0000 (14:45 +0000)]
Add new file to VS projects.

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

16 years agomove the linux predefined macro definition to the TargetInfo, where it really belongs
Nuno Lopes [Sat, 5 Jul 2008 19:32:25 +0000 (19:32 +0000)]
move the linux predefined macro definition to the TargetInfo, where it really belongs

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

16 years agopredefine the macro linux when compiled on a linux system. this fixes the build of...
Nuno Lopes [Sat, 5 Jul 2008 17:58:44 +0000 (17:58 +0000)]
predefine the macro linux when compiled on a linux system. this fixes the build of libtidy

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

16 years agollvm-ld doesnt support -O1, -O2, etc options, so dont pass them
Nuno Lopes [Sat, 5 Jul 2008 17:31:10 +0000 (17:31 +0000)]
llvm-ld doesnt support -O1, -O2, etc  options, so dont pass them

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

16 years agoadd gentoo stable gcc headers path so that all tests pass here (CPATH isnt enough..)
Nuno Lopes [Sat, 5 Jul 2008 17:15:18 +0000 (17:15 +0000)]
add gentoo stable gcc headers path so that all tests pass here (CPATH isnt enough..)

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

16 years agoFix warnings
Seo Sanghyeon [Sat, 5 Jul 2008 02:01:25 +0000 (02:01 +0000)]
Fix warnings

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

16 years agoRemove unused diagnostic.
Argyrios Kyrtzidis [Fri, 4 Jul 2008 22:36:24 +0000 (22:36 +0000)]
Remove unused diagnostic.

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

16 years agoFixed bugzilla bug# 2489.
Sanjiv Gupta [Fri, 4 Jul 2008 11:04:26 +0000 (11:04 +0000)]
Fixed bugzilla bug# 2489.
This was broken when the GenerateCode function was splitted to use GenerateFunction.

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

16 years ago'&&' commands together so that the test status reflects the results of all the comman...
Argyrios Kyrtzidis [Fri, 4 Jul 2008 10:33:02 +0000 (10:33 +0000)]
'&&' commands together so that the test status reflects the results of all the commands, otherwise the test status will be the result of only the last command.

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

16 years agoFix warnings
Seo Sanghyeon [Fri, 4 Jul 2008 09:32:15 +0000 (09:32 +0000)]
Fix warnings

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

16 years ago'&&' clang commands together so that the test status reflects the results of all...
Ted Kremenek [Fri, 4 Jul 2008 04:38:48 +0000 (04:38 +0000)]
'&&' clang commands together so that the test status reflects the results of all three clang executions.

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

16 years agoUpdate latest checker build.
Ted Kremenek [Thu, 3 Jul 2008 23:40:44 +0000 (23:40 +0000)]
Update latest checker build.

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

16 years agoUse conjured symbols for variables whose values are invalidated when
Ted Kremenek [Thu, 3 Jul 2008 23:26:32 +0000 (23:26 +0000)]
Use conjured symbols for variables whose values are invalidated when
passed-by-reference to a function. This allows us to build up constraints for
their new values and restore some lost path-sensitivity. This addresses a few
false positives since in Adium.

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

16 years agoRemove removed header.
Bill Wendling [Thu, 3 Jul 2008 22:54:30 +0000 (22:54 +0000)]
Remove removed header.

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

16 years agoUpdated latest checker build.
Ted Kremenek [Thu, 3 Jul 2008 22:35:30 +0000 (22:35 +0000)]
Updated latest checker build.

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

16 years agoFix a bug in the dead stores checker reported in the following email:
Ted Kremenek [Thu, 3 Jul 2008 22:25:27 +0000 (22:25 +0000)]
Fix a bug in the dead stores checker reported in the following email:

  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002157.html

Essentially the observer mechanism in LiveVariables was observing block-level
expressions multiple times, leading to a case where the dead store checker could
see a value as dead when it was really live.

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

16 years agoHave ccc-analyzer skip any files with an unknown (or absent) extension.
Ted Kremenek [Thu, 3 Jul 2008 22:24:10 +0000 (22:24 +0000)]
Have ccc-analyzer skip any files with an unknown (or absent) extension.

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

16 years agoadd c++ status to sidebar
Chris Lattner [Thu, 3 Jul 2008 17:43:22 +0000 (17:43 +0000)]
add c++ status to sidebar

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

16 years agoUpdated latest checker build.
Ted Kremenek [Thu, 3 Jul 2008 16:26:26 +0000 (16:26 +0000)]
Updated latest checker build.

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

16 years agoSkip the "-dealloc" check if a ObjC class contains no ivars.
Ted Kremenek [Thu, 3 Jul 2008 15:37:02 +0000 (15:37 +0000)]
Skip the "-dealloc" check if a ObjC class contains no ivars.

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

16 years agoAdded an "ivar_empty" method to ObjCInterfaceDecl.
Ted Kremenek [Thu, 3 Jul 2008 15:30:49 +0000 (15:30 +0000)]
Added an "ivar_empty" method to ObjCInterfaceDecl.

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

16 years agoFor the -dealloc checker, check the LangOptions to determine whether or not the code...
Ted Kremenek [Thu, 3 Jul 2008 14:35:01 +0000 (14:35 +0000)]
For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC.

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

16 years ago-Added bool feature.
Argyrios Kyrtzidis [Thu, 3 Jul 2008 08:32:59 +0000 (08:32 +0000)]
-Added bool feature.
-Set "Named Casts" feature to partial parser/sema support because reinterpret_cast is not properly implemented.
-Removed "Virtual functions" feature because it is already covered by "Class definitions".
-Removed "Templates" because we should either list *all* missing/supported features or just list the features with some support. Mentioning just a few missing features without listing all of them makes little sense.

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

16 years ago-Change slightly the link to cxx_status.html of the home page.
Argyrios Kyrtzidis [Thu, 3 Jul 2008 08:21:51 +0000 (08:21 +0000)]
-Change slightly the link to cxx_status.html of the home page.
-Add a link to cxx_status.html from get_involved.html/"Open Projects".

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

16 years agoUpdated latest checker build.
Ted Kremenek [Thu, 3 Jul 2008 05:33:14 +0000 (05:33 +0000)]
Updated latest checker build.

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

16 years agoHave BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead...
Ted Kremenek [Thu, 3 Jul 2008 05:26:14 +0000 (05:26 +0000)]
Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
on functions we cannot construct full CFGs for yet.

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

16 years agoUpdated latest checker build.
Ted Kremenek [Thu, 3 Jul 2008 04:47:54 +0000 (04:47 +0000)]
Updated latest checker build.

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

16 years agoUpdate Xcode project.
Ted Kremenek [Thu, 3 Jul 2008 04:30:48 +0000 (04:30 +0000)]
Update Xcode project.

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

16 years agoAdded static analysis check to see if a subclass of NSObject implements -dealloc...
Ted Kremenek [Thu, 3 Jul 2008 04:29:21 +0000 (04:29 +0000)]
Added static analysis check to see if a subclass of NSObject implements -dealloc, and whether or not that implementation calls [super dealloc].

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

16 years agoShuffle things around in preparation for integrating Eli's constant evaluator.
Anders Carlsson [Thu, 3 Jul 2008 04:20:39 +0000 (04:20 +0000)]
Shuffle things around in preparation for integrating Eli's constant evaluator.

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

16 years agoMake APValue an APSInt.
Anders Carlsson [Thu, 3 Jul 2008 04:00:59 +0000 (04:00 +0000)]
Make APValue an APSInt.

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

16 years agonew testcase
Chris Lattner [Thu, 3 Jul 2008 03:53:40 +0000 (03:53 +0000)]
new testcase

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

16 years agoFix PR2252: don't warn on negating an unsigned value ever, and don't emit
Chris Lattner [Thu, 3 Jul 2008 03:47:30 +0000 (03:47 +0000)]
Fix PR2252: don't warn on negating an unsigned value ever, and don't emit
'integer constant is so large that it is unsigned' warning for hex literals.

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

16 years agoFix PR2020 by recovering by defining an anonymous enum, instead of recovering
Chris Lattner [Thu, 3 Jul 2008 03:30:58 +0000 (03:30 +0000)]
Fix PR2020 by recovering by defining an anonymous enum, instead of recovering
by filling in the body of a union with enum constants.

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

16 years agoUpdate test case with new clang arguments.
Ted Kremenek [Wed, 2 Jul 2008 23:18:57 +0000 (23:18 +0000)]
Update test case with new clang arguments.

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

16 years agoUpdate test case: simply running "clang -checker-simple" doesn't invoke the dead...
Ted Kremenek [Wed, 2 Jul 2008 23:18:22 +0000 (23:18 +0000)]
Update test case:  simply running "clang -checker-simple" doesn't invoke the dead store checker anymore.  We need "-warn-dead-stores" as well.

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

16 years agoUnify the code path for the Dead Stores checker to always use the BugReporter interface.
Ted Kremenek [Wed, 2 Jul 2008 23:16:33 +0000 (23:16 +0000)]
Unify the code path for the Dead Stores checker to always use the BugReporter interface.

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

16 years agoccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores"...
Ted Kremenek [Wed, 2 Jul 2008 23:16:10 +0000 (23:16 +0000)]
ccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores" to clang instead of just "-checker-cfref".

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

16 years agoRefactored some of the BugReporter interface so that data such as the ASTContext...
Ted Kremenek [Wed, 2 Jul 2008 21:24:01 +0000 (21:24 +0000)]
Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.

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

16 years agoGRExprEngine now expects the LiveVariables information to be provided by its creator.
Ted Kremenek [Wed, 2 Jul 2008 20:13:38 +0000 (20:13 +0000)]
GRExprEngine now expects the LiveVariables information to be provided by its creator.
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.

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

16 years agoAdded version of CheckDeadStores that accepts a client-provided LiveVariables object.
Ted Kremenek [Wed, 2 Jul 2008 18:39:20 +0000 (18:39 +0000)]
Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.

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

16 years agoAdded method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST...
Ted Kremenek [Wed, 2 Jul 2008 18:32:45 +0000 (18:32 +0000)]
Added method "HandleTranslationUnit" to ASTConsumer.  This is called by ParseAST when all of the ASTs in a translation unit have been built.

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

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