]> granicus.if.org Git - clang/log
clang
15 years agoIntroduce the canonical type smart pointers, and use them in a few places to
Douglas Gregor [Wed, 5 Aug 2009 05:36:45 +0000 (05:36 +0000)]
Introduce the canonical type smart pointers, and use them in a few places to
tighten up the static type system.

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

15 years agoFix a bug in RegionStoreSubRegionManager::add() where multiple subregions wouldn...
Ted Kremenek [Wed, 5 Aug 2009 05:31:02 +0000 (05:31 +0000)]
Fix a bug in RegionStoreSubRegionManager::add() where multiple subregions wouldn't correctly get registered in the SubRegion map.

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

15 years agocgobjcgnu was making invalid common globals.
Chris Lattner [Wed, 5 Aug 2009 05:25:18 +0000 (05:25 +0000)]
cgobjcgnu was making invalid common globals.

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

15 years agoweak globals that are const should get weak_odr linkage.
Chris Lattner [Wed, 5 Aug 2009 05:20:29 +0000 (05:20 +0000)]
weak globals that are const should get weak_odr linkage.

add a fixme about C++ const.

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

15 years agordar://7119244 - globals with an explicit section specified don't get
Chris Lattner [Wed, 5 Aug 2009 04:56:58 +0000 (04:56 +0000)]
rdar://7119244 - globals with an explicit section specified don't get
common linkage.

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

15 years agoAdd test case.
Zhongxing Xu [Wed, 5 Aug 2009 03:45:09 +0000 (03:45 +0000)]
Add test case.

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

15 years agoIf the UnaryOperator has non-location type, use its type to create the
Zhongxing Xu [Wed, 5 Aug 2009 02:51:59 +0000 (02:51 +0000)]
If the UnaryOperator has non-location type, use its type to create the
constant value. If the UnaryOperator has location type, create the
constant with int type and pointer width.

This fixes the bug that all pointer increments 'p++' evaluated to Unknown.

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

15 years agoRemove an unused header.
Mike Stump [Wed, 5 Aug 2009 01:22:47 +0000 (01:22 +0000)]
Remove an unused header.

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

15 years agoSupport for use of default argument in constructors.
Fariborz Jahanian [Wed, 5 Aug 2009 00:26:10 +0000 (00:26 +0000)]
Support for use of default argument in constructors.
work in progress.

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

15 years agoMove the template instantiation logic for template arguments into the
Douglas Gregor [Tue, 4 Aug 2009 22:27:00 +0000 (22:27 +0000)]
Move the template instantiation logic for template arguments into the
general tree transformation. Also, implement template instantiation
for parameter packs.

In addition, introduce logic to enter the appropriate context for
subexpressions that are not potentially evaluated.

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

15 years agovtable building for simple inheritance. Still in progress.
Mike Stump [Tue, 4 Aug 2009 21:58:42 +0000 (21:58 +0000)]
vtable building for simple inheritance.  Still in progress.

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

15 years agoCanonicalize else.
Mike Stump [Tue, 4 Aug 2009 21:02:39 +0000 (21:02 +0000)]
Canonicalize else.

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

15 years agoTest cases for some recent work.
Mike Stump [Tue, 4 Aug 2009 20:37:29 +0000 (20:37 +0000)]
Test cases for some recent work.

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

15 years agoWill I ever get used to CamelCase? Will I ever like capitols for
Mike Stump [Tue, 4 Aug 2009 20:06:48 +0000 (20:06 +0000)]
Will I ever get used to CamelCase?  Will I ever like capitols for
random variables?
  --This line, and those below, will be ignored--

M    lib/CodeGen/CGCXX.cpp

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

15 years agoAdd armv7 support.
Mike Stump [Tue, 4 Aug 2009 19:48:52 +0000 (19:48 +0000)]
Add armv7 support.

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

15 years agoRevert the fix for PR3800, it broke things.
Anders Carlsson [Tue, 4 Aug 2009 18:18:36 +0000 (18:18 +0000)]
Revert the fix for PR3800, it broke things.

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

15 years agoRenable "html" indexing by default.
Ted Kremenek [Tue, 4 Aug 2009 17:05:18 +0000 (17:05 +0000)]
Renable "html" indexing by default.

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

15 years agoSome code refactoring. Be more generous in issuance of warning
Fariborz Jahanian [Tue, 4 Aug 2009 17:01:09 +0000 (17:01 +0000)]
Some code refactoring. Be more generous in issuance of warning
on method type mismatches per Chris's comment.

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

15 years agoRefactor template instantiation for types into a generic tree
Douglas Gregor [Tue, 4 Aug 2009 16:50:30 +0000 (16:50 +0000)]
Refactor template instantiation for types into a generic tree
transformation template (TreeTransform) that handles the
transformation and reconstruction of AST nodes. Template instantiation
for types is a (relatively small) customization of the generic tree
transformation.

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

15 years agoSimplify alignment handling in the record builder.
Anders Carlsson [Tue, 4 Aug 2009 16:29:15 +0000 (16:29 +0000)]
Simplify alignment handling in the record builder.

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

15 years agolit: Some sample tests, for testing the tester
Daniel Dunbar [Tue, 4 Aug 2009 04:40:15 +0000 (04:40 +0000)]
lit: Some sample tests, for testing the tester

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

15 years agoFix test case for Darwin10 (which sets ssp), and move to CodeGen/
Daniel Dunbar [Tue, 4 Aug 2009 04:38:31 +0000 (04:38 +0000)]
Fix test case for Darwin10 (which sets ssp), and move to CodeGen/

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

15 years agoUpdate for LLVM API change
Daniel Dunbar [Tue, 4 Aug 2009 04:02:57 +0000 (04:02 +0000)]
Update for LLVM API change

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

15 years agoCompare matching selectors in current and
Fariborz Jahanian [Tue, 4 Aug 2009 01:07:16 +0000 (01:07 +0000)]
Compare matching selectors in current and
super class(s) and warn on any parameter
type mismatch if potentially unsafe.

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

15 years agoAdjust test case.
Ted Kremenek [Tue, 4 Aug 2009 00:58:45 +0000 (00:58 +0000)]
Adjust test case.

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

15 years agoRecognize '-M' and '-MM' options.
Ted Kremenek [Tue, 4 Aug 2009 00:57:12 +0000 (00:57 +0000)]
Recognize '-M' and '-MM' options.

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

15 years ago'unlink' file directly instead of invoking system shell.
Ted Kremenek [Tue, 4 Aug 2009 00:55:59 +0000 (00:55 +0000)]
'unlink' file directly instead of invoking system shell.

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

15 years agoHave scan-build clue off of 'BUGMETAEND' to know when to stop processing an HTML...
Ted Kremenek [Mon, 3 Aug 2009 23:45:27 +0000 (23:45 +0000)]
Have scan-build clue off of 'BUGMETAEND' to know when to stop processing an HTML file.

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

15 years agoEmit a special 'BUGMETAEND' comment to aid in the postprocessing of HTML bug reports.
Ted Kremenek [Mon, 3 Aug 2009 23:44:55 +0000 (23:44 +0000)]
Emit a special 'BUGMETAEND' comment to aid in the postprocessing of HTML bug reports.

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

15 years agoPer advice that Doug Gregor gave me several months ago, clean up the
Ted Kremenek [Mon, 3 Aug 2009 23:24:57 +0000 (23:24 +0000)]
Per advice that Doug Gregor gave me several months ago, clean up the
implementation of '#pragma unused' by not constructing intermediate
DeclRefExprs, but instead do the name lookup directly.  The
implementation is greatly simplified.

Along the way, degrade '#pragma unused(undeclaredvariable)' to a
warning instead of being a hard error.  This implements:

<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)

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

15 years agoAdd a pass-by-value test for the analyzer.
Ted Kremenek [Mon, 3 Aug 2009 23:22:53 +0000 (23:22 +0000)]
Add a pass-by-value test for the analyzer.

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

15 years agoPR3679: add #pragma weak test file
Ryan Flynn [Mon, 3 Aug 2009 23:16:15 +0000 (23:16 +0000)]
PR3679: add #pragma weak test file

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

15 years agoAdd test case testing field sensitivity. Reduced from <rdar://problem/7114618>.
Ted Kremenek [Mon, 3 Aug 2009 22:23:24 +0000 (22:23 +0000)]
Add test case testing field sensitivity.  Reduced from <rdar://problem/7114618>.

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

15 years agoMake sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).
Daniel Dunbar [Mon, 3 Aug 2009 21:47:08 +0000 (21:47 +0000)]
Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).

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

15 years agoHandle disgusting corner case where a byte is loaded from the address of a function.
Ted Kremenek [Mon, 3 Aug 2009 21:41:46 +0000 (21:41 +0000)]
Handle disgusting corner case where a byte is loaded from the address of a function.

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

15 years agoWhen generating cleanup blocks for Obj-C @finally, mark them as catch all blocks
Daniel Dunbar [Mon, 3 Aug 2009 21:20:07 +0000 (21:20 +0000)]
When generating cleanup blocks for Obj-C @finally, mark them as catch all blocks
from the perspective of LLVM exception handling. Otherwise the C++ personality
function may decide not to run them, if it only detects cleanup handlers.
 - Test case for this is exceptions.m in llvm-test.

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

15 years agoRegression fix: reset 'DisplayedFunction' when a new function/method decl gets analyzed.
Ted Kremenek [Mon, 3 Aug 2009 21:01:21 +0000 (21:01 +0000)]
Regression fix: reset 'DisplayedFunction' when a new function/method decl gets analyzed.

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

15 years agoassert(nyi) on attempt to destruct an array of objects.
Fariborz Jahanian [Mon, 3 Aug 2009 20:51:29 +0000 (20:51 +0000)]
assert(nyi) on attempt to destruct an array of objects.

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

15 years agoir-gen for destructor calls.
Fariborz Jahanian [Mon, 3 Aug 2009 20:20:07 +0000 (20:20 +0000)]
ir-gen for destructor calls.

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

15 years agoRefactor methods on DeclSpec to take a diagnostic& parameter, and reflect this
John McCall [Mon, 3 Aug 2009 20:12:06 +0000 (20:12 +0000)]
Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this
elsewhere.  Very slightly decouples DeclSpec users from knowing the exact
diagnostics to report, and makes it easier to provide different diagnostics in
some places.

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

15 years agoWebsite updates for working with Visual Studio and making patches.
Eli Friedman [Mon, 3 Aug 2009 19:42:28 +0000 (19:42 +0000)]
Website updates for working with Visual Studio and making patches.
Patch by John Thompson!

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

15 years agoMinor renaming/refactoring. No change in functionality.
Fariborz Jahanian [Mon, 3 Aug 2009 19:13:25 +0000 (19:13 +0000)]
Minor renaming/refactoring. No change in functionality.

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

15 years agoTemplatize BadSpecifier and introduce DeclSpec::getSpecifier(T) for the
John McCall [Mon, 3 Aug 2009 18:47:27 +0000 (18:47 +0000)]
Templatize BadSpecifier and introduce DeclSpec::getSpecifier(T) for the
remaining specifier enums T.

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

15 years agoFormatting fixes (trailing whitespace, 80-cols, indentation).
Daniel Dunbar [Mon, 3 Aug 2009 17:06:42 +0000 (17:06 +0000)]
Formatting fixes (trailing whitespace, 80-cols, indentation).

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

15 years agoFix assertion crash. I don't have a testcase, but the fix is pretty
Eli Friedman [Mon, 3 Aug 2009 09:07:06 +0000 (09:07 +0000)]
Fix assertion crash.  I don't have a testcase, but the fix is pretty
obviously correct.

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

15 years agoadd a bunch of routine methods to AnalysisContext.
Zhongxing Xu [Mon, 3 Aug 2009 07:23:22 +0000 (07:23 +0000)]
add a bunch of routine methods to AnalysisContext.

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

15 years agolit: Don't treat '\' as an escape in unquoted strings, on Win32. This turns out
Daniel Dunbar [Mon, 3 Aug 2009 05:29:22 +0000 (05:29 +0000)]
lit: Don't treat '\' as an escape in unquoted strings, on Win32. This turns out
to not be a very good idea.

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

15 years agoTweak diagnostic wording; patch by Sean Hunt.
Eli Friedman [Mon, 3 Aug 2009 05:14:16 +0000 (05:14 +0000)]
Tweak diagnostic wording; patch by Sean Hunt.

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

15 years agoUpdate for LLVM API change.
Daniel Dunbar [Mon, 3 Aug 2009 04:21:41 +0000 (04:21 +0000)]
Update for LLVM API change.

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

15 years agoUpdate for LLVM API change.
Daniel Dunbar [Mon, 3 Aug 2009 04:04:27 +0000 (04:04 +0000)]
Update for LLVM API change.

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

15 years agonow we can let AnalysisManager to own the PathDiagnosticClient.
Zhongxing Xu [Mon, 3 Aug 2009 03:27:37 +0000 (03:27 +0000)]
now we can let AnalysisManager to own the PathDiagnosticClient.

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

15 years agoCreate only one AnalysisManager for each translation unit. In HandleCode(),
Zhongxing Xu [Mon, 3 Aug 2009 03:13:46 +0000 (03:13 +0000)]
Create only one AnalysisManager for each translation unit. In HandleCode(),
reset the current analysis context of the AnalysisManager.

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

15 years agoAdd LocationContext classes to enable creation of cross function
Zhongxing Xu [Mon, 3 Aug 2009 02:52:14 +0000 (02:52 +0000)]
Add LocationContext classes to enable creation of cross function
ProgramPoints. ProgramPoints will refer to them in the furture.

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

15 years agoDriver/OpenBSD: Improve ld options.
Daniel Dunbar [Mon, 3 Aug 2009 01:28:59 +0000 (01:28 +0000)]
Driver/OpenBSD: Improve ld options.
 - Patch by Jonathan Gray!

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

15 years agoProduce a warning that partial ordering of function templates is not yet supported
Douglas Gregor [Sun, 2 Aug 2009 23:46:29 +0000 (23:46 +0000)]
Produce a warning that partial ordering of function templates is not yet supported

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

15 years agoKeep track of the template arguments deduced when matching a class
Douglas Gregor [Sun, 2 Aug 2009 23:24:31 +0000 (23:24 +0000)]
Keep track of the template arguments deduced when matching a class
template partial specialization. Then, use those template arguments
when instantiating members of that class template partial
specialization. Fixes PR4607.

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

15 years agoWhoops, meant to delete this.
Anders Carlsson [Sun, 2 Aug 2009 21:34:52 +0000 (21:34 +0000)]
Whoops, meant to delete this.

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

15 years agouse CodeGenModule::EmitNullConstant in a couple of places.
Anders Carlsson [Sun, 2 Aug 2009 21:18:22 +0000 (21:18 +0000)]
use CodeGenModule::EmitNullConstant in a couple of places.

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

15 years agoUse the correct cast kind for dynamic_cast.
Anders Carlsson [Sun, 2 Aug 2009 19:07:59 +0000 (19:07 +0000)]
Use the correct cast kind for dynamic_cast.

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

15 years agoUpdate C++ open projects list
Douglas Gregor [Sun, 2 Aug 2009 18:26:21 +0000 (18:26 +0000)]
Update C++ open projects list

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

15 years agoWe have fairly good support for namespaces, now. Namespace aliases are parsed correctly
Douglas Gregor [Sun, 2 Aug 2009 18:22:38 +0000 (18:22 +0000)]
We have fairly good support for namespaces, now. Namespace aliases are parsed correctly

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

15 years agoRemove duplicated colon.
Benjamin Kramer [Sun, 2 Aug 2009 12:12:11 +0000 (12:12 +0000)]
Remove duplicated colon.

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

15 years agoFix regression caused by recent refactoring where HTML and plist files would not...
Ted Kremenek [Sun, 2 Aug 2009 05:43:14 +0000 (05:43 +0000)]
Fix regression caused by recent refactoring where HTML and plist files would not get flushed out when using '-disable-free'.

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

15 years agoInclude '-o' arguments in verbose output.
Ted Kremenek [Sun, 2 Aug 2009 05:42:46 +0000 (05:42 +0000)]
Include '-o' arguments in verbose output.

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

15 years agolinkify IRC
Chris Lattner [Sun, 2 Aug 2009 05:38:25 +0000 (05:38 +0000)]
linkify IRC

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

15 years agorearrange side bar, add link to IRC info.
Chris Lattner [Sun, 2 Aug 2009 05:36:37 +0000 (05:36 +0000)]
rearrange side bar, add link to IRC info.

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

15 years agoRemove RegionViews and RegionCasts. These are no longer used.
Ted Kremenek [Sun, 2 Aug 2009 05:15:23 +0000 (05:15 +0000)]
Remove RegionViews and RegionCasts.  These are no longer used.

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

15 years agoRegionStoreManager::RemoveDeadBindings() now removes dead 'default' bindings as well.
Ted Kremenek [Sun, 2 Aug 2009 05:00:15 +0000 (05:00 +0000)]
RegionStoreManager::RemoveDeadBindings() now removes dead 'default' bindings as well.

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

15 years agoGeneralize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the...
Ted Kremenek [Sun, 2 Aug 2009 04:45:08 +0000 (04:45 +0000)]
Generalize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the entire GRState, not just the Store.

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

15 years agoRemove old code that was causing the new test to fail.
Anders Carlsson [Sun, 2 Aug 2009 04:17:43 +0000 (04:17 +0000)]
Remove old code that was causing the new test to fail.

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

15 years agoFix regression in StoreManager::CastRegion() to always treat casts to
Ted Kremenek [Sun, 2 Aug 2009 04:12:53 +0000 (04:12 +0000)]
Fix regression in StoreManager::CastRegion() to always treat casts to
'void*' (or 'const void*') as an identity transformation.

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

15 years agoDon't evaluate inout constraints twice. Fixes PR3800.
Anders Carlsson [Sun, 2 Aug 2009 03:40:19 +0000 (03:40 +0000)]
Don't evaluate inout constraints twice. Fixes PR3800.

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

15 years agoCompute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKS
Daniel Dunbar [Sun, 2 Aug 2009 01:48:29 +0000 (01:48 +0000)]
Compute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKS
happy.

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

15 years agoTweak svn:ignore
Daniel Dunbar [Sun, 2 Aug 2009 01:47:54 +0000 (01:47 +0000)]
Tweak svn:ignore

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

15 years agoUse Twine instead of utostr
Daniel Dunbar [Sun, 2 Aug 2009 01:43:57 +0000 (01:43 +0000)]
Use Twine instead of utostr

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

15 years agoAvoid accessing invalid std::vector element; this makes clang
Daniel Dunbar [Sat, 1 Aug 2009 23:40:20 +0000 (23:40 +0000)]
Avoid accessing invalid std::vector element; this makes clang
ENABLE_EXPENSIVE_CHECKS clean on x86_64-.*-darwin10.

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

15 years agolit: Catch (internal) exceptions when using --no-sh.
Daniel Dunbar [Sat, 1 Aug 2009 23:18:27 +0000 (23:18 +0000)]
lit: Catch (internal) exceptions when using --no-sh.

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

15 years agoFix a minor issue with unions in the new struct building code.
Eli Friedman [Sat, 1 Aug 2009 23:11:24 +0000 (23:11 +0000)]
Fix a minor issue with unions in the new struct building code.

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

15 years agolit: Fix thinko in finding config file.
Daniel Dunbar [Sat, 1 Aug 2009 23:09:12 +0000 (23:09 +0000)]
lit: Fix thinko in finding config file.

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

15 years agoAdditional AuroraUX header path.
Eli Friedman [Sat, 1 Aug 2009 21:46:03 +0000 (21:46 +0000)]
Additional AuroraUX header path.

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

15 years agoDon't error on C++ linkage; if we don't support that, there are
Eli Friedman [Sat, 1 Aug 2009 20:48:04 +0000 (20:48 +0000)]
Don't error on C++ linkage; if we don't support that, there are
serious issues :)

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

15 years agoAdd temp C++ include path for AuroraUX; patch by Edward O'Callaghan.
Eli Friedman [Sat, 1 Aug 2009 17:10:21 +0000 (17:10 +0000)]
Add temp C++ include path for AuroraUX; patch by Edward O'Callaghan.

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

15 years agolit: Add internal script execution.
Daniel Dunbar [Sat, 1 Aug 2009 10:18:01 +0000 (10:18 +0000)]
lit: Add internal script execution.
 - Off by default, you can test it with the --no-sh argument.

 - For me it works for all but 3 tests, but there a number of FIXMEs and QOI
   issues:
     o Redirection isn't completely accurate -- in practice it can't portably
       be, but I would like to error out if someone writes something which isn't
       going to work. This is the source of the 3 test failures.

     o Some pipe configurations have the potential to deadlock.

     o It is significantly slower when multithreaded. I believe this is due to
       locking happening under the hood, there is probably some kind of solution
       but I haven't investigated yet.

     o Log output is ugly.

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

15 years agolit: Two more sh lex/parse bugs (but its so simple!)
Daniel Dunbar [Sat, 1 Aug 2009 09:41:09 +0000 (09:41 +0000)]
lit: Two more sh lex/parse bugs (but its so simple!)
 - Empty arguments weren't handled correctly.
 - Escapes outside quoted strings weren't handled.

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

15 years agoThis is a fairly large patch, which resulted from a cascade of changes
Ted Kremenek [Sat, 1 Aug 2009 06:17:29 +0000 (06:17 +0000)]
This is a fairly large patch, which resulted from a cascade of changes
made to RegionStore (and related classes) in order to handle some
analyzer failures involving casts and manipulation of symbolic memory.

The root of the change is in StoreManager::CastRegion().  Instead of
using ad hoc heuristics to decide when to layer an ElementRegion on a
casted MemRegion, we now always layer an ElementRegion when the cast
type is different than the original type of the region.  This carries
the current cast information associated with a region around without
resorting to the error prone recording of "casted types" in GRState.

Along with this new policy of layering ElementRegions, I added a new
algorithm to strip away existing ElementRegions when they simply
represented casts of a base memory object.  This algorithm computes
the raw "byte offset" that an ElementRegion represents from the base
region, and allows the new ElementRegion to be based off that offset.
The added benefit is that this naturally handles a series of casts of
a MemRegion without building up a set of redundant ElementRegions
(thus canonicalizing the region view).

Other related changes that cascaded from this one (as tests were
failing in RegionStore):

- Revamped RegionStoreManager::InvalidateRegion() to completely remove
  all bindings and default values from a region and all subregions.
  Now invalidated fields are not bound directly to new symbolic
  values; instead the base region has a "default" symbol value from
  which "derived symbols" can be created.  The main advantage of this
  approach is that it allows us to invalidate a region hierarchy and
  then lazily instantiate new values no matter how deep the hierarchy
  went (i.e., regardless of the number of field accesses,
  e.g. x->f->y->z->...).  The previous approach did not do this.

- Slightly reworked RegionStoreManager::RemoveDeadBindings() to also
  incorporate live symbols and live regions that do not have direct
  bindings but also have "default values" used for lazy instantiation.
  The changes to 'InvalidateRegion' revealed that these were necessary
  in order to achieve lazy instantiation of values in the region store
  with those bindings being removed too early.

- The changes to InvalidateRegion() and RemoveDeadBindings() revealed
  a serious bug in 'getSubRegionMap()' where not all region -> subregion
  relationships involved in actually bindings (explicit and implicit)
  were being recorded.  This has been fixed by using a worklist algorithm
  to iteratively fill in the region map.

- Added special support to RegionStoreManager::Bind()/Retrieve() to handle
  OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the
  layering of ElementRegions.

- Fixed a bug in SymbolReaper::isLive() where derived symbols were not
  being marked live if the symbol they were derived from was also live.
  This fix was critical for getting lazy instantiation in RegionStore
  to work.

- Tidied up the implementation of ValueManager::getXXXSymbolVal() methods
  to use SymbolManager::canSymbolicate() to decide whether or not a
  symbol should be symbolicated.

- 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been
  moved to 'test/Analysis/misc-ps.m'.

- Tweaked some pretty-printing of MemRegions, and implemented
  'ElementRegion::getRawOffset()' for use with the CastRegion changes.

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

15 years agoOk, ok, I give in. Fix tests for unused result warning.
Daniel Dunbar [Sat, 1 Aug 2009 06:07:15 +0000 (06:07 +0000)]
Ok, ok, I give in. Fix tests for unused result warning.

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

15 years agoTemporarily disable out-of-bounds checking. The current checking logic will not...
Ted Kremenek [Sat, 1 Aug 2009 05:59:39 +0000 (05:59 +0000)]
Temporarily disable out-of-bounds checking.  The current checking logic will not work quite right with the changes I'm about to commit.

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

15 years agoUse %S, not `pwd`, and enable a line that *does* work.
Daniel Dunbar [Sat, 1 Aug 2009 05:57:38 +0000 (05:57 +0000)]
Use %S, not `pwd`, and enable a line that *does* work.
 - Doug, please check.

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

15 years agolit: Fix two sh lexing bugs.
Daniel Dunbar [Sat, 1 Aug 2009 05:52:04 +0000 (05:52 +0000)]
lit: Fix two sh lexing bugs.
 - '\\\\' inside a "..." string becomes '\\'.
 - The '<' token wasn't being recognized.

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

15 years ago'unset' isn't needed in these tests anymore, we always run with a controlled
Daniel Dunbar [Sat, 1 Aug 2009 04:51:30 +0000 (04:51 +0000)]
'unset' isn't needed in these tests anymore, we always run with a controlled
environment.

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

15 years agolit: Fix a name lookup problem, which only occurred on a race condition. This is
Daniel Dunbar [Sat, 1 Aug 2009 04:11:36 +0000 (04:11 +0000)]
lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.

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

15 years agolit: Pull a few more variables into the TestingConfig object.
Daniel Dunbar [Sat, 1 Aug 2009 04:06:02 +0000 (04:06 +0000)]
lit: Pull a few more variables into the TestingConfig object.

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

15 years agolit: Don't use threads when only running one test, or with -j 1.
Daniel Dunbar [Sat, 1 Aug 2009 03:35:40 +0000 (03:35 +0000)]
lit: Don't use threads when only running one test, or with -j 1.

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

15 years agoMultiTestRunner: Add 'sh' parsing to ShUtil.
Daniel Dunbar [Sat, 1 Aug 2009 03:22:27 +0000 (03:22 +0000)]
MultiTestRunner: Add 'sh' parsing to ShUtil.

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

15 years agoMore warnings for unused expressions.
Anders Carlsson [Sat, 1 Aug 2009 01:39:59 +0000 (01:39 +0000)]
More warnings for unused expressions.

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

15 years agoAdd beginnigs of rtti generation, wire up more of -fno-exceptions.
Mike Stump [Fri, 31 Jul 2009 23:15:31 +0000 (23:15 +0000)]
Add beginnigs of rtti generation, wire up more of -fno-exceptions.

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

15 years agoRemove the old struct builder code.
Anders Carlsson [Fri, 31 Jul 2009 21:48:56 +0000 (21:48 +0000)]
Remove the old struct builder code.

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

15 years agoAnd now we can generate a simple vtable. Still a work in progress...
Mike Stump [Fri, 31 Jul 2009 21:43:43 +0000 (21:43 +0000)]
And now we can generate a simple vtable.  Still a work in progress...

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

15 years agoMove code from EmitUnion directly into the function that handles cast-to-union.
Anders Carlsson [Fri, 31 Jul 2009 21:38:39 +0000 (21:38 +0000)]
Move code from EmitUnion directly into the function that handles cast-to-union.

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

15 years agoUse the struct builder for unions.
Anders Carlsson [Fri, 31 Jul 2009 21:34:04 +0000 (21:34 +0000)]
Use the struct builder for unions.

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